Will Server-Side JavaScript ever catch on?

Share this article

server-side JavaScriptJavaScript is probably the most widely-used programming language on the planet – nearly every website has a few lines. However, the language is also one of the most misunderstood and often confuses experienced developers: it is not Java, it is not “script”, it does not appear to support Object Orientated Programming, and it can be problematical to get code working in one browser – never mind all of them.

Much of the pain experienced by web developers is rarely caused by JavaScript itself; DOM manipulation, browser quirks and, until recently, a lack of good development tools and debuggers are the biggest causes of complaint. However, the rise of Ajax and Web2.0 led many developers to ‘rediscover’ the language: it may not be perfect, but it is powerful and provides compelling features such as prototypes, first-class functions, closures, and object literals.

Whilst JavaScript engines are available in all but the most basic of web browsers, its use has never become widespread on the web server. There are several server implementations of JavaScript but none could claim to have become mainstream compared to PHP, ASP.NET or even Ruby.

However, server-side JavaScript does offer some tantalizing possibilities:

  • It is one less language to learn and use. Web development typically involves a range of technologies and server-side JavaScript would make the process easier (how many times have you started typing server-side code into JavaScript or vice versa?)
  • The same code could be used on both the client and the server, e.g. form fields could be validated using identical methods.
  • JavaScript libraries such as jQuery would work on the server. Features such as server-side DOM manipulation should also be possible.
  • Web service and Ajax development would be easier, e.g. JSON could be natively handled at either end.
  • Knowledge could be shared between server and client-side web development experts.

Is JavaScript the right language for the server environment? Can projects such as Jaxer succeed? Are you using it now or planning to in a future project? Should more ISPs offer server-side JavaScript within their hosting plans?

Craig BucklerCraig Buckler
View Author

Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.

Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week
Loading form