17

I would like to know about 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?

15 Answers 15

15

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

Sign up to request clarification or add additional context in comments.

Comments

14

No! Have a look at Google's V8

Comments

12

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

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

Comments

4

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.

2 Comments

@Daniel Vassallo, Sadly, yes. They haven't produced a release for over a year, and no longer discuss development of the product. I'm pretty sure they've abandoned the product completely.
@Daniel, on the other hand it appears there's some regular activity on their GitHub repository, so someone may have taken up the slack. But Aptana is definitely not pushing it as they once were.
4

With Rhino, you can embed Javascript in Java applications.

Comments

3

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

2 Comments

I've definitely heard of people using JScript.NET.
Ok. Then I should probably stop trying to make fun of it. I've updated my answer.
3

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.

Comments

2

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

1 Comment

jslibs wraps many 3rd party libraries like zlib, SQLite, FastCGI, NSPR , ODE, libpng, libjpeg, librsvg, SDL, libiconv, OpenGL, OpenAL, ogg vorbis, libTomCrypt, ...
1

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

Comments

1

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

Comments

1

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

Comments

1

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.

Comments

0

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

Comments

0

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)

Comments

0

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.