September 11, 2014
Future of JS – As Discussed in Barcelona
I was keen to get a “vision of JS’s future” directly from the people who call the shots. And it’s always helpful to step away from everyday work and broaden one’s understanding the current state of JS and Web technologies.
The event was well-executed with balanced time for talks and coffee breaks. Evening meetups in hip bars and, during the day, long lunches (yes, it’s Spain and they take their siestas seriously) provided ample opportunities for informal communication amongst participants, organizers and speakers, including a great wrap-up party in one of the best night clubs in Barcelona.
Reginald Braithwaite on Functional Programming and OOP
Reginald’s talk emphasized JS’s inherent minimalism. The language doesn’t contain ready functional constructs or concepts and doesn’t force us to use a functional approach, but has enough tools for developers to code in a functional style if they prefer (functions as first-class entities). The same with OOP – JS doesn’t support all the concepts of classical OOP, but Reginald showed how we can emulate them using objects and prototypal inheritance.
Reginald also explained the idea of creating modular programs based on functions, thereby making code more reliable and reusable. According to this approach a program consists of two groups of functions: ones that implement business logic, main building blocks of an application; and service functions (composers, transformers) – general-purpose routines applied to the business logic blocks or to another service functions (they are going to be the same for different applications). For this approach to be successfully implemented the business logic functions have to be properly isolated and encapsulated.
Jeremy Ashkenas on Using JS in Commercial Projects
Patrick Dubroy on ES6
Patrick toured us through its new features with an emphasis on how to use all these goodies just now when most browsers don’t fully support them. While such features as new methods of API can be easily polyfilled, the new language syntax and constructions require more cunning approaches. Enter the compiler Traceur. It takes code containing new ES6 features and transforms it to ES5 (or even ES3) compatible code. Patrick also demonstrated, through examples, exactly how transformations from ES6 to ES5 are done, from elementary ones like the => (lambda) operator to more complex stuff like generators.
Jaume Sanchez on the new Web Audio API
Jaume explained its main idea and constituent concepts. Web Audio (http://www.w3.org/TR/webaudio) enables the mixing, processing, and filtering tasks that are found in modern desktop audio production applications. The model of Audio Nodes – audio processing nodes connected into the processing net (or graph) – is the key concept of the Web Audio API.
Martin Naumann on Web Components
Martin described the use of Web components to build modular Web applications. The coolest thing about Web components is that developers no longer need specialized frameworks and tools (like angular directives) or components built with other languages and technologies (for instance, Java applets) to create reusable, well-isolated, reliable widgets for Web applications. Standardized technologies like Shadow DOM and custom HTML elements can be used instead.
Pete Hunt on the Virtual DOM
Peter presented the virtual DOM as an alternative approach of organizing data binding in situations where current approaches were not ideal from a performance perspective. The classical implementation of data binding is based on the key/value collections observation (Ember, Knockout). The main competitor of this approach is dirty checking (Angular). The virtual DOM bumps performance while working effectively with the data binding update history: the current state of bound UI elements is determined as a collection of changesets applied to their initial state.
Matthew Podwysocki on Event-based Programming
I came away feeling that the future of JS is filled with promise, excited to get back to work!