Universal Applications with Universal JavaScript

Thomas Joseph
Thomas JosephDigital Marketing Technologist | Adobe Marketing Cloud & Java Stack at SapientNitro
Universal Applications
with
Universal JavaScript
Today JavaScript is a ubiquitous runtime. JavaScript is everywhere - from
Browser, server side, embedded device, mobile and gaming. JavaScript can be
leveraged to write once and run everywhere or have a consistent programming style,
and drive consistent experience across multiple channels – browser, Servers side, or
Native Mobile apps.
Thomas Joseph
Universal JavaScript
JavaScript is everywhere!
Isomorphic = Universal
Universal JavaScript are
environment agnostic
or
adapted to environment
Environment agnostic
 Does not depend on platform specific properties, browser (window), server
(process.env, req.cookies) or a device.
 Example (Handlebars)
var templateFn = Handlebars.compile(template);
var html = templateFn(data);
var template =
‘<h1>{{title}}</h1>
<ul>
{{#names}}
<li>{{name}}</li>
{{/names}}
</ul>’
var data = {
"title": "Story",
"names": [
{"name":
"Tarzan"},
{"name":
"Jane"}
]
}
<h1>Story</h1>
<ul>
<li>Tarzan</li>
<li>Jane</ul>
</ul>
Adapted to environment
 Provides adaptors for accessing environment-specific properties so
module can expose as single API.
 Example:
 console.log(‘Hello World’);
 app.path API
 window.location.pathname (Browser)
 req.path (Server)
JavaScript Engine
THE RUNTIME FOR A PLATFORM
JavaScript Runtimes – Browser
 V8 (Chrome)
 Chakra (IE)
 SpiderMonkey (FireFox)
 JavaScriptCore / Nitro (Safari)
JavaScript Runtimes – Server Side
 NodeJS
 Nashorn (Java)
 Rhino (Java)
 Jurassic (.NET)
 V8.NET (.NET)
 J2V8 (Java)
JavaScript Runtimes – Mobile (Native)
 V8 (Android)
 Chakra (Windows)
 JavaScriptCore / Nitro (iOS)
JavaScript Runtimes – Embedded
 V8 – Raspberry Pi
JavaScript Runtime
Build It or Port It!
Why Universal
JavaScript
IS RELEVANT FOR APPLICATION DEVELOPMENT?
In pursuit of the Holy Grail
Thick Client / Thin Server
 Applet
 Flash
 SPA
Thin Client / Thick Server
 Servlets / PHP etc
 AJAX
Universal JavaScript Apps
o Performance
• initial page load speed
o SEO
• Crawlable applications (vs SPA)
o Maintainability
• Reduce code duplication
o Flexibility
• Run code where you want*
o Learning Curve?
• Learn once, Write anywhere!
Control the spectrum of
shared logic
 Small bits of view layer
 Few abstractions
 Simple
 Entire view layer & app logic
 Many abstractions
 Complex
Most of the libraries are ready for it!
Who are using it?
Developing Universal
Apps with JavaScript
(AND FRIENDS)
Hack Time
Write Once, Run Anywhere
What about…?
Hybrid Apps
(JavaScript + HTML5 + CSS3)
 Primarily targets Mobiles (cross-
platform) for Native (like) apps
 Uses the Web View to run on Mobile
 Example:
 PhoneGap / Cordova
 Ionic
 Onsen UI
 Intel XDK
 Sencha Touch
 Kendo UI (telerik)
 JQuery Mobile
 Mobile Angular UI
Appecerator Titanium
(JavaScript + XML + CSS)
 Targets Mobiles (cross-platform) for
Native apps
 Not for Server Side or Browser – not
truly universal
 Runs on native JS engine of the platform
 “Appcelerator Titanium is a free and
open source application development
platform that lets you create cross
platform native mobile applications
using existing Javascript skills. ”
 “The Appcelerator Platform includes
SDKs, services and tools for creating,
testing, and managing your mobile and
cloud applications”
Hybrid Apps vs Native Apps
 Performance
 Graphic Capabilities (& Speed)
 Device Capabilities – Geolocation, Addressbook, Camera etc.
 Native Looks
 Learning Curve
 Cost
 Time to Market
Mobile App development is a pain
(and costly)
 One App – Different Development
 Different teams build the same thing using different languages, frameworks & libraries.
 Code, Build and maintain the same app across different platforms: iOS (Phone/Tablet),
Android (Phone/Tablet),Web (Desktop/Phone)
 Feature Parity
 Hard to maintain feature parity & consistent terminology.
 App Ownership
 Impossible to be an expert in all technologies and “own” something in all products
there is no one silver bullet
Write Once, Run Anywhere
Learn Once, Write Anywhere
LOWA Universal JavaScript
Frameworks
 React + React Native
 Angular 2 (+ friends)
React
+
React Native
“
”
React Native enables you to build world-class application experiences
on native platforms using a consistent developer experience based
on JavaScript and React. The focus of React Native is on developer
efficiency across all the platforms you care about — learn once, write
anywhere. Facebook uses React Native in multiple production apps
and will continue investing in React Native.
HTTPS://FACEBOOK.GITHUB.IO/REACT-NATIVE/
React Native Rendering
 Virtual DOM manipulation instead of
physical DOM
 React Native runtime translates virtual
DOM rendering to native OS UI
components.
Angular 2
“
”
Learning Angular 2 gives you the tools you need to build apps for
desktop, mobile web, Android, and iOS. Angular Universal provides
for server-side rendering for fast initial views on mobile web. Ionic
and NativeScript let you build hybrid and native UI mobile apps. Web
worker support keeps your app UI fully responsive no matter how
heavy the load
HTTPS://ANGULAR.IO/FEATURES.HTML
Angular 2 architecture
 Separates Application Core & Rendering
 Can be separate files or processes
 Possibility of variety of renderers for several
platforms
 Browser (default)
 Server Side (Angular U)
 Hybird Apps (Ionic)
 Native Apps
 NativeScript
 React Native
Angular 2 React Handlebar Dust
Browser    
SERVER
NodeJS    
Java    
.NET    
MOBILE NATIVE
iOS    
Android    
Windows    
Universal JavaScript Libraries

=
Opportunities!
Thank You
1 of 39

Recommended

Ionic Framework - get up and running to build hybrid mobile apps by
Ionic Framework - get up and running to build hybrid mobile appsIonic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsAndreas Sahle
1.2K views29 slides
Creating Island Tracker - Xamarin, Azure Functions, Table Storage, & More by
Creating Island Tracker - Xamarin, Azure Functions, Table Storage, & MoreCreating Island Tracker - Xamarin, Azure Functions, Table Storage, & More
Creating Island Tracker - Xamarin, Azure Functions, Table Storage, & MoreJames Montemagno
232 views41 slides
Hybrid vs. Native app - Ionic Framework with AngularJS by
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSZvika Epstein
743 views29 slides
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod... by
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...Codemotion
589 views41 slides
Workshop Ionic Framework - CC FE & UX by
Workshop Ionic Framework - CC FE & UXWorkshop Ionic Framework - CC FE & UX
Workshop Ionic Framework - CC FE & UXJWORKS powered by Ordina
661 views46 slides
Building Mobile Apps with Cordova , AngularJS and Ionic by
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicKadhem Soltani
7.1K views36 slides

More Related Content

What's hot

Ionic framework one day training by
Ionic framework one day trainingIonic framework one day training
Ionic framework one day trainingTroy Miles
8K views99 slides
Xamarin y MS Azure | Cognitive Services by
Xamarin y MS Azure | Cognitive ServicesXamarin y MS Azure | Cognitive Services
Xamarin y MS Azure | Cognitive ServicesVicente Gerardo Guzman Lucio
771 views32 slides
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K... by
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K..."Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K...
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K...Tech in Asia ID
308 views73 slides
Typescript 102 angular and type script by
Typescript 102   angular and type scriptTypescript 102   angular and type script
Typescript 102 angular and type scriptBob German
3.2K views17 slides
Cross-Platform Mobile Development with Ionic Framework and Angular by
Cross-Platform Mobile Development with Ionic Framework and AngularCross-Platform Mobile Development with Ionic Framework and Angular
Cross-Platform Mobile Development with Ionic Framework and AngularMovel
1.9K views65 slides
Demand driven applications with om.next and react native by
Demand driven applications with om.next and react nativeDemand driven applications with om.next and react native
Demand driven applications with om.next and react nativedvcrn
2K views22 slides

What's hot(20)

Ionic framework one day training by Troy Miles
Ionic framework one day trainingIonic framework one day training
Ionic framework one day training
Troy Miles8K views
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K... by Tech in Asia ID
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K..."Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K...
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K...
Tech in Asia ID308 views
Typescript 102 angular and type script by Bob German
Typescript 102   angular and type scriptTypescript 102   angular and type script
Typescript 102 angular and type script
Bob German3.2K views
Cross-Platform Mobile Development with Ionic Framework and Angular by Movel
Cross-Platform Mobile Development with Ionic Framework and AngularCross-Platform Mobile Development with Ionic Framework and Angular
Cross-Platform Mobile Development with Ionic Framework and Angular
Movel1.9K views
Demand driven applications with om.next and react native by dvcrn
Demand driven applications with om.next and react nativeDemand driven applications with om.next and react native
Demand driven applications with om.next and react native
dvcrn2K views
Experiences building apps with React Native @UtrechtJS May 2016 by Adrian Philipp
Experiences building apps with React Native @UtrechtJS May 2016Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016
Adrian Philipp1.1K views
Creating an hybrid app in minutes with Ionic Framework by Julien Renaux
Creating an hybrid app in minutes with Ionic FrameworkCreating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic Framework
Julien Renaux9.8K views
Introduction to Ionic framework by Shyjal Raazi
Introduction to Ionic frameworkIntroduction to Ionic framework
Introduction to Ionic framework
Shyjal Raazi8.6K views
Creating mobile apps - an introduction to Ionic (Engage 2016) by Mark Leusink
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
Mark Leusink1.4K views
Cross Platform Mobile Apps with the Ionic Framework by Troy Miles
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
Troy Miles6.4K views
Introduction to the Ionic Framework by rrjohnson85
Introduction to the Ionic FrameworkIntroduction to the Ionic Framework
Introduction to the Ionic Framework
rrjohnson854.7K views
Hybrid Mobile Development - Overview and Intro to Cordova/Ionic Framework by Rashmika Nawaratne
Hybrid Mobile Development - Overview and Intro to Cordova/Ionic FrameworkHybrid Mobile Development - Overview and Intro to Cordova/Ionic Framework
Hybrid Mobile Development - Overview and Intro to Cordova/Ionic Framework
Rashmika Nawaratne4.6K views
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015 by Mickael Istria
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
Mickael Istria1.1K views
React Native in a nutshell by Brainhub
React Native in a nutshellReact Native in a nutshell
React Native in a nutshell
Brainhub718 views
Hybrid app in ionic framework overview by Sanket Devlekar
Hybrid app in ionic framework overviewHybrid app in ionic framework overview
Hybrid app in ionic framework overview
Sanket Devlekar2K views

Similar to Universal Applications with Universal JavaScript

NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular by
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularTodd Anglin
3K views216 slides
openMIC barcamp 11.02.2010 by
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010Patrick Lauke
875 views65 slides
Front End Development | Introduction by
Front End Development | IntroductionFront End Development | Introduction
Front End Development | IntroductionJohnTaieb
10.5K views37 slides
Front-end. Global domination by
Front-end. Global dominationFront-end. Global domination
Front-end. Global dominationStfalcon Meetups
203 views45 slides
Frontend. Global domination. by
Frontend. Global domination.Frontend. Global domination.
Frontend. Global domination.Андрей Вандакуров
661 views45 slides
Building cross platform web apps by
Building cross platform web appsBuilding cross platform web apps
Building cross platform web appsITEM
64 views53 slides

Similar to Universal Applications with Universal JavaScript(20)

NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular by Todd Anglin
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
Todd Anglin3K views
openMIC barcamp 11.02.2010 by Patrick Lauke
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010
Patrick Lauke875 views
Front End Development | Introduction by JohnTaieb
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb10.5K views
Building cross platform web apps by ITEM
Building cross platform web appsBuilding cross platform web apps
Building cross platform web apps
ITEM64 views
12 Frameworks for Mobile Hybrid Apps by Filipe Lima
12 Frameworks for Mobile Hybrid Apps12 Frameworks for Mobile Hybrid Apps
12 Frameworks for Mobile Hybrid Apps
Filipe Lima64 views
Titanium Overview (Mobile March 2011) by Kevin Whinnery
Titanium Overview (Mobile March 2011)Titanium Overview (Mobile March 2011)
Titanium Overview (Mobile March 2011)
Kevin Whinnery3.5K views
Phonegap android by umesh patil
Phonegap androidPhonegap android
Phonegap android
umesh patil254 views
Cross-Platform Development using Angulr JS in Visual Studio by Mizanur Sarker
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
Mizanur Sarker414 views
Get Ahead with HTML5 on Moible by markuskobler
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moible
markuskobler442 views

Recently uploaded

Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...ShapeBlue
74 views17 slides
Microsoft Power Platform.pptx by
Microsoft Power Platform.pptxMicrosoft Power Platform.pptx
Microsoft Power Platform.pptxUni Systems S.M.S.A.
74 views38 slides
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...ShapeBlue
97 views28 slides
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... by
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...ShapeBlue
59 views13 slides
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPoolShapeBlue
56 views10 slides
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueShapeBlue
68 views13 slides

Recently uploaded(20)

Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue74 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue97 views
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... by ShapeBlue
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
ShapeBlue59 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue56 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue68 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson142 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue75 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue113 views
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ by ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue58 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays49 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10110 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker50 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue121 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue154 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue86 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue63 views

Universal Applications with Universal JavaScript

  • 1. Universal Applications with Universal JavaScript Today JavaScript is a ubiquitous runtime. JavaScript is everywhere - from Browser, server side, embedded device, mobile and gaming. JavaScript can be leveraged to write once and run everywhere or have a consistent programming style, and drive consistent experience across multiple channels – browser, Servers side, or Native Mobile apps. Thomas Joseph
  • 5. Universal JavaScript are environment agnostic or adapted to environment
  • 6. Environment agnostic  Does not depend on platform specific properties, browser (window), server (process.env, req.cookies) or a device.  Example (Handlebars) var templateFn = Handlebars.compile(template); var html = templateFn(data); var template = ‘<h1>{{title}}</h1> <ul> {{#names}} <li>{{name}}</li> {{/names}} </ul>’ var data = { "title": "Story", "names": [ {"name": "Tarzan"}, {"name": "Jane"} ] } <h1>Story</h1> <ul> <li>Tarzan</li> <li>Jane</ul> </ul>
  • 7. Adapted to environment  Provides adaptors for accessing environment-specific properties so module can expose as single API.  Example:  console.log(‘Hello World’);  app.path API  window.location.pathname (Browser)  req.path (Server)
  • 9. JavaScript Runtimes – Browser  V8 (Chrome)  Chakra (IE)  SpiderMonkey (FireFox)  JavaScriptCore / Nitro (Safari)
  • 10. JavaScript Runtimes – Server Side  NodeJS  Nashorn (Java)  Rhino (Java)  Jurassic (.NET)  V8.NET (.NET)  J2V8 (Java)
  • 11. JavaScript Runtimes – Mobile (Native)  V8 (Android)  Chakra (Windows)  JavaScriptCore / Nitro (iOS)
  • 12. JavaScript Runtimes – Embedded  V8 – Raspberry Pi
  • 14. Why Universal JavaScript IS RELEVANT FOR APPLICATION DEVELOPMENT?
  • 15. In pursuit of the Holy Grail Thick Client / Thin Server  Applet  Flash  SPA Thin Client / Thick Server  Servlets / PHP etc  AJAX Universal JavaScript Apps
  • 16. o Performance • initial page load speed o SEO • Crawlable applications (vs SPA) o Maintainability • Reduce code duplication o Flexibility • Run code where you want* o Learning Curve? • Learn once, Write anywhere!
  • 17. Control the spectrum of shared logic  Small bits of view layer  Few abstractions  Simple  Entire view layer & app logic  Many abstractions  Complex
  • 18. Most of the libraries are ready for it!
  • 20. Developing Universal Apps with JavaScript (AND FRIENDS)
  • 22. Write Once, Run Anywhere
  • 24. Hybrid Apps (JavaScript + HTML5 + CSS3)  Primarily targets Mobiles (cross- platform) for Native (like) apps  Uses the Web View to run on Mobile  Example:  PhoneGap / Cordova  Ionic  Onsen UI  Intel XDK  Sencha Touch  Kendo UI (telerik)  JQuery Mobile  Mobile Angular UI
  • 25. Appecerator Titanium (JavaScript + XML + CSS)  Targets Mobiles (cross-platform) for Native apps  Not for Server Side or Browser – not truly universal  Runs on native JS engine of the platform  “Appcelerator Titanium is a free and open source application development platform that lets you create cross platform native mobile applications using existing Javascript skills. ”  “The Appcelerator Platform includes SDKs, services and tools for creating, testing, and managing your mobile and cloud applications”
  • 26. Hybrid Apps vs Native Apps  Performance  Graphic Capabilities (& Speed)  Device Capabilities – Geolocation, Addressbook, Camera etc.  Native Looks  Learning Curve  Cost  Time to Market
  • 27. Mobile App development is a pain (and costly)  One App – Different Development  Different teams build the same thing using different languages, frameworks & libraries.  Code, Build and maintain the same app across different platforms: iOS (Phone/Tablet), Android (Phone/Tablet),Web (Desktop/Phone)  Feature Parity  Hard to maintain feature parity & consistent terminology.  App Ownership  Impossible to be an expert in all technologies and “own” something in all products
  • 28. there is no one silver bullet
  • 29. Write Once, Run Anywhere Learn Once, Write Anywhere
  • 30. LOWA Universal JavaScript Frameworks  React + React Native  Angular 2 (+ friends)
  • 32. “ ” React Native enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about — learn once, write anywhere. Facebook uses React Native in multiple production apps and will continue investing in React Native. HTTPS://FACEBOOK.GITHUB.IO/REACT-NATIVE/
  • 33. React Native Rendering  Virtual DOM manipulation instead of physical DOM  React Native runtime translates virtual DOM rendering to native OS UI components.
  • 35. “ ” Learning Angular 2 gives you the tools you need to build apps for desktop, mobile web, Android, and iOS. Angular Universal provides for server-side rendering for fast initial views on mobile web. Ionic and NativeScript let you build hybrid and native UI mobile apps. Web worker support keeps your app UI fully responsive no matter how heavy the load HTTPS://ANGULAR.IO/FEATURES.HTML
  • 36. Angular 2 architecture  Separates Application Core & Rendering  Can be separate files or processes  Possibility of variety of renderers for several platforms  Browser (default)  Server Side (Angular U)  Hybird Apps (Ionic)  Native Apps  NativeScript  React Native
  • 37. Angular 2 React Handlebar Dust Browser     SERVER NodeJS     Java     .NET     MOBILE NATIVE iOS     Android     Windows     Universal JavaScript Libraries