Welcome!

Java IoT Authors: Elizabeth White, Pat Romanski, Liz McMillan, Yeshim Deniz, Frank Lupo

Related Topics: @DevOpsSummit, Java IoT, Linux Containers

@DevOpsSummit: Blog Feed Post

Seven Ways ES2015 Can Improve Your JavaScript Programming By @OmedHabib | @DevOpsSummit #DevOps

The advantages of new ES6 features and some of the challenges the language faces in the future.

Seven Ways ES2015 Can Improve Your JavaScript Programing
By Omed Habib

ES6 is a major update to the JavaScript language, the first since the adoption of ES5 in 2009. The features of ES6 are being incorporated into JavaScript engines around the web right now, and the changes are far reaching.

The new features in ES6 show how far JavaScript has come over the last two decades. Originally designed to define some functions and variables in order to build applications that could run in the browser, it continues to grow rapidly based on its flexibility and adaptability. ES6 contains new functionality that will move JavaScript to a whole new level of adoption and performance.

In this article, you will gain insight into the history of Javascript, how ECMA began to standardize its specification, the advantages of new ES6 features and some of the challenges the language faces in the future.

Evolution of JavaScript
ECMA, an industry association that began in the early 60s, is responsible for specifying the standards for JavaScript. Originally called the
European Computer Manufacturers Association, it is now known as simply ECMA. JavaScript began life as a project named Mocha, which was created by Brendan Eich, who also co-founded the Mozilla Foundation. Mocha later became LiveScript and ultimately evolved into JavaScript.

JavaScript was a tremendous success as a scripting language for web pages on client programs. Netscape and Sun Microsystems released it officially in late 1995. A few months later, version 2.0 of Netscape Navigator came out on the market, including full JavaScript support. Microsoft shortly released their own version, avoiding trademark problems by calling it JScript, and bundled that into version 3.0 of Internet Explorer in the summer of 1996.

In late 1996, Netscape submitted JavaScript to ECMA International to set standardization specifications. ECMA-262, the first edition of the specification, was adopted in June 1997. Due to disagreements about standardization between Microsoft and Netscape, ECMA called their standard version of the language “ECMAScript.”

Six Major Releases of ECMA-262
Since then, there have been five more major releases of ECMA-262.

  • Second edition. The second edition in June 1998 consisted of mostly editorial changes.

  • Third edition. The third edition came out in December 1999, adding features such as regular expressions and formats for numeric output.

  • Fourth edition. The fourth edition was abandoned due to differences of opinion on the complexity of the language.

  • Fifth edition. Version five was released in December 2009. It added “strict mode,” which gave the specification better error checking. It also added support for JavaScript Object Notation (JSON) and other features.

  • Sixth edition. The sixth edition was approved by the summer of 2015. Commonly called ES6, the official name is ECMAScript 2015. Future releases will follow this format: “ECMAScript” followed by the release year. Hence, the next version will be ECMAScript 2016, and that pattern will continue.

The sixth edition adds essential syntax for creating complex applications. Other new components include binary data, generators and generator expressions similar to the Python language, error functions, proxies, for/or loops and collections.

The next edition is still at the beginning of its development. It is scheduled to include new features such as operator overloading, promises/concurrency, pattern matching and more.

Limitations of ES6
While ECMA members say ES6 is an effort to bring a simpler syntax back to JavaScript, there are still several challenges facing the language:

  • Difficult for outsiders to suggest changes. Some programming experts believe that the process of influencing changes in the standards is too complicated. Rob Eisenberg, who developed the Aurelia JavaScript framework, told InfoWorld that at one point he was trying to get a hook added to the specification for the JavaScript module loader. He told the magazine the standardization body does not have an efficient way of providing feedback, which limits the ability of outsiders to influence what is being considered.

  • Lack of 64-bit numeric type. Despite the continuing evolution of the language, some nagging technical problems remain. One sore spot is the continuing absence of 64-bit numeric type. Currently, it only supports doubles due to its support for floating-point operations.

Despite these ongoing challenges, the new features inside ES6 are extensive and impressive. They include:

  1. Modules. Modules allow you to reuse parts of your application in other areas. Using new import and export keywords, you can load dependencies and manage them. While you could cobble together similar functionality in ES5 using external libraries such as CommonJS, modularity is so important for today’s large programs, it is a significant benefit that it was built in as a core feature in ES6.

  2. Promises. Errors arising from asynchronous operations can now be handled with promises. While you can handle the same situation with callbacks, promises are much more readable due to concise error handling and method chaining.

  3. Arrows. This function shorthand uses the syntax =>. While not a monumental addition, this simple improvement provides lexical scoping of the keyword “this.”

  4. Const. Const makes it easier to ensure your code is accurate. Const lets anyone scanning the code see any variables that should not be modified, and throws off an error if he or she are. This helps reduce bugs because values keep their meaning and prevent a team member from changing a variable inadvertently.

  5. Property Names. In the previous version, ES5, you could not use a variable right in an object literal. ES6 allows this with specific syntax.

  6. Template Literals. Allows changing variables into strings. Template strings show much promise as a useful feature, such as using a tag for auto-escaping SQL strings.

  7. “Sugar Syntax”. As mentioned previously, ES6 has made a concerted effort to simplify the syntax. A new class syntax is “syntactic sugar” because it makes the language simpler and more readable. It does not change how the system works but provides a cleaner syntax for developers who prefer it.

Other features include:

  • Block Level Scoping. Using the “let” keyword, ES6 lets you scope variables directly to blocks.

  • Generators. Functions that make iterators utilizing “function*” and the keyword “yield.”

  • Rest Parameters. Now you do not have to use arguments to access arguments for functions. You can access arrays that represent the remaining parameters.

  • Set. You can store a data values list inside a collection object.

  • Default Parameters. If you’ve ever wanted a function parameter that could be set default value, you are in luck, because ES6 has this functionality.

Classes is a feature of ES6 that has garnered a love/hate reaction from developers because it adds syntactic sugar on Javascript’s prototypical inheritance. It is meant to make Javascript more appealing to developers who may not have worked with a language that uses prototype chains. However, some developers complain classes lock you in and cover up inheritance, i.e. the original nature of JavaScript. A few JavaScript veterans feel the hard part about the language is constructors, not its prototypical inheritance.

Moreover, in truth, some components in ES6 are syntactic sugar. Classes are a good example as they use method signature notation to declare older coding methods with a shorter, more readable syntax. Programmers coming to JavaScript from class-based languages are usually glad they do not have to worry about strange inheritance mechanisms.

A Major Upgrade with Room to Grow
The reason JavaScript remains viable is it fits nicely in traditional web browsers while also playing well in new environments like Node.js. Despite its limitations, its flexibility allows it to thrive. ES6, or ECMAScript 2015, provides exciting new tools and functionality for developers to work faster, cleaner and more efficiently.

At the same time, ECMA needs to figure out a way for outside programmers to offer useful ideas and implement necessary features like 64-bit numeric type. If anything, ECMA needs to work faster. ES5 was adopted in 2009, and some industry watchers think it did not offer enough new features to be rolled out as a major upgrade. Indeed, some saw ES5 as nothing more than a warmed-over version of ES3. From that point of view, there haven’t been any significant advancements in the specification for many years.

If that picture is accurate, ECMA must adopt a faster approval process. They have to figure out how to incorporate new ideas rapidly, resolve political stalemates among stakeholders efficiently and make the syntax even friendlier to those new to the language. If they can meet these and other challenges effectively, JavaScript will remain a cornerstone of our mobile, always-on and hyper-connected world.

The post 7 Ways ES2015 Can Improve Your JavaScript Programing appeared first on Application Performance Monitoring Blog | AppDynamics.

 

 

Read the original blog entry...

More Stories By AppDynamics Blog

In high-production environments where release cycles are measured in hours or minutes — not days or weeks — there's little room for mistakes and no room for confusion. Everyone has to understand what's happening, in real time, and have the means to do whatever is necessary to keep applications up and running optimally.

DevOps is a high-stakes world, but done well, it delivers the agility and performance to significantly impact business competitiveness.

@ThingsExpo Stories
SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). According to the survey, a quarter of the respondents have already deployed Docker containers and nearly as many (23 percent) are employing the AWS Lambda serverless computing framework. It’s clear: serverless is here to stay. The adoption does come with some needed changes, within both application development and operations. Tha...
SYS-CON Events announced today that Avere Systems, a leading provider of enterprise storage for the hybrid cloud, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Avere delivers a more modern architectural approach to storage that doesn't require the overprovisioning of storage capacity to achieve performance, overspending on expensive storage media for inactive data or the overbui...
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
SYS-CON Events announced today that mruby Forum will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. mruby is the lightweight implementation of the Ruby language. We introduce mruby and the mruby IoT framework that enhances development productivity. For more information, visit http://forum.mruby.org/.
Digital transformation is changing the face of business. The IDC predicts that enterprises will commit to a massive new scale of digital transformation, to stake out leadership positions in the "digital transformation economy." Accordingly, attendees at the upcoming Cloud Expo | @ThingsExpo at the Santa Clara Convention Center in Santa Clara, CA, Oct 31-Nov 2, will find fresh new content in a new track called Enterprise Cloud & Digital Transformation.
SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp emp...
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
Amazon is pursuing new markets and disrupting industries at an incredible pace. Almost every industry seems to be in its crosshairs. Companies and industries that once thought they were safe are now worried about being “Amazoned.”. The new watch word should be “Be afraid. Be very afraid.” In his session 21st Cloud Expo, Chris Kocher, a co-founder of Grey Heron, will address questions such as: What new areas is Amazon disrupting? How are they doing this? Where are they likely to go? What are th...
Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, will discuss how given the magnitude of today's applicati...
Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant th...
SYS-CON Events announced today that SkyScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. SkyScale is a world-class provider of cloud-based, ultra-fast multi-GPU hardware platforms for lease to customers desiring the fastest performance available as a service anywhere in the world. SkyScale builds, configures, and manages dedicated systems strategically located in maximum-security...
SYS-CON Events announced today that Avere Systems, a leading provider of hybrid cloud enablement solutions, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Avere Systems was created by file systems experts determined to reinvent storage by changing the way enterprises thought about and bought storage resources. With decades of experience behind the company’s founders, Avere got its ...
SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. ANSeeN are the measurement electronics maker for X-ray and Gamma-ray and Neutron measurement equipment such as spectrometers, pulse shape analyzer, and CdTe-FPD. For more information, visit http://anseen.com/.
High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, will discuss how by using...
In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lead...
SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
SYS-CON Events announced today that CAST Software will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CAST was founded more than 25 years ago to make the invisible visible. Built around the idea that even the best analytics on the market still leave blind spots for technical teams looking to deliver better software and prevent outages, CAST provides the software intelligence that matter ...
SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc.
As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...