Tuesday, November 04, 2014

Bleeding Edge Web and Mobile Technologies

Where are mobile and web technologies going?  How are they going to impact your company, project, mobile app and career?  In this article my colleague, Peter Rogers, the Chief Technologist of Studio 13 at Cognizant, shares the latest developments in mobile and web technologies for the purpose of guiding you through this maze of ever changing technologies.  Put your geek hat on and enjoy!  Please forgive his Englishness and occasional use of words like, "whilst."

Peter Rogers
The NG-Europe event in Paris was truly exciting because it gave a glimpse of the future of the Web. It was interesting to see Famo.us turn up and announce that an Angular 2 / Famo.us binding will launch at the same time as Angular 2 finally arrives. Angular and Famo.us certainly complement each other well. Angular lacks a dedicated graphical library that does not rely on CSS and Famo.us lacks a framework. At Studio 13 we have starting building our first product in Famo.us / Angular (F/A) and whilst it was a struggle at first due to the out of date documentation , the result was really very impressive due to the smooth animation and physics.

Angular 2 is going to be based on ECMAScript 6 but rather than wait for that standard to be finally supported in web browsers, they will use the Traceur compiler to convert it into the browser-friendly format of ECMAScript 5.1. I have to ask how this will affect the use of CoffeeScript with Angular and I do hope they give an alternative version that can use CoffeeScript or make sure it is still compatible. The decision to update the version of JavaScript is purely based on a new requirement for JavaScript Classes which are present in the 6th version of the library. The common Angular concepts of Scope, Controllers and Directive Definition Objects, have all been thrown out and replaced (interestingly) with JavaScript classes.

What was also interesting was Google unveiling AtScript (http://sdtimes.com/atscript-googles-new-superset-javascript-runtime/) which is a new (optional) superset JavaScript runtime written into Angular 2 and supporting data types. It offers annotations and introspection, and sits on top of TypeScript which offers the support for data types. This sits on top of ECMAScript 6 which offers classes and modules, which in turn can compile into ECMAScript 5.1 using Traceur. This all combines to offer the following: a standalone type system static analysis tool; more support for generics in the runtime type system; source maps; and most importantly the option of ECMAScript 5 output for browser compatibility.

Whilst talking about ECMAScript 6 classes it is worth mentioning that JavaScript purists (like myself) question the forwarding of psudo-classical inheritance within the language. In other words, why should JavaScript pretend to be Java? It should play to its strengths of prototypal inheritance. There has been great debate about this Class feature and there are notably no web browsers which currently support it yet. ECMAScript 6 is not even out yet but ECMAScript 7 is in the process of being standardised with very useful features like Object.observe() which will also feature heavily in the future of Angular in order to replace the Digest Loop with a native mechanism. HTML 5.1 and Custom Elements are also looming on the horizon.

It was interesting to see a guy who has written a Famo.us / Angular library which offers a compromise between declarative CSS based animation, declarative Famo.us/Angular directives and imperative JavaScript control. The result is a JavaScript based hybrid action sheet which combined both imperative and declarative animations. This gives you the ultimate control of programmable animations. As he pointed out the one thing that is holding back the mobile web is the ability to offer a user experience that is on a par with native apps. He has released his library as open source and it will be interesting to see how the community responds to it. The current theme being touted by Famo.us is Mixed Mode Rendering which can combine WebGL (3D) with standard  DOM based rendering. This has the interesting benefit of being able to add 3D into existing web interfaces without choosing one over the other, or having to have one inside a small window.

If Angular 2 can combine ECMAScript 6 (to offer a class based programming style), AtScript (to offer JavaScript data types) and an effective Famo.us integration (for high end rendering) the future of the Web and indeed the Mobile Web could be very interesting. We have been able to create a mobile web based application that can run on a minimum of an iPhone 5S running iOS 7 which runs with very little noticeable difference to a Native iOS App. We have been able to include physics, smooth animations but best of all gesture based animations. This enables you to take mobile user experience design to the next level and it is of critical importance to being able to allow a user to interact with a system faster. Why click everywhere when you can gesture to reveal new parts of the web page seamlessly.

The next generation of mobile web user experience (powered by libraries such as Famo.us / Angular) are going to offer exciting new possibilities for B2E applications that want to mask complex and tiresomely interactions with back end systems. Studio 13 is already experimenting with the art of the possible in some complex real-world engagements . This drives up employee engagement and reduces time overhead which in turn saves on operational expenditure. It also allows mobile web user experience to offer competitive B2C applications that include Gamification and are not dwarfed by native Apps.

Now that HTML 5.0 is finally a W3C recommendation (http://www.w3.org/blog/news/archives/4167) and the focus has shifted towards strengthening the parts of the Open Web Platform that developers most urgently need for success (http://www.w3.org/blog/2014/10/application-foundations-for-the-open-web-platform/) then there will finally be solutions for world class UX, which means it won’t have to play second fiddle to native Apps ever again.

Kevin Benedict
Writer, Speaker, Senior Analyst
Digital Transformation, EBA, Center for the Future of Work Cognizant
View my profile on LinkedIn
Learn about mobile strategies at MobileEnterpriseStrategies.com
Follow me on Twitter @krbenedict
Subscribe to Kevin'sYouTube Channel
Join the Linkedin Group Strategic Enterprise Mobility
Join the Google+ Community Mobile Enterprise Strategies
Recommended Strategy Book Code Halos
Recommended iPad App Code Halos for iPads

***Full Disclosure: These are my personal opinions. No company is silly enough to claim them. I am a mobility and digital transformation analyst, consultant and writer. I work with and have worked with many of the companies mentioned in my articles.