SlideShare a Scribd company logo
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

More Related Content

PPTX
Ionic Framework - get up and running to build hybrid mobile apps
PDF
Creating Island Tracker - Xamarin, Azure Functions, Table Storage, & More
PPTX
Hybrid vs. Native app - Ionic Framework with AngularJS
PPTX
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
PDF
Workshop Ionic Framework - CC FE & UX
PDF
Building Mobile Apps with Cordova , AngularJS and Ionic
PDF
Ionic Framework
PPTX
phonegap with angular js for freshers
Ionic Framework - get up and running to build hybrid mobile apps
Creating Island Tracker - Xamarin, Azure Functions, Table Storage, & More
Hybrid vs. Native app - Ionic Framework with AngularJS
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
Workshop Ionic Framework - CC FE & UX
Building Mobile Apps with Cordova , AngularJS and Ionic
Ionic Framework
phonegap with angular js for freshers

What's hot (20)

PDF
Ionic framework one day training
PDF
Xamarin y MS Azure | Cognitive Services
PDF
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K...
PPTX
Typescript 102 angular and type script
PPTX
Demand driven applications with om.next and react native
PDF
Experiences building apps with React Native @UtrechtJS May 2016
PDF
Creating an hybrid app in minutes with Ionic Framework
PPTX
Mobile Applications with Angular 4 and Ionic 3
PPTX
Introduction to Ionic framework
PPTX
Mobile native-hacks
PDF
Creating mobile apps - an introduction to Ionic (Engage 2016)
PDF
Cross Platform Mobile Apps with the Ionic Framework
PPT
Ionic Framework
PPTX
Introduction to the Ionic Framework
PDF
Ionic Framework
PPTX
Hybrid Mobile Development - Overview and Intro to Cordova/Ionic Framework
ODP
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
PDF
React Native in a nutshell
PPTX
Hybrid app in ionic framework overview
PDF
Hybrid Apps with Angular & Ionic Framework
Ionic framework one day training
Xamarin y MS Azure | Cognitive Services
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K...
Typescript 102 angular and type script
Demand driven applications with om.next and react native
Experiences building apps with React Native @UtrechtJS May 2016
Creating an hybrid app in minutes with Ionic Framework
Mobile Applications with Angular 4 and Ionic 3
Introduction to Ionic framework
Mobile native-hacks
Creating mobile apps - an introduction to Ionic (Engage 2016)
Cross Platform Mobile Apps with the Ionic Framework
Ionic Framework
Introduction to the Ionic Framework
Ionic Framework
Hybrid Mobile Development - Overview and Intro to Cordova/Ionic Framework
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
React Native in a nutshell
Hybrid app in ionic framework overview
Hybrid Apps with Angular & Ionic Framework
Ad

Similar to Universal Applications with Universal JavaScript (20)

PDF
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
PDF
openMIC barcamp 11.02.2010
PPTX
Front End Development | Introduction
PDF
Front-end. Global domination
PDF
Frontend. Global domination.
PDF
Building cross platform web apps
PDF
HTML5 Can't Do That
PPTX
12 Frameworks for Mobile Hybrid Apps
PPT
Titanium Overview (Mobile March 2011)
PPT
Phonegap android
PPTX
The Javascript Ecosystem
PPTX
Cross-Platform Development using Angulr JS in Visual Studio
PDF
Top 10 Best Web Development Technologies
PPTX
Cross mobility
PPTX
phonegap_101
PPTX
Cross Platform Mobile Technologies
PDF
Service worker API
PPTX
React Native And Its Ecosystem Presentation
PDF
.NET Core on Mac
PDF
Frontend Developer Roadmap PDF By Scholarhat
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
openMIC barcamp 11.02.2010
Front End Development | Introduction
Front-end. Global domination
Frontend. Global domination.
Building cross platform web apps
HTML5 Can't Do That
12 Frameworks for Mobile Hybrid Apps
Titanium Overview (Mobile March 2011)
Phonegap android
The Javascript Ecosystem
Cross-Platform Development using Angulr JS in Visual Studio
Top 10 Best Web Development Technologies
Cross mobility
phonegap_101
Cross Platform Mobile Technologies
Service worker API
React Native And Its Ecosystem Presentation
.NET Core on Mac
Frontend Developer Roadmap PDF By Scholarhat
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
KodekX | Application Modernization Development
PDF
Empathic Computing: Creating Shared Understanding
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Approach and Philosophy of On baking technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Spectral efficient network and resource selection model in 5G networks
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Understanding_Digital_Forensics_Presentation.pptx
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
KodekX | Application Modernization Development
Empathic Computing: Creating Shared Understanding
Network Security Unit 5.pdf for BCA BBA.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation_ Review paper, used for researhc scholars
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
Programs and apps: productivity, graphics, security and other tools
Approach and Philosophy of On baking technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
MIND Revenue Release Quarter 2 2025 Press Release
Spectral efficient network and resource selection model in 5G networks

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