Why server-side Javascript

5 Oct

I just replied to a post on the public Osmosoft google group regarding
server-side Javascript (http://groups.google.com/group/osmosoft/browse_thread/thread/69d44e8d72b9c649):

There are certainly reasons why a language like Rub^WPython is better
on the sever, but there are also some very compelling reasons in
favour of Javascript:
– no need to do a mental shift when switching between browser and
server, which is especially painful with subtle differences in syntax
– no need for developers to learn and master two separate languages;
as Javascript literacy becomes ubiquitous among web developers, it is
becoming the language with the biggest catchment area
– sharing library code between browser and server; wikifier is a
perfect example of the class of functionality where duplicate work is
required to get browser and server in sync, reducing agility due to
the multiple languages, and vulnerable to subtle mismatches in the
logic. Another common example is code to validate user input, which
must always be duplicated on the server if you are to help users by
providing client-side validation.
– the ability to create modules whose scope spans both browser and
server; so you can define a micro-interaction by declaring what each
side will do, using the same function and variable names. (ie the
browser “calls a function” on the server when the form is submitted).
– in defence of Javascript, it’s a much better language than most of
us originally thought…not as good as most of the usual candidates
for server-side development, and the core language will probably
always lag if restrict ourselves to the subset that runs in
contemporary browsers (which is worth doing, otherwise it defeats the
purpose), but the gap is smaller than expected, and aided by the many
libraries out there.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: