Javascript

HTML code

The evolution of JavaScript

The browser wars of the late 90’s inarguably shaped the structure of the internet, with web developers facing the unenviable task of moving away from the straightforward ability to relay HTML to exploring more interactive options that work in a variety of browsers across a multitude of platforms. The challenge was, bluntly, to evolve or die, and the solution was JavaScript. The survival of Netscape’s JavaScript language and its continued evolution has allowed developers to deal with challenges such as portable browsing, increased platform ubiquity and the rise of Big Data. Here, we look at where JavaScript came from and how it has managed to survive.

The birth of JavaScript

Constructed in a mere ten days by Brendan Eich in 1995, JavaScript’s high-level language was built on a lexicon partially borrowed from C and Java in order to allow for the construction of ‘dynamic’ web pages. JS had the capacity to adjust the fields of HTML 2.0’s controls, allowing for user interaction and the construction of client-side scripts; permitting asynchronous communication and the alteration of document content.

Data transmission – AJAX and JSON

AJAX is essentially defined as a collection of technologies, including: HTML, DOM, XML, XMLHttpRequest and JavaScript. The term ‘AJAX’ was coined by Jesse James Garrett, who revolutionized web development by allowing for the construction of asynchronous web apps. JSON serves the same purpose. Derived from JavaScript, it allows for the transmission of data to construct a client/server relationship. AJAX and JSON not only allowed browsers to connect to and retrieve vast stores of data but permitted the user to continue interacting with web services, carrying out these tasks while remaining unseen and unnoticed by the user. This efficient transmission of data marked another step toward addressing the limitations of the ‘one-way’ browsing experience while granting the capacity for object serialization.

A Shared Language – JQuery and Functional JavaScript

The period saw the release of a number of libraries for JavaScript in order to deal with the multitude of potential API’s in a browser-specific development, allowing the developer to bypass the problem by writing to the designated JS collection rather than the browser itself. This resulted in two outcomes, the first being that John Resig’s JQuery raised to prominence as a key resource for scripting with the language. The second was that the influx of content sparked the creation of ‘Functional JavaScript’, marking a mutation from a Java based ‘OO’ heritage to a markedly event-driven language. Functional JavaScript now stressed overt functionality alongside the application of capabilities such as call-backs and an active commitment to asynchronous processing and efficiency.

The revenge of the browsers – JavaScript V8 and Node.js

One the major reasons behind Chrome’s toppling of Firefox and Microsoft as the browser of choice was the deployment of a re-engineered build of the JavaScript engine. This was accomplished through the use of virtualization to change the behavior of the browser alongside platform independence, allowing a user to run the same application within the browser programs on Windows, Mac OS and other operating systems. The system was based around three principles: the deployment of hidden classes; the use of dynamic code generation; and efficient memory management through precise garbage collection. This display of raw speed prompted other companies to upgrade their engines in order to achieve similar results, driving the popularity of the language. This enabled the development of a server platform built around JavaScript, a long-term goal for those working with the language. While JS had previously been deployed through the use of NoSQL, its capacity for asynchronicity and query-based vocabulary led to the development of node.js in 2009, a scripting language capable of constructing high-performance, scalable network applications. It offered a unified API and efficient threading that offers connections in the tens-of-thousands along with an active developer community.

Querying databases – NoSQL

Relational databases proliferated the 90’s, and the decade began to see a change in how data was stored and processed. Spurred on by AJAX, the importance of analyzing ‘living data’ rose to prominence, adapting layered analysis to analyze data that was ‘multi-dimensional’. Carlo Strozzi’s initial NoSQL was the first programmer to bypass SQL systems, to allow users to construct non-traditional databases. Through harnessing XML and JSON, detailed data could be stored without deconstructing and rebuilding joins or other artefacts. JavaScript fulfilled a critical role in rendering ‘query’ and other input/update processes more efficient.

Sifting through Big Data – Map/Reduce

Created by Google in 2004 in response to a growing need to sift through masses of web data, this program carries out its task through the deployment of indexes. Incoming web data is mapped onto a set block for indexing and subsequently reduced into a data-set. JavaScript’s range of dynamic ‘OO’ constructs also proved invaluable in increasing efficiency, with the language proving a prime contender for supplanting other programs such as Hadoop, Ifinispan and MongoDB.

Mobile browsing – HTML5 and mobile development

HTML development stalled with the implementation of 4.0 in 1997, so developers were keen to explore options that expanded the breadth and vocabulary of the language. Focus was placed on 3D/2D graphical representation while eschewing the ability to allow third-party modifications to the software. These changes occurred in line with the seismic shift that followed Google’s acquisition of Android and Apple’s introduction of the iPhone, with the release of Java for Google wounding the platform through the introduction of systemic weaknesses inherent within the newly-tailored software. In hindsight, many developers felt that the addition of a JavaScript interface layer would alleviate many of the system’s vulnerabilities due to the language’s capacity to construct new functionalities in hardware. JavaScript’s ubiquity was then leveraged by software such as PhoneGap to allow for the construction of cross-platform apps, permitting the construction and porting of content between hardware frameworks and platforms. This was then bolstered through JavaScript’s web and server-based history, which had the capacity to deploy functions as objects, programme dynamically and translate well into mobile frameworks, while still being hampered by the processing power of each device. Increasingly disparate high and low-level hardware demands needed to be considered.

The future…

So having survived for nearly two decades, enabled the development of granular web content and helped bring about the rise of Chrome, what’s next for JavaScript? Observers note that JavaScript is perfectly placed to perform within any field of services with the rise in publishing and subscription-based models pointing towards success in the content-based interactive sphere such as blogging and social networking. The previously mentioned shortcomings of Java-based mobile platforms could also be readily addressed through the deployment of JS, highlighting a future in mobile development. The call to analyse the immense flow of data created by online activity will require programs and platforms to analyse it, an ability which JavaScript can certainly meet.

Contact us, to learn more about how javascript could take your application to the next level.