Infosys experts share their views on how digital is significantly impacting enterprises and consumers by redefining experiences, simplifying processes and pushing collaborative innovation to new levels

« November 2016 | Main | February 2017 »

December 30, 2016

JavaScript - Today's Ruler of Web Application Development

Author: Smita Makwana-Technology Architect, Manufacturing-Application Design and Maintenance

Introduction 

Today, JavaScript is the most talked buzzword of Web Application Development. Open source JavaScript frameworks has overcome major browser fallbacks. JavaScript popularity has led to a very vibrant ecosystem of frameworks, libraries and technologies.

Is JavaScript replacing Java?

Java has fulfilled its purpose for which it was designed in 1990, but now it's time to move forward. Java development is bit complex for rapid business application development. Enterprise application development should look for other options rather than sticking to Java because of below potential causes

img111.png












Java and .net was the preferred choice for customer facing applications but as demand for mobile applications increased, JavaScript took the lead. JavaScript made permanent position in Web application architectures.

JavaScript The Ruler

Application development landscape is changing rapidly and all the application and web developers' community are primarily shifting their focus towards frameworks for quick and clean application specific smoother project delivery. The major advantage of using any well-known JS frameworks is that they provide high level out of the box robust, efficient and production ready kind of structure which in turn helps development teams in application specific scaling instead of spending huge efforts only in building and defining the standard code basics. Evolution of JavaScript begins with simple scripting in 1995 and now in 2015 onwards we could see ECMAScript is the name of its official de-facto standard which moved from ES1 to ES6 over the years.

JQuery is considered as major shift in JavaScript evolution cycle as it gave ordinary java developer super power. Another major shift is the release of many open source frameworks that run on Model View Controller. Modern JavaScript framework offer a more responsive user experience.

Now the time is where we can develop all the components of an Application by using JavaScript frameworks and libraries. Following are some of the major options available in web and enterprise app development. 

img212.png


























Server-Side JavaScript - Node.js

Node.js is an open source JavaScript Framework developed by Google development center which uses V8 engine. It was designed to increase the performance of JavaScript execution. V8 compiles JavaScript code into machine code.

Node.js is a Single Threaded Event Based Framework that uses non-blocking asynchronous I/O. By using Node.js we have liberty and flexibility that we can use the same language on the client side, server side, and in the database side too and data will flow in same format i.e. JSON (The world's best loved Data Interchange Format). Node.js simplified build process by using JavaScript language and offered powerful task runners like Grunt, Gulp and Brunch. Node wins over Speed/Performance. Significant difference can be noticed in terms of average response time and request per second. Credit goes to Event Looping mechanism being used. Node.js can handle thousands of concurrent connections and more concurrent inputs and outputs than java.

Node.js is implemented by big giants of software industry Walmart, Groupon, PayPal and provided positive feedback and experienced great results.

A report by Forrester ResearchJavaScript as an end to end web development language in general along with the integration of server-side Node.js runtime environment seems to be a massive and deadly combination for web development and they are setting the next generation  platform for "the biggest shift in enterprise development in more than a decade,"

 As per Stack Overflow Developers Survey Result - 2016, JavaScript is leading by 90.5% in Front-End Technologies and 54.5 % in Back-End Technologies.

img3311.png

To build next-generation applications, factors to be considered in choosing best JavaScript Framework Are Scalability, Community Support, Learning Curve, Enterprise Readiness, Performance, Testability and Future Orientation.

Case Study - PayPal (Switch from Java to JavaScript)

PayPal is the most popular online payment systems. PayPal decided to move from Java to JavaScript from Front-End to Back-End. They used Node.js, Kraken.js and Grunt as Task runner to achieve this.

They started in January 2013 and spend few months in setting infrastructure for node.js. At that time, they had only five engineers for Java application. From that, two of their teammate's engineers had started working together on the parallel node.js app to analyze its response. In early June they developed the application with same functionality with a smaller team. To compare the results, they ran the same set of functional test cases on both the applications (One developed in Java and other in JavaScript). The node.js app was:

  • Development and testing effort reduced significantly.
  • Lines of code is reduced to one third.
  • Developed and completed with 40% fewer files.

Outcome after doing the performance test was: -

  • Almost double the number of requests per second vs. the Java application.It was a big success. 
  • Around 35% decrease was recorded in the average response time for the same web page. This resulted in the pages being served almost 200msfaster. It was a big performance improvement. 

Typical Myths about JavaScript

  • JavaScript is subset of Java or Java == JavaScript. Can we say Car == Carpet? No
  • People think they can use JavaScript without learning it. Mastering JavaScript requires sophisticated programming skills.
  • JavaScript is not powerful. ES6 brought major changes in JavaScript to make it powerful and release of tons of JavaScript enabled framework make it a strong player.
  • Most people think JavaScript as a Browser Language. Truth is it is also used as a Back-End language using Node.js, Helps in creating mobile apps. It's a Full-Stack web framework.

Challenges

  • The biggest challenge in JavaScript and open source world is to keep an eye on regular updates with frequent releases. For production environment project it could be a big risk. Google's angular1 to angular2 is the biggest example over here.
  • Skills availability and code maintainability due to multiple dependent APIs could be another potential challenge if we adopt JavaScript enabled frameworks and libraries frequently.
  • No clear-cut standard guidelines available for Security , Build deployment mechanism, Caching Strategies, Load balancing, Data modelling, Server side business logic handling etc. which is the primary key for any end to end enterprise application development

Recommendations

  • Based on above details we should be very careful before we adopt any specific JavaScript framework or UI library. Version stability, market credentials, expert reviews and industry acceptance should be identified properly.
  • For customer facing portals, Responsive web design based applications, Online applications like gaming, shopping cart etc. along with Mobile based applications I will strongly recommend use of JavaScript enabled framework and APIs. However in case of enterprise application we should be limiting its usage as long as they really add greater business value.

References


December 6, 2016

APIs for Every Business

  Sometime ago, a bunch of guys thought of renting a car for the first time in their life and travel from London to Isle of Skye, Scotland during the Christmas weekend. They did a random search, found only 1 renter who was available; so paid a premium, got a black Ford Focus and embarked. During the journey, the car broke down and since there is no business during Christmas, it took almost 2 days to get a replacement car while stranded in a nearby youth hostel. Since the provider was a web-site (agent), there was a chain of calls to get to the car replacement agency.

Consider this scenario instead - Those bunch of guys posted their requirement on digital media and in response, multiple sellers (renters, agencies, brokers) poured in with their offerings with messages on how their services are “different and better”.

Additionally, an app provides a neat checklist and alerts - car’s condition based on the different sensors and simple list of phone numbers to call with an instant response time for any situation (from fender benders to something serious).

Now post their return from the first trip, the word spread about the exciting and ‘successful’ journey and those bunch of guys increased from 5 to 7. They planned their next trip to Wales. This time they also called-in multiple providers, in addition to the web-search to ensure they had a good serviced vehicle. They finally settled with a better overall deal. They got a Vauxhall Zafira and the trip was fine till one of the tyres burst while climbing a mount. This time they could replace it with the spare tyre but found a new situation - they had run out of fuel. A kind local - the only visible local in that remote mountain helped out with a can of gasoline and the journey continued.

Both these trips though a decade old were quite ordinary and commonly faced by consumers even today. The new scenario and the app would have been a totally true customer experience.

The above illustration is to drive home a simple point - the consumer needs to be at the center and sellers should compete for their business. That’s the case for intention economy (Doc Searls coined this a decade back and followed with a book When customers take charge). Other examples include a patient in need of a particular therapist with certain personal requirements, an auto repairer looking for a specific part not available with manufacturer, a traveler looking for a multi country itinerary including visas, a person looking for event-manager for a wedding or birthday celebrations and so on. Even in current times, buyers sweat out in finding the right products and services, while businesses spend their effort on marketing, generating leads and “capturing” the customer. As Searls points out, businesses still act in “silos” and not integrated for consumer needs.

The IoT ecosystem, providing intelligent and useful information (diagnosing car sensors, time, place and behavior assisting the consumer in the above example) takes the form of ambient intelligence (AmI). AmI examples with relevant to Infosys clients include a telco diversifying in home automation and security; a healthcare provider integrating payers, life science devices through medical sensors and giving a post-surgical care to a member; a shopping mall or large retailer integrating banking services, social media and Wi-Fi provider in creating an ecosystem to improve customer revisits and loyalty; utilities managing the home environment and proactively and actively assisting during weather outages, vacations and disasters.

We, at Infosys API economy practice, have constructed a set of frameworks and business APIs, combining the consumer winning concepts of Ambient Intelligence and Intention Economy. For instance, APIs for integrating utility outages and energy savings through social channels, APIs for changing provider for a mobile user, APIs for basic information on rates, products, order-status; and APIs for Digital Wallet (easy for a consumer bank to subscribe to any of the popular and regional digital payment channels).

We have also created a PAAS to build these APIs as Microservices - Infosys Cornerstone Platform. The objective is to give our clients to build relevant API Economies or business platforms (e.g. the bringing riders and drivers through a popular mobile app, bring media contributers and viewers through a media distribution internet channel and software driven automobiles). These industry leading concepts can be applied in traditional businesses and their enterprises where producers and consumers can come together and everyone is able to monetize, get the best service and value for money.

What’s your API Economy strategy? What are the concepts your teams are working on to surf the next wave in Digital businesses?

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter


Categories