Is JavaScript an application language?
Asked Answered
S

13

7

I have always thought of JavaScript as a client-side scripting tool for augmenting the functionality of HTML, which in turn is usually generated by some other server-side technology - Java, .NET, Rails, Django, PHP, etc.

Recently though I have heard people talk about JavaScript as an "application language". I understand that applications like Gmail have taken JavaScript to the next stage of evolution and have made the browser much more like a full-featured application. But as far as I know, there are no server-side technologies like the ones I mentioned earlier that are JavaScript based. So even in the case of a Rich Internet Application, the "application language" is really the one on the backend that interacts with the database and performs URL routing, etc.

Is my understanding outdated and is JavaScript now capable of performing backend processing or are we willing to call it an "application language" simply because its current sophistication in what it can perform on the front-end is such that the backend processing has become secondary?

Sienkiewicz answered 15/8, 2009 at 18:25 Comment(0)
C
6

Serverside Javascript has been possible for a long time now. I maintain code with it every day. It's way better than classic ASP (at least I can have "real" objects, and try-catch, etc).

Another great thing is that you can avoid recoding your form validation code in different languages. I just use a javascript file like this:

<!--//<%
//code
//%>-->

That allows you to both include code with <!--#include file='name'--> and with <script src='name' />. On the downside it could be lot easier to "break" your validation code by looking at it (if you weren't careful enough). Never put sensitive information in there outside the validation code. Also, you can choose the file extension that you want, but never save serverside javascript that does database access as .js. .asp files are by default executed and not sent as plain text. That is not true for .js files, which are only executed if they are included in an .asp file.

Caracul answered 15/8, 2009 at 18:33 Comment(1)
You are right. Adding it right now. javascript's advantages over VBScript are too many to even start here.Myiasis
C
4

I disagree. With the advent of web services you can write your entire application client side if you want and simply interact with web services via AJAX. I wouldn't recommend this, but it could be done. Now you might consider the web service as part of the application, but I think the point could be argued that it's no more part of the application than your database technology.

Caecilian answered 15/8, 2009 at 18:30 Comment(0)
N
2

JavaScript is a language that is turing complete, is relatively widely adopted and understood in its syntax and structure, and has out of browser runtimes. It's been used in server side scripting, command line scripting, and for developing robust web applications since its inception. It's also the exclusive language on the Palm Pre, running WebOS.

What has hurt JavaScript in gaining wider recognition as a "full fledged" prime time serious language has been its lack of uniformity in implementation. Honestly this has largely been because of Microsoft's attempt to institute proprietary extensions and it's misguided attempt at divisive technologies such as ActiveX, JScript, etc.

With a complete object model and relatively sophisticated set of libraries behind it now, there's no reason to not regard it as seriously as any other modern language in wide spread use. Indeed, it's probably the most widely known computer language today.

Nadabus answered 15/8, 2009 at 18:39 Comment(0)
C
1

Microsoft's JScript engine can be hosted in a wide range of applications. It can also be used from several other standard general purpose script hosts such as WSH and MSHTA in addition to IE. It can be hosted server-side using Classic ASP as well.

This means there are several ways to create non-Web applications using JScript under Windows in addition to server-side Web applications. This includes stand alone or client-server desktop applications.

Similar tools exist from other sources. Most of these support additional platforms beyond Windows.

Congeneric answered 15/8, 2009 at 18:30 Comment(0)
D
1

See Rhino for a javascript implementation written entirely in java. It is typically embedded in a java program to enable scripting, so it can be used server-side.

Dictum answered 15/8, 2009 at 18:34 Comment(0)
H
1

CouchDB makes use of javascript to structoure and manipulate the data.

Heaps answered 15/8, 2009 at 19:20 Comment(0)
K
0

See Jaxer

With Jaxer, your JavaScript gains full access to databases such as MySQL or the integrated SQLite database. Rich filesystem I/O as well as low-level network socket access are available to you all directly in JavaScript on the server. And you can call those server functions seamlessly from the client - exposing only the ones consistent with your security requirements.

Kabob answered 15/8, 2009 at 18:28 Comment(0)
P
0

I've written several in-house tools in JavaScript. The advantage is that it's easy to throw together some CSS and HTML to get an interface for things I would normally have done as just console commands.

Perseus answered 15/8, 2009 at 18:42 Comment(0)
A
0

You may want to do some research on widgets. Web Widgets are small programs that are created using web languages (HTML, CSS, Javascript) and have some specific small function.

Opera is currently using them, you see them on Palm's WebOS, and there is a W3C specification coming out soon for them.

W3C Widget 1.0

Opera Widgets

Arrant answered 15/8, 2009 at 18:57 Comment(0)
S
0

You can create desktop applications with Titanium Desktop using web technologies, including JavaScript, or Python and Ruby if you wish.

Shiflett answered 15/8, 2009 at 18:57 Comment(0)
I
0

Javascript is going to be the next more widely used application language. Why? Ask to Google Chrome OS Development team. Client side application and Cloud Computing aren't tell you something?

Injudicious answered 15/8, 2009 at 19:30 Comment(0)
G
0

The actual language of Javascript is ECMAScript. (See The standard and Wikipedia article).

ECMAScript is used in many browsers as Javascript, it's used in Flash as ActionScript, and Microsoft have their own implementation called JScript which is used instead of Javascript in Internet Explorer, and as a server side language in ASP (an alternative to the more common VBScript).

The language itself is not specific for any environment, like the web. The DOM that is used in Javascript is not part of the ECMAScript language itself. So, the language can be adapted to pretty much any environment, but the most widespread is of course still Javascript.

Goldi answered 15/8, 2009 at 21:10 Comment(0)
S
0

I can't see a mention of the awesome "Node.js" (http://nodejs.org/) platform. That is one of the "hot" things for now...

Sumter answered 4/11, 2012 at 12:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.