开发者

Is Javascript only available for web browsers?

I would like to know abou开发者_Go百科t Javascript. Is Javascript available only for web browsers? Because I used some Javascript code for Firefox Plugin development and Thunderbird.

Help me to find out more about this: where can I use JavaScript other than web browsers, and how?


There's node.js which includes a full webserver and runs on Google's V8


No! Have a look at Google's V8


Google Javascript. Click first link (Wikipedia). Click "uses outside webpages".

http://en.wikipedia.org/wiki/JavaScript#Uses_outside_web_pages


There are a number of server-side (or otherwise non-browser) implementations of Javascript, including Node.js, which currently has a lot of momentum behind it, as well as the now-defunct Jaxer, which provided a server-side DOM implementation based on Mozilla Gecko. There are also efforts to bring DOM type functionality to Node.js, primarily from Yahoo.


With Rhino, you can embed Javascript in Java applications.


No, there are definitely other implementations. For instance, JScript.Net is included with the .NET framework.


MS-Windows can execute .js files (from the command prompt).

Since you do not have the browser context, you cannot use any calls to the browser (alert, for example, does not work).

Look for "Windows Scripting Host".

WSH supports scripts written in Microsoft Visual Basic Scripting Edition (VBScript) or JavaScript.


There are several implementations of stand-alone Javascript JSLibs (http://code.google.com/p/jslibs/) is general purpose jsdb (http://www.jsdb.org/) is more database oriented


Many text editors (including the one I use, ActiveState's Komodo Edit) expose their APIs and let you write macros in Javascript.


Using Adobe AIR you can write almost platform-independent Desktop Applications using JavaScript


PDF files can also contain JavaScript code. See first entry in google on this subject and also Adobe JavaScript virus.


Javascript can be easily embedded in applications written in other programming languages.

For Java there is as already mentioned Rhino, for C++ you can use for example Flusspferd. Here are some tutorials/examples.


Qt has the QtScript module. From Qt 4.7 it uses JavaScriptCore (the Webkit JavaScript engine).


In short, No.

Actually, Javascript and other Web technologies are used these days to create native mobile and desktop applications. (see Titanium Appcelerator and PhoneGap)

If you are familiar with the KDE project you can craft Plasma widgets using JavaScript, see Creating plasmoids with JavaScript

In Qt framework there is a QtScript module for JavaScript (ECMAScript) application scripting to provide much of the application’s functionality.

Also the new technology that is soon to be released in Qt 4.7 is Qt Quick, aka the Qt UI Creation Kit, which allows application developers to declaratively define their user interfaces in QML, for more information go here and an example here

QML is an extension to JavaScript, that provides a mechanism to declaratively build an object tree of QML elements. QML improves the integration between JavaScript and Qt's existing QObject based type system, adds support for automatic property bindings and provides network transparency at the language level.

And let's not forget Javascript is used as an embedded scripting language in various applications OpenOffice.org, Google Desktop Widgets, and many others, see Wikipedia's article here

On the server-side Javascript enables back-end access to databases, file systems, etc (see Node.js, Google V8, SpiderMonkey and others here)


Some document databases, such as CouchDB and MongoDB, use JavaScript to interact with the database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜