SlideShare a Scribd company logo
WRITE ONCE, RUN EVERYWHERE
Mike North | Ember Munich #11 | Apr 21, 2016
LEVANTO FINANCIAL
http://bit.ly/ember-munich-electron
Write Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js Munich
What our users need us to build
2
Write Once, Run Everywhere - Ember.js Munich
What we’re sometimes tempted to build
What our users need us to build
Apache Cordova
Media Queries
Small
Medium
Large
Any
Electron
Write Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js Munich
MOBILE WEB BEGINNINGS
2007 2008 2009-2010
2012
Write Once, Run Everywhere - Ember.js Munich
A LOT HAS CHANGED SINCE 2012
SHELF LIFE
Write Once, Run Everywhere - Ember.js Munich
TIMETOTAKE ANOTHER LOOK
Click here for more!
THERE’S ANOTHER REASON…
108.2MB of Swift
Click here to download the native app for this presentation!
Write Once, Run Everywhere - Ember.js Munich
A FIRST-CLASS MOBILE-WEB EXPERIENCE
IS MORE IMPORTANTTHAN EVER!
HOW CAN WE MAKE REACHING ALL OF
THESE DIFFERENT DEVICES EASY?
EMBER.JS
• Opinionated framework, aligned with
web standards
• Focus on productivity
• “SDK for the web”
• Focus on your app, not on debates over
build tools and module loaders
WHAT PEOPLE LOVE ABOUT
• Solid conventions
• Abstractions that scale
• Commitment to fwd compatibility
• Core team must work on real apps
• Addresses the “whole problem”
ADDRESSINGTHE WHOLE PROBLEM
• UI Framework
• Build tools
• Animations
• Talking to an API
• Virtualized Lists
• Plugin Architecture
• Modular Apps
• Ember Inspector
CORDOVA
WebView
Native
App
Application API
XHR
XHR
WebVie
w
Write Once, Run Everywhere - Ember.js Munich
ELECTRON / NW.JS
• Node.js libs available alongside your usual UI libs
• Packages your app with its own Chromium shell
• Lots of native functionality (menu bar, right click menu, etc…)
available
• Distribute your app as a .exe, .app, etc…
HOW DOYOU EMBERTHESETHINGS?
$ ember install ember-electron
$ ember install ember-cli-cordoba
$ ember install ember-cli-materialize
HOW DOYOU EMBERTHESETHINGS?
http://emberaddons.com
LET’S BUILD SOMETHING!
`
ROUTING
application
index
application
posts post
author comments
index
index index
indexindex
/URL:
application
posts
posts/index
application
posts post
author comments
index
index index
indexindex
/posts/URL:
application
post
post/index
application
posts post
author comments
index
index index
indexindex
/post/31URL:
application
post
application
posts post
author comments
index
index index
indexindex
{{outlet}}
/post/31/comments/URL:
application
post
application
posts post
author comments
index
index index
indexindex
post/comments
post/comments/index
/post/31/comments/URL:
CREATE SOME ROUTES
/
/org/123/repos
/org/123/repo/456
activate () Called when router enters the route
beforeModel (transition) First entry validation hook
model (params, transition) Convert URL to a model
afterModel (modelObj, transition) Called after model is resolved
redirect (modelObj, transition) Similar to afterModel
setupController (controller, model) Setup the controller for the current route
renderTemplate (controller, model) Render the template for the current route
deactivate () Called when router leaves route
Promise Aware
ROUTE HOOKS
AMA
COMPONENTS
Write Once, Run Everywhere - Ember.js Munich
LIST OF ORGS
{{#md-card title='Organizations' as |c|}}
{{#c.content}}
{{#md-collection as |c|}}
{{#each model as |org|}}
{{#c.link-to 'org.repos' org.id class='avatar'}}
<img src={{org.iconUrl}} alt="" class='circle'>
<span class="title">{{org.name}}</span>
{{/c.link-to}}
{{/each}}
{{/md-collection}}
{{/c.content}}
{{/md-card}}
AMA
LIQUID FIRE
export default function(){
this.transition(
this.fromRoute('index'),
this.toRoute('org'),
this.use('toLeft'),
this.reverse('toRight')
);
this.transition(
this.fromRoute('org.repos'),
this.toRoute('org.repo'),
this.use('toLeft'),
this.reverse('toRight')
);
}
CORDOVA
Write Once, Run Everywhere - Ember.js Munich
ELECTRON
ELECTRON
ember electron
Start up your electron app using ember-cli dev server
ember electron:package --platform=darwin
Package your app to distribute
ICONS
https://iconverticons.com/online/
ICONS
@sugarpirate_
ember electron:package --platform=darwin 
--icon=/Users/northm/Downloads/pirate.png.hqx
--overwrite
Package your app to distribute
ICONS
RIGHT-CLICK MENU
• An extra event on window: contextmenu
• We can import Electron using require
const remote = require('electron').remote;
const Menu = remote.Menu;
const MenuItem = remote.MenuItem;
const menu = new Menu();
menu.append(new MenuItem({
label: 'MenuItem1',
click() {
Ember.run.next(() => {
console.log('item 1 clicked');
});
}
}));
menu.popup(remote.getCurrentWindow());
OPEN A NEW BROWSER WINDOW
const BrowserWindow =
require('electron').remote.BrowserWindow;
let win = new BrowserWindow({
width: 800,
height: 600,
show: false
});
win.on('closed', function() {
console.log("window was closed");
});
APP ICON BADGES
require('electron').remote.app.dock
.setBadge('123');
require('electron').remote.app.dock
.bounce(‘critical’);
BOUNCINGTHE ICON
…AND WAY MORE…
https://github.com/electron/electron/tree/master/docs/api
WHAT DOES ALLTHIS MEAN?
WHAT DOES ALLTHIS MEAN?
Browsers are evolving from being document views to app platforms
Building for the web is more important than ever
Ember aims to make leveraging third party code and plugins easy
Maximizing focus on what makes your app special === $$$$
THANKS!
RESOURCES
emberconf-state-api.herokuapp.com/api/organizations
OBJECTIVES
Organizations > Repositories > Pulls > Comments
Clickable Breadcrumb Navigation using ember-crumbly
Animations using liquid-fire, including an “explode” from Organization to Repo
http://mike.works/ember-materialize-v1-site/
RESOURCES
http://emberconf-state-api.herokuapp.com/api/organizations
OBJECTIVES
Organizations > Repositories > Pulls > Comments
Clickable Breadcrumb Navigation using ember-crumbly
Animations using liquid-fire, including an “explode” from Organization to Repo
http://mike.works/ember-materialize-v1-site/
KICK OFF
ember new anyember
cd anyember
ember install ember-cli-materialize@mike-north/ember-cli-materialize#v1
ember install liquid-fire
ember install ember-electron
ssh ember@172.30.124.136
SLIDES: 

http://bit.ly/ember-
munich-electron

More Related Content

What's hot (20)

PPT
"Spring Boot. Boot up your development" Сергей Моренец
Fwdays
 
PDF
Flexible UI Components for a Multi-Framework World
Kevin Ball
 
PPTX
Building a REST Service in minutes with Spring Boot
Omri Spector
 
PPTX
Infrastructure as Code
Sascha MĂśllering
 
PPTX
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 
PPTX
Vincent biret azure functions and flow (ottawa)
Vincent Biret
 
PPTX
Vincent biret azure functions and flow (toronto)
Vincent Biret
 
PPTX
Saving Time By Testing With Jest
Ben McCormick
 
PDF
Developing, building, testing and deploying react native apps
Leena N
 
PDF
Fuse integration-services
Christian Posta
 
PPTX
Integration Testing with Selenium
All Things Open
 
KEY
Cloud tools
John McCaffrey
 
PPTX
Quick and Easy Development with Node.js and Couchbase Server
Nic Raboy
 
PDF
Webcomponents are your frameworks best friend
Filip Bruun Bech-Larsen
 
PPTX
Debugging your Way through .NET with Visual Studio 2015
Ido Flatow
 
PPTX
Getting Started with Spring Boot
David Kiss
 
PPTX
Serverless in azure
Veresh Jain
 
PPTX
Microservices with Apache Camel, Docker and Fabric8 v2
Christian Posta
 
PPT
High Availability Perl DBI + MySQL
Steve Purkis
 
PPTX
JustLetMeCode-Final
David Persing
 
"Spring Boot. Boot up your development" Сергей Моренец
Fwdays
 
Flexible UI Components for a Multi-Framework World
Kevin Ball
 
Building a REST Service in minutes with Spring Boot
Omri Spector
 
Infrastructure as Code
Sascha MĂśllering
 
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 
Vincent biret azure functions and flow (ottawa)
Vincent Biret
 
Vincent biret azure functions and flow (toronto)
Vincent Biret
 
Saving Time By Testing With Jest
Ben McCormick
 
Developing, building, testing and deploying react native apps
Leena N
 
Fuse integration-services
Christian Posta
 
Integration Testing with Selenium
All Things Open
 
Cloud tools
John McCaffrey
 
Quick and Easy Development with Node.js and Couchbase Server
Nic Raboy
 
Webcomponents are your frameworks best friend
Filip Bruun Bech-Larsen
 
Debugging your Way through .NET with Visual Studio 2015
Ido Flatow
 
Getting Started with Spring Boot
David Kiss
 
Serverless in azure
Veresh Jain
 
Microservices with Apache Camel, Docker and Fabric8 v2
Christian Posta
 
High Availability Perl DBI + MySQL
Steve Purkis
 
JustLetMeCode-Final
David Persing
 

Viewers also liked (20)

PDF
Development Factory
developmentfactory
 
PDF
Why should the WSO2 App Factory be your choice for Enterprise App Development
WSO2
 
PDF
Is your HR department keeping up?
Infor HCM
 
PPTX
Masa Israel Programs Overview
Masa Israel Journey
 
PPTX
What I learned in my First 9 months of Ember
Sara Raasch
 
PDF
Delivering with ember.js
Andrei Sebastian CĂŽmpean
 
PPT
20120518 mssql table_schema_xml_namespace
LearningTech
 
PDF
electron for emberists
Aidan Nulman
 
PPTX
Velocity spa faster_092116
Manuel Alvarez
 
PDF
Testing ember data transforms
Sara Raasch
 
PDF
Ember Community 2016 - Be the Bark
Matthew Beale
 
PDF
Ember: Guts & Goals
Bob Lail
 
PDF
LA Ember.js Meetup, Jan 2017
Matthew Beale
 
PDF
Nest v. Flat with EmberData
Ryan M Harrison
 
PDF
Developing Single Page Apps with Ember.js
Leo Hernandez
 
PDF
Ember.js the Second Step
Dopin Ninja
 
PDF
Intro to emberjs
Mandy Pao
 
PDF
Ember.js internals backburner.js and rsvp.js
gavinjoyce
 
PDF
Ember.js firebase HTML5 NYC
Brendan O'Hara, MBA
 
PDF
Parse Apps with Ember.js
Matthew Beale
 
Development Factory
developmentfactory
 
Why should the WSO2 App Factory be your choice for Enterprise App Development
WSO2
 
Is your HR department keeping up?
Infor HCM
 
Masa Israel Programs Overview
Masa Israel Journey
 
What I learned in my First 9 months of Ember
Sara Raasch
 
Delivering with ember.js
Andrei Sebastian CĂŽmpean
 
20120518 mssql table_schema_xml_namespace
LearningTech
 
electron for emberists
Aidan Nulman
 
Velocity spa faster_092116
Manuel Alvarez
 
Testing ember data transforms
Sara Raasch
 
Ember Community 2016 - Be the Bark
Matthew Beale
 
Ember: Guts & Goals
Bob Lail
 
LA Ember.js Meetup, Jan 2017
Matthew Beale
 
Nest v. Flat with EmberData
Ryan M Harrison
 
Developing Single Page Apps with Ember.js
Leo Hernandez
 
Ember.js the Second Step
Dopin Ninja
 
Intro to emberjs
Mandy Pao
 
Ember.js internals backburner.js and rsvp.js
gavinjoyce
 
Ember.js firebase HTML5 NYC
Brendan O'Hara, MBA
 
Parse Apps with Ember.js
Matthew Beale
 
Ad

Similar to Write Once, Run Everywhere - Ember.js Munich (20)

PDF
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
George Nguyen
 
PDF
gDayX - Advanced angularjs
gdgvietnam
 
PPTX
Reactive application using meteor
Sapna Upreti
 
PDF
Building a full-stack app with Golang and Google Cloud Platform in one week
Dr. Felix Raab
 
PDF
Architecting an ASP.NET MVC Solution
Andrea Saltarello
 
PPTX
Understanding angular js
Aayush Shrestha
 
PDF
ReactJS vs AngularJS - Head to Head comparison
500Tech
 
PDF
Beginning MEAN Stack
Rob Davarnia
 
PDF
Micro frontends with react and redux dev day
Prasanna Venkatesan
 
PPTX
The future of web development write once, run everywhere with angular.js and ...
Mark Roden
 
PDF
The future of web development write once, run everywhere with angular js an...
Mark Leusink
 
PDF
From Backbone to Ember and Back(bone) Again
jonknapp
 
PDF
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
Marc Dutoo
 
PDF
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware
 
ODP
code-camp-meteor
meghna gogna
 
PPTX
Intro To Node.js
Chris Cowan
 
PDF
jQquerysummit - Large-scale JavaScript Application Architecture
Jiby John
 
PPTX
Modern Software Architectures: Building Solutions for Web, Cloud, and Mobile
Dan Mohl
 
PPTX
Angular js workshop
Rolands Krumbergs
 
PDF
Developing maintainable Cordova applications
Ivano Malavolta
 
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
George Nguyen
 
gDayX - Advanced angularjs
gdgvietnam
 
Reactive application using meteor
Sapna Upreti
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Dr. Felix Raab
 
Architecting an ASP.NET MVC Solution
Andrea Saltarello
 
Understanding angular js
Aayush Shrestha
 
ReactJS vs AngularJS - Head to Head comparison
500Tech
 
Beginning MEAN Stack
Rob Davarnia
 
Micro frontends with react and redux dev day
Prasanna Venkatesan
 
The future of web development write once, run everywhere with angular.js and ...
Mark Roden
 
The future of web development write once, run everywhere with angular js an...
Mark Leusink
 
From Backbone to Ember and Back(bone) Again
jonknapp
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
Marc Dutoo
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware
 
code-camp-meteor
meghna gogna
 
Intro To Node.js
Chris Cowan
 
jQquerysummit - Large-scale JavaScript Application Architecture
Jiby John
 
Modern Software Architectures: Building Solutions for Web, Cloud, and Mobile
Dan Mohl
 
Angular js workshop
Rolands Krumbergs
 
Developing maintainable Cordova applications
Ivano Malavolta
 
Ad

More from Mike North (17)

PDF
Web Security: A Primer for Developers
Mike North
 
PDF
A Debugging Adventure: Journey through Ember.js Glue
Mike North
 
PDF
Anatomy of a Progressive Web App
Mike North
 
PDF
Web and Native: Bridging the Gap
Mike North
 
PDF
The Road to Native Web Components
Mike North
 
PDF
Enemy of the state
Mike North
 
PDF
Phoenix for Rubyists - Rubyconf Brazil 2016
Mike North
 
PDF
Phoenix for Rubyists
Mike North
 
PDF
Delightful UX for Distributed Systems
Mike North
 
PDF
Modern, Scalable, Ambitious apps with Ember.js
Mike North
 
PDF
Ember addons, served three ways
Mike North
 
PDF
User percieved performance
Mike North
 
PDF
Write Once, Run Everywhere
Mike North
 
PDF
Compose all the things (Wicked Good Ember 2015)
Mike North
 
PDF
Async JavaScript in ES7
Mike North
 
PPTX
Test like a pro with Ember.js
Mike North
 
PDF
Modern Web UI - Web components
Mike North
 
Web Security: A Primer for Developers
Mike North
 
A Debugging Adventure: Journey through Ember.js Glue
Mike North
 
Anatomy of a Progressive Web App
Mike North
 
Web and Native: Bridging the Gap
Mike North
 
The Road to Native Web Components
Mike North
 
Enemy of the state
Mike North
 
Phoenix for Rubyists - Rubyconf Brazil 2016
Mike North
 
Phoenix for Rubyists
Mike North
 
Delightful UX for Distributed Systems
Mike North
 
Modern, Scalable, Ambitious apps with Ember.js
Mike North
 
Ember addons, served three ways
Mike North
 
User percieved performance
Mike North
 
Write Once, Run Everywhere
Mike North
 
Compose all the things (Wicked Good Ember 2015)
Mike North
 
Async JavaScript in ES7
Mike North
 
Test like a pro with Ember.js
Mike North
 
Modern Web UI - Web components
Mike North
 

Recently uploaded (20)

PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
July Patch Tuesday
Ivanti
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 

Write Once, Run Everywhere - Ember.js Munich