views:

299

answers:

8

how do you see the future of javascript as a (main) web browser scripting language?

there are browser-dependent variations of javascript support, javascript itself has some flaws. this could possible lead to incorporation of some dominant js framework into the leading open-source browsers, or promotion of a different (or completely new) scripting language from the side of a dominant browser manufacturer. do you currently see signs of such effort somewhere?

+2  A: 

I would look into JQuery - which is far as I know is the most dominant cross browser javascript scripting framework. Most web developers use this or something similar to abstract browser dependent javacript differences away from their client code. I don't see javascript going anywhere, I believe it is here to stay...

Eric Ziko
ONLY COZ OF IE :)
Thqr
+9  A: 

Javascript doesn't really have that many flaws that are not directly caused by crappy (or non-standard) browser implementations of the DOM.

Probably the biggest "flaw" in Javascript itself that I can think of is the semicolon insertion "feature", which is just horrible. It's not unfixable, of course, but my understanding is that ECMA isn't interesting in fixing it, so I guess we'll just have to live with that one.

Other than that, the main issue is with non-conformant implementations of the DOM and other W3C standards. Of course, replacing Javascript isn't going to fix that...

As for browsers including a "mainstream" library like jQuery, that's largely unneeded. Especially if you're using something like the Google AJAX APIs CDN. If everybody were to use that, then there would be virtually no need for the client browser to ever download the jQuery.js file directly - it'd already be in the cache from the millions of other websites that use Google's API :-)

Dean Harding
+9  A: 

The future of JavaScript is the ECMAScript Fifth Edition standard, which is currently being implemented by the next wave of browser versions: IE9, Firefox 4 and so on. Many browsers already have some Fifth Edition features and it's possible to retrofit some of the new methods, in particular the Array, String and Function extensions to older browsers.

Fifth Edition's Strict Mode outlaws some long-standing language-level gotchas, and the standardised object-property system will eventually (when we can rely on the average browser supporting properties at all, which principally means when IE6-7 are dead) allow prettier coding and wrappers that emulate DOM-style properties.

Most of the existing frameworks are more about DOM shortcuts than actual language-level features. It would be of questionable value to integrate them into browsers—as well as premature, as most of them are frequently updated.

bobince
A: 

JavaScript language is no longer the language that can be drawn upon in making web applications, especially because of the availability ASP.NET languages at the forefront of supporting this type of application which enables us to vaccinate, the language of Visual Basic or C # and AJAX libraries supporting.

Mehdei
-1, '[javascript is] no longer the language that can be drawn upon' Are you insane?
e5
There's a distinction between JavaScript, which is a *client-side* language, and the other ones you mentioned, that are *server-side* languages, apart from Ajax, which is (more or less) a technique for which you actually need JavaScript, as its full name implies (Asynchronous JavaScript and XML, but forget about the last term).
Marcel Korpel
@Marcel: Fine fine... redacted comment.
Mark
@Marcel I use AC#AX! :-)
pst
+9  A: 

Please repeat this with me...

JAVASCRIPT DOES NOT SUCK

Not only is it a powerful and flexible scripting language, but the core language is pretty much 100% supported throughout all major browsers, even IE 6.

The "browser dependent variations" come with DOM implementations which has nothing to do with Javascript. If IE returns a different value than Firefox for clientWidth, it will still return a different value if the property was called from Python, Ruby, or whatever other language one might perceive as "better".

We should be thankful that the web inherited such a well designed language from the tag soup heydays of the web. GASP! Did I just use the words "well designed" to refer to Javascript!? OMG YES! Unlike many other web technologies whose flawed implementations (and often flawed specs) are set in stone by the browser, Javascript's core flexibility has allowed it to improve and advance at a rapid pace. An impressive feat for a technology caught between competing browser vendors and built upon historical accretion. Go ahead, try writing a framework like jQuery in PHP.

Rife with flaws? Yes. But most of them stem from Too Much Leniency, a plague that has laid waste to the entire web. The good news is that you can IGNORE THE BAD PARTS. Semicolon insertion stupid? Don't worry! Just insert semicolons after every statement (and use jslint to make sure you do not forget). PROBLEM SOLVED. Once you look past all the stupidity added to the language to make noobs feel good about themselves, you'll see what a nice and yes, eloquent language it really is.

And...wait, incorporate some popular JS framework in the browser itself? Worst idea ever! Let's just hand over the spec for jQuery or Prototype to the w3c and let MS implement it in IE, and see what happens.

And any new language pushed by some browser vendor would instantly crash and burn (VBScript?), the web is built upon Javascript. Even Flash uses a variant of it. It is not going anywhere. This is a Good Thing.

Just had to get that off my chest...

MooGoo
JAVASCRIPT DOES NOT SUCK
Anurag
JAVASCRIPT DOES NOT SUCK. DYNAMIC LANGUAGES DO. :-)
pst
JS is a fun language, but it has many flaws. For a dynamic scripting language, it's pretty verbose (C#-style lambda functions would help, no more millions of ugly `function(){ .. }` blocks. It's not well suited for structured design, as hiding implementation details requires the ugly `(function(){ .. })()` construct. It's not well suited for the web domain either: DOM-manipulation through string concatenation? Really? And yet no multi-line strings? Not to mention the standard lib, or lack thereof. My favorite WTF though is how `replace` on a string only replaces the first occurrence. The fuck.
JulianR
+2  A: 

Rather than ditch javascript at the browser side I would like to see Javascript at the server side!

If we had server side JavaScript with some classes to support database access and the ability to build a web page as a DOM rather than a text stream wouldnt that be brilliant!

Using the same language on the browser and the server, accesing html elements in a logical structured way at the server side would make WEB development much less painful!

James Anderson
Hooray! http://en.wikipedia.org/wiki/Server-side_JavaScript
Robert
if your definition of server-side javascript is: javascript in the browser, do something on the server! - yes. it would be great. sometimes :)
mykhal
+2  A: 

The future of Javascript is bright!!!

alt text

CodeToGlory
A: 

JavaScript is same LISP, just inside-out (for readiness). And it is a great language!

Thevs