Javascript soldier

The latest attack on tech-earth is from planet Javascript. Like many of their predecessors such as Java, C — these Javascriptians also have set their agenda to rule the entire world — everything from the browsers to servers to mobile apps to desktops and any other devices inbetween.

Not long ago, Javascript was recognised as the language to do a little bit of web page scripting — probably good for mundane tasks such as form validation before submitting to a server. The server was the all-powerful beast which would pass on the complete html page — full with the view and the data — to the browser.

Javascript silently grew on the browsers. Its initial competitors — like ActiveX and Java applets — were no match to the natively supported Javascript. Once Javascript emerged as a clear winner there, a host of Javascript frameworks came up quickly. People started talking about doing more and more things in the browser itself, as opposed to depending on the server completely for what they want to show. The server, got thinner to pass only the data to be shown, and the Javascript code on the browser would decide when to ask for it and how to show it. Single page web applications took this to the extreme, executing most of the application logic on the browser client.

After the browsers, Javascript then set its eyes on the new and exploding area of mobile apps. The PhoneGap / Cordova frameworks made it possible to create native mobile apps using the web browser technology. The basis is that a mobile supports a web view component internally; and it supports HTML and Javascript just like a web browser. This gives two advantages:

  1. The developers can leverage their familiar html / javascript technology skills to create native mobile apps
  2. The same codebase can target multiple mobile technologies such as iOS, Android, Windows phone — as they all support the web view. It saves huge amount of development time.

Today, apart from some applications which necessarily need native capabilities and native performance (such as mobile games), Javascript based apps is a formidable contender. New frameworks such as ionic and reactjs make these apps look very cool in front of their native counterparts.

The most difficult battle for the Javascript is on the server side. There are many kingdoms here — PHP, Java, .Net, Python, Ruby — each having their strengths. Javascript was not even in the game. But it started changing since 2009 when node.js came up as a server side Javascript technology. Based on super fast Chrome V8 engine and asynchronous function calls, node.js started enticing the world with its blazingly fast performance. The developers loved it for its simplicity, and started developing utilities which attracted even more developers. Before long, node.js has established itself as a serious contender for even the server side development.

Did someone say desktop applications? They have been systematically overtaken by web applications for a long period now. If one wanted native performance, one could always create a browser plugin with HTML/ Javascript than writing a desktop application. Anyway, if you still want to create a native desktop application, you can do it with new Javascript technologies such as nw.js or Electron.

Javascript is still considered a young kid on the block — especially on the server side. Mid-to-large scale applications need measures like type safety and class based object orientation which Javascript lacks. But its cousins –notably Typescript from Microsoft and Dart from Google– have come to the rescue to quickly plug those weaknesses. These language compile to Javascript and thus can be used anywhere that Javascript can be used — which seems to be everywhere at the time of writing.

Javascript’s ubiquitous nature is being adroitly utilised by powerful frameworks (check meteor.js) to let the developers write code only once and then have it run on both the client side and the server side.

The war is in full force as we speak. As of now, the Javascriptians are winning. Their army is marching ahead. Their new-found enthusiasm is also evident in the fact that the tech giants who could not agree before reached an agreement almost magically and a new specification EcmaScript 6 became a reality in 2015. Every day there are more and more developers defecting to the Javascript stack. What remains to be seen is how much ground they cover before an equilibrium is established.

Wrath of the Javascriptians
Tagged on:                 

One thought on “Wrath of the Javascriptians

  • March 6, 2016 at 7:35 am
    Permalink

    Very well written brilliant post, Sir!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *