Everything about Web and Network Monitoring

What’s new in JavaScript?

JavaScript has emerged in the past couple years as the de facto expression of next generation web technologies, and a critical component of HTML5 technologies – along with CSS and JQuery. The stakes have been high. The well-known and rather tired debate in recent years over who owns the future of web and mobile development bears little repeating. Native needs little explanation. The advantages of HTML5, if not already clear, are numerous as well: open source, relatively easy to learn, a powerful user interface for designing sleek and intuitive websites, and lower cost and less development time.

 

image

 

In the battle for the development of the next generation web, the star of the show has really become JavaScript. As one article put it, “JavaScript is the number one language in the world; it’s the language of the web, and a starting point for so many new developers . . .”

JavaScript, according to Wiki, is “a dynamic computer programming language most commonly used as part of web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed.” The applications of JavaScript extend beyond client side applications; it’s also used in server-side programming, game development, and the creation of desktop and mobile applications. So it’s no surprise that JavaScript is ubiquitous – it really is showing up everywhere!

 

image

 

Given the critical role that JavaScript is playing in the new mobile web economy, we want to take a brief look at some of the key elements that have changed in the most recent iteration. This segment is not meant just for programmers. Rather, we want to provide in layman’s terms some of the most salient updates to the number one client side scripting language of choice.

The newest iteration of JavaScript is also known as ECMAScript, a scripting language that follows a set of international standards for development and which has various dialects beside JavaScript such as Jscript and ActionScript (used primarily for Adobe flash applications). The latest brand of JavaScript slated for release the end of 2014 is called ECMAScript 6 (Harmony) and the working draft can be read here.

 

image

 

The most salient features of the planned new upgrade in JavaScript/ECMAScript 6 are as follows (unfortunately, space forbids more than a very brief look at some of these updates, though more in-depth overviews of these topics can be read here and here and here).

Classes: With the introduction of Classes JavaScript is turning into a true object-oriented language. This functionality now provides the opportunity to write your JS code in a clean and structured way. JS classes also supports inheritance and extending classes; this means that the JavaScripter will now be able to produce fully object-oriented applications similar to Java, making the code much easier to read.

Modules: Provides a new and clean way to split up your JS code into smaller segments and re-use some functionality in other parts of application, all instead of relying on various libraries.

Maps and Sets: Yet another refinement in how the code is structured to run more efficiently and intuitively. “Map” is an object that is a simple key/value map. Any value (both objects and primitive values) may be used as either a key or a valuelisted. The “Set” function lets you store unique values of any type, whether primitive values or object references.

Iterators: Music to the ears of all object-oriented programmers. This functionality is the classic “for-of loop” – special functions that help you iterate over a custom object.

Generators: Provides a better way to create iterators. Each call to next() executes the function body until the next yield.

Let and Const: This is a much needed and long overdue functionality. “Let” allows you to lock a variable in scope so it’s not accessible outside that scope; let is for variables. “Const” allows for the creation of constants and ensure its value won’t be changed throughout the application.

Arrow Functions: Offer a much cleaner approach for specifying one-line functions.

 

image

 

There are many, many more changes included in the EC6 update. The wiki on this describes the overriding aim of this latest upgrade as follows:

The Sixth Edition adds significant new syntax for writing complex applications, including classes and modules, but defines them semantically in the same terms as ECMAScript 5 strict mode. Other new features include iterators and for/of loops, Python-style generators and generator expressions, arrow functions, binary data, collections (maps, sets and weak maps), and proxies (metaprogramming for virtual objects and wrappers). As the first “ECMAScript Harmony” specification, it is also known as “ES6 Harmony”.

Based on what we’ve seen in this short overview, there’s a lot of new and exciting things happening with JavaScript. We suggest you get onboard with JavaScript today to be part of the latest and greatest trends in mobile and web development!

Post Tagged with

About Jeffrey Walker

Jeff is a business development consultant who specializes in helping businesses grow through technology innovations and solutions. He holds multiple master’s degrees from institutions such as Andrews University and Columbia University, and leverages this background towards empowering people in today’s digital world. He currently works as a research specialist for a Fortune 100 firm in Boston. When not writing on the latest technology trends, Jeff runs a robotics startup called virtupresence.com, along with oversight and leadership of startuplabs.co - an emerging market assistance company that helps businesses grow through innovation.