views:

524

answers:

20

With all the magic you can do in today's browser I wonder if Javascript will become much more prominent on the server side or as a viable alternative for application programming. I ask this because I have poked around with many programming languages except Javascript. Maybe it's time to dive into it, before everybody is wanting and it's me still being clueless.

Therefore, do you think Javascript will even get bigger?

+4  A: 

It's already bigger than you think, since ActionScript is very heavily based on JavaScript and is used by a ton of developers.

Personally, I would bet on JavaScript to become more and more widely adopted in future frameworks so that web developers can easily acclimate to new environments; especially frameworks that want to deliver applications via the cloud...

jeffamaphone
JScript is Microsoft's implementation of JavaScript. Do you actually mean JavaScript?
George Stocker
Heh, it's the shortest to type, but yeah, whatever.
jeffamaphone
A: 

I think it may have academic interest this way, but I don't anticipate Javascript to be a viable alternative for application programming.

Mike Caron
A: 

Well, WebOS is going to make heavy use of Js for development. As for expanding elsewhere... I don't know, Javascript has a lot of features I like, but nothing you can't find in the plethora of other lanuguages. And although performance has improved, it's still not going to beat C/C++/even Java in a lot of fields.

CookieOfFortune
+10  A: 

It's already widely used as a scripting language. I've heard that photoshop is scripted with it. Also, flash's actionscript is javascript.

It's the cool little language, exactly the one you want for those cases. People use it all over - I've heard it was using in the call center software, for example.

It can be useful in server programming, too. We're waiting for Steve Yegge's Rhino on Rails.

And if you take couchdb, webapp in rhino, javascript in browser and e4x-based templating engine, you'll get a webapp stack in pure javascript, which is kind of fun!

alamar
A: 

Two jobs ago, I was tasked with writing an HTTP spider in javascript. It's a long story.

You can do a lot in javascript. Similarly, with php available outside the web server via the php interpreter, there's probably a lot you could do in php outside the server.

But will either of those things happen? My guess is "no," but I don't have a crystal ball that's any clearer than anyone else.

nsayer
PHP and JavaScript are different animals.JavaScript was actually designed, you know. By a knowledgeable people.
alamar
And yet PHP has a better OO system than JavaScript. Figure that one out.
R. Bemrose
Nope, it doesn't. As far as I know, PHP has the most unwieldy OO system for a dynamic language, which makes no sense, almost as all other 'features' crammed there.
alamar
JavaScript's OOP model is better than PHP's orders of magnitude.
Ionuț G. Stan
+1  A: 

Yes, I think it will.

More and more people are developing applications in JavaScript on the client side, and its use on the server side is growing, with technologies like Aptana Jaxer letting people use the same skills and technologies on the server side.

JavaScript libraries like jQuery are helping JavaScript to shake off its "toy" image, and people are taking it more and more seriously as a first class development language.

RichieHindle
A: 

In browser -- yes, because it's the actual standard, and the more popularity web applications will gain, the more JavaScript will become a "real" language.

Outside browser -- I don't think so. Just no :)

+1  A: 

The current trend in mass-market Javascript seems to be going toward libraries (jquery, prototype, et al). Packaging up solid code into a more usable and friendly framework could potentially increase the range of the language's uses. While all the current libraries are meant for use in the browser, it's imaginable that they could be extended beyond it. However, outside of web development, Javascript is generally considered to be a somewhat ugly and hackish language, so I don't think it would be allowed to transcend its browser sandbox and compete with the likes of C++, Java, Python, etc.

Evan Meagher
+2  A: 

Short Answer: Not really.

Long Answer: Javascript lacks a lot of features, even for a scripting language. It's main popularity comes from its ability to interface with servers asynchronously allowing sites like Stackoverflow or Facebook to magically update content without refreshing.

It is however slow and lacking in several features making it viable for application programming outside the browser. While there is definitely a surge in browser based applications (great advantages because they are essentially easy to deploy and completely OS independent if done correctly).

Another thing to consider is that most of the things that make javascript popular derive from its monopoly on browser based scripting. And most of its uses have already been bottle up in the form of JQuery and Prototype and Dojo.

If you intend to go into the area of browser based software you will still need to learn the backend langauges that make them possible and the Javascript should be very easy to add in later (if you've been following your standards.) Google Web Toolkit even compiles the front end Java into Javascript for you so you don't even have to worry about.

Jamie Lewis
I urge you to view this: http://video.yahoo.com/watch/111593/1710507 and then delete your post :)
Dr.Dredel
A: 

i didn't expect it... but when I got a lot of ActionScript books, i found that the language is ECMAScript, which is basically Javascript.

動靜能量
A: 

Having used Javascript before and being required to deal with JavaScript, jQuery, and ExtJS right now at work, I can only say:

I will never use Javascript/EcmaScript as an embedded scripting language unless I have no other choice.

R. Bemrose
+2  A: 

I find it pleasant to imagine an alternative history where server side javascript (implemented in NAS in 1996) became the dominant server-side language instead of PHP. Javascript is a very powerful and expressive language, and being able to use it both on client- and server- sides would have opened up a lot of options for webdevelopers and made them much happier and more productive.

Whether Javascript will become more widely used, I don't know.

d__
+1  A: 

For what it's worth: since 1998 nearly all my server side programming is in javascript. It did and does everything I allways wanted.

KooiInc
+1  A: 

As a free and popular script language, it can be used in several applications.

For instance, the game development tool Unity3D has JavaScript as one of its script languages. And the majority of examples, tutorials and code solutions are written in JavaScript.

fbinder
A: 

You can use JScript.NET in ASP.NET if you want to today, it has access to all the .NET libraries. And back in the old classic asp days you could also write your asp scripts in javascript.

You can even write applications with it and use the jsc compiler to compile it to a normal .net application.

So I guess the answer is, it already is.

PQW
A: 

Yes, because it's a godawful hack, and if there's anything which the history of computing tells us, its that godawful hacks grow without limit.

Sharkey
We'll lots have happend since the first incarnation of javascript, it's not the same language today. It was pretty buggy when it came out but not today.
PQW
Yeah, and closures!
jeffamaphone
A: 

I think Python and Ruby are becoming the big dynamic languages outside the browser. JS outside the browser has been around a while (classic ASP could be written in JScript) and it's still growing a bit (see Jaxer, Rhino, etc. from the other posts)... But I think it would have caught on by now if it were going to.

JSON has been pretty well received--even for things like data persistance (as in CouchDB) but I'd guess something like YAML will supplant JSON as JSON is supplanting XML which supplanted CSV...

The more things change...

steamer25
A: 

Agilent has some very nice (pharmaceutical grade) lab testing equipment that can be scripted through JavaScript. The management/scheduling software is Windows-based, but runs a JavaScript VM with some added file access functions. For what it's worth, the company that originally developed this stuff, Velocity 11, was full of young engineers and programmers and seemed to have done most of the development in the last few years.

The field engineer that took me through the equipment configuration training had just learned JavaScript six months prior and was able to set up our testing methods without much fuss. Oh, and it's nice for a UNIX guy like me to be able to edit the scripts with TextPad and not have to mess around with Visual Studio or interactive debuggers or whatever. Just a directory of *.js files and away we go!

So to answer the question, I'm not really sure that JavaScript will take off outside of the browser, but it's certainly being used effectively in at least one area where a more established scripting language like VB would normally be expected.

m104
+3  A: 

I am willing to guarantee that it will. I know of 2 projects in the works now that aim to create a compiled server side javascript that would replace PhP, JSP, etc.

The whole "is it good or bad" argument is entirely subjective and I think it's foolish to engage in it. I can tell you however, that if you examine the actual functionality of the language you will see that it is much more powerful than things like C++ and Java. Your program can morph at run time, creating its own additional classes, methods, etc. ON THE FLY!!! No one uses it this way because most javascript programmers are people that came to it from web development and really need it to make things roll-over or to verify form data. But that fact notwithstanding, it is running in more places now than any other language (just think about how many people pull open their web browsers each day and how 99% of the pages they visit utilize it!). No tool that is THAT diverse can be unexamined for long. It definitely needs some retooling, but it's unavoidable and it will absolutely not be going away anytime soon.

Dr.Dredel
A: 

I think javascript will be big on the server again. There's just too much of an advantage for people to learn a single language for backend and frontend. All javascript is missing are some IO & networking primitives (which can currently be had using extensions), as well as some support for parallelism (but this may be a long time coming, alas). I predict that within a couple of years at most we'll have as many options for javascript application servers as we do today (12/8/2009) for python application servers.