SlideShare ist ein Scribd-Unternehmen logo
1 von 52
EMBER.JS
JAK ZATOPIT A NESHOŘET!
Viliam Elischer
@vire
AGENDA
Introduction
Concepts
Usage
Experience
Pros/Cons
Future
“Ember.js - A framework for creating
ambitious web applications.”
WHAT IS A FRAMEWORK?
“A software framework, in computer
programming, is an abstraction in which
common code providing generic
functionality can be selectively overridden
or specialized by user code providing
specific functionality.”
ref
makes doing the right thing feel good
is built on top of maximally flexible primitives
evolves with the best practices of the community
nurtures a feedback loop that helps features iterate as
shared understanding develops
Current version: 1.11.1 (I really love ones!)
In December 2011 Sproutcore 2.0 was renamed to Ember.js
CORE CONCEPTS
NAMING CONVENTIONS
default main entry point:
app/app.js
app/routes/application.js
app/controllers/application.js
app/templates/application.hbs
example: yourdomain.com/favorites
app/routes/favorites.js
app/controllers/favorites.js
app/templates/favorites.hbs
BUILDING BLOCKS
| Router | Routes | Templates | Models | Components |
| Controllers | Views | Helpers |
ROUTER
Simple definitions
Router.map(function() {
  this.route('about');
  this.route('favorites', { path: '/favs' });
});
or nested
Router.map(function() {
  this.route('posts', { path: '/posts' }, function() {
    this.route('new');
  });
});
ROUTES
You define a router.js
Router.map(function() {
  this.route('posts');
  this.route('post', { path: '/post/:post_id' });
});
and a route app/routes/post.js
export default Ember.Route.extend({
  model: function(params) {
    return $.getJSON("/api/posts/" + params.post_id + ".json");
  }
});
MODELS
Supermarine Spitfire LF Mk. IXE - No. 312 (Czechoslovak) Squadron RAF
TEMPLATES
Designed to describe the UI in a meaningful way:
Expressions {{age}}
Outlets {{outlet}}
Components {{my-component}}
Helper {{t "user.edit.title"}}
given a controller has a people property:
export default Ember.Controller.extend({
  people: [{name:'Yehuda'}, {name:'Tom'}, {name:'Trek'}]
});
then the following template
<ul>
  {{#each person in people}}
    <li>Hello, {{person.name}}!</li>
  {{/each}}
</ul>
results into:
<ul>
  <li>Hello, Yehuda!</li>
  <li>Hello, Tom!</li>
  <li>Hello, Trek!</li>
</ul>
COMPONENTS
CONTROLLERS, VIEWS, HELPERS
WHEN EMBER?
“When you realize that $elector-driven
development is too painful”
REASON
like:
the complexity of the project is causing chaos
your company is starting a new project (!)
you're planning to extend an existing project
a start-up occurred
it will help to eliminate technical debt
USE CASE
complex data-model / data-structure
big-data app view layer (multiple data sources)
conversion operations (e-commerce)
media processing (audio, image, video)
dashboard, monitoring / aggregation capability
B2B or B2C app for daily usage (ERP, CRM, etc.)
WHEN EMBER NOT?
overkill - scope, time, productivity, learning
time pressure
unclear added value (why?)
more dynamic than required = productivity loss
customer/stakeholder requests a framework
not required, like
static presentation e.g. opening hours, menu, contacts
EXPERIENCE
EMBER-CLI
  $ npm install ­g ember­cli
Swiss-army command-line interface & ember's killer feature
out-of-the-box project scaffold via:
blueprint generator:
transpile (ES6, sass, less, coffee)
minify, concat
managed dependencies | package.json, bower.json
$ ember new my­project­name
$ ember generate component my­component
broccoli: fast, reliable asset pipeline, constant-time
rebuilds
auto-rebuild when file changes & live-reload
single point of configuration: Brocfile.js
configurable build profiles:
dev , test , production , ci , ...
easy import of 3rd party libraries
export and import project via to addons
$ bower install ­­save moment
app.import('bower_components/moment/moment.js');
FINDINGS & HANDY ADVICE
default project layout is not ideal (solution: pods)
adjusting to ember-cli wasn't trivial before version 0.1.0
different DI mechanism than Java
ember plays great with viz technologies svg (d3), canvas
we gave suggestions for improvements, still in progress :(
result of build can't be split into desired artifacts
this is a good requirement for server side rendering, to
avoid adding business logic in client code
I've tried to replace QUnit with Jasmine...
sketch idea first (whiteboard/draw.io), code later
make POCs before you invest a lot of effort...
try to spent few days, or a week developing some small
functionality with a framework and check if you're are
comfortable
DON'T FORGET TO WRITE UNIT TESTS
There is no excuse to not write unit tests,
just your laziness.
PRO ET CONTRA
PROS
community, contributions, ecosystem - github, irc, forum
conventions - speeds up development, minimize faults
multiplatform support (browser, iOS/android, phone)
PROS
ES6, ES7 syntax support via babel.js
TDD support for unit & acceptance tests, testem, CI
Mature API (2.0 soon)
Batteries included - a lot functionality is ready for use
PROS
dozens of ember-cli addons will save time & bugs
backend agnostic (node, java, ruby, php, python, .net?)
ready for Functional reactive programming (RxJS)
CONS
learning takes longer
QUnit as default test-framework (see ember-cli-mocha!)
lazy loading of custom (route/template/model) is N/A
CONS
attention intensive / you need to check what's going on
absence of out-of-the-box i18n support
modifications are nontrivial - custom test runner, task
runner, test framework
WHY DO I THINK THAT IS EMBER
AWESOME?
BECAUSE:
DevX - intuitive, clean code, COC, DRY, KISS
Stability without stagnation principle
Tooling ember-cli & ember inspector
Is organized into 14D releases, many new features
Makes common tasks easy to complete (screen, widget)
Ember has vision, roadmap, architecture
COMING SOON
AND MORE
ember 2.0
Server Side Rendering / SSR via Fastboot
Ember Services / Improved DI
HATEOAS powered dynamic app generation
Ember RFCs - github.com/emberjs/rfcs
Q&A
www.joinzoom.com

Weitere ähnliche Inhalte

Was ist angesagt?

XAML: One Language to Rule Them All
XAML: One Language to Rule Them AllXAML: One Language to Rule Them All
XAML: One Language to Rule Them All
Frank La Vigne
 
Beginning Android development
Beginning Android developmentBeginning Android development
Beginning Android development
Stephen Gilmore
 
Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever Changed
Elizabeth Quinn-Woods
 

Was ist angesagt? (20)

10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
 
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
 
Comparison Of Open Source App Servers
Comparison Of Open Source App ServersComparison Of Open Source App Servers
Comparison Of Open Source App Servers
 
Sg conference multiplatform_apps_adam_stanley
Sg conference multiplatform_apps_adam_stanleySg conference multiplatform_apps_adam_stanley
Sg conference multiplatform_apps_adam_stanley
 
XAML: One Language to Rule Them All
XAML: One Language to Rule Them AllXAML: One Language to Rule Them All
XAML: One Language to Rule Them All
 
Flex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentFlex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application Development
 
Beginning Android development
Beginning Android developmentBeginning Android development
Beginning Android development
 
Zero redeployment with JRebel
Zero redeployment with JRebelZero redeployment with JRebel
Zero redeployment with JRebel
 
Build 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.FormsBuild 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.Forms
 
Testing with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous DeploymentTesting with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous Deployment
 
Videogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchVideogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha Touch
 
MohitBilakhia
MohitBilakhiaMohitBilakhia
MohitBilakhia
 
Cross-platform development frameworks
Cross-platform development frameworksCross-platform development frameworks
Cross-platform development frameworks
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
 
Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever Changed
 
Beyond The Buzz: Pluggable JavaFX Corporate Applications
Beyond The Buzz: Pluggable JavaFX Corporate ApplicationsBeyond The Buzz: Pluggable JavaFX Corporate Applications
Beyond The Buzz: Pluggable JavaFX Corporate Applications
 
Jenkins - Automating Yourself Out Of A Job (One That You Don't Want)
Jenkins - Automating Yourself Out Of A Job (One That You Don't Want)Jenkins - Automating Yourself Out Of A Job (One That You Don't Want)
Jenkins - Automating Yourself Out Of A Job (One That You Don't Want)
 
ДІАНА ПІНЧУК «Testing installable mobile apps analogues: Android Instant Apps...
ДІАНА ПІНЧУК «Testing installable mobile apps analogues: Android Instant Apps...ДІАНА ПІНЧУК «Testing installable mobile apps analogues: Android Instant Apps...
ДІАНА ПІНЧУК «Testing installable mobile apps analogues: Android Instant Apps...
 
Welcome
WelcomeWelcome
Welcome
 
Frontend Components Outside Main App by Adam Florczak
Frontend Components Outside Main App by Adam FlorczakFrontend Components Outside Main App by Adam Florczak
Frontend Components Outside Main App by Adam Florczak
 

Andere mochten auch (6)

Vývojařská Plzeň - React
Vývojařská Plzeň - ReactVývojařská Plzeň - React
Vývojařská Plzeň - React
 
Keep your side-effects 
in the right place with 
redux observable
Keep your side-effects 
in the right place with 
redux observableKeep your side-effects 
in the right place with 
redux observable
Keep your side-effects 
in the right place with 
redux observable
 
RxJS101 - What you need to know to get started with RxJS tomorrow
RxJS101 - What you need to know to get started with RxJS tomorrowRxJS101 - What you need to know to get started with RxJS tomorrow
RxJS101 - What you need to know to get started with RxJS tomorrow
 
RxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptRxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScript
 
RxJS - The Reactive Extensions for JavaScript
RxJS - The Reactive Extensions for JavaScriptRxJS - The Reactive Extensions for JavaScript
RxJS - The Reactive Extensions for JavaScript
 
RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015
 

Ähnlich wie Ember.js - Jak zatopit a neshořet!

Mix Tech Ed Update No Video
Mix Tech Ed Update No VideoMix Tech Ed Update No Video
Mix Tech Ed Update No Video
AllyWick
 
Flu3nt highlights
Flu3nt highlightsFlu3nt highlights
Flu3nt highlights
dswork
 

Ähnlich wie Ember.js - Jak zatopit a neshořet! (20)

Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile Technologies
 
Delivering with ember.js
Delivering with ember.jsDelivering with ember.js
Delivering with ember.js
 
The Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platformThe Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platform
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
 
How To Build Website
How To Build WebsiteHow To Build Website
How To Build Website
 
X plat dev - part ii publish
X plat dev - part ii publishX plat dev - part ii publish
X plat dev - part ii publish
 
InterConnect 2017 : Do You Have the Right Solution for z/OS Application Devel...
InterConnect 2017 : Do You Have the Right Solution for z/OS Application Devel...InterConnect 2017 : Do You Have the Right Solution for z/OS Application Devel...
InterConnect 2017 : Do You Have the Right Solution for z/OS Application Devel...
 
Product! - The road to production deployment
Product! - The road to production deploymentProduct! - The road to production deployment
Product! - The road to production deployment
 
Mix Tech Ed Update No Video
Mix Tech Ed Update No VideoMix Tech Ed Update No Video
Mix Tech Ed Update No Video
 
Eclipse Developement @ Progress Software
Eclipse Developement @ Progress SoftwareEclipse Developement @ Progress Software
Eclipse Developement @ Progress Software
 
Get your mobile app in production in 3 months: Native and Reactive Mobile Apps
Get your mobile app in production in 3 months: Native and Reactive Mobile AppsGet your mobile app in production in 3 months: Native and Reactive Mobile Apps
Get your mobile app in production in 3 months: Native and Reactive Mobile Apps
 
Vue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrareVue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrare
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
 
Flu3nt highlights
Flu3nt highlightsFlu3nt highlights
Flu3nt highlights
 
mmercer_resume_latest
mmercer_resume_latestmmercer_resume_latest
mmercer_resume_latest
 
Ibm innovate ci for system z
Ibm innovate ci for system zIbm innovate ci for system z
Ibm innovate ci for system z
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
 
TRWResume-10-2016
TRWResume-10-2016TRWResume-10-2016
TRWResume-10-2016
 
Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6
 
Best software development tools in 2021
Best software development tools in 2021Best software development tools in 2021
Best software development tools in 2021
 

Kürzlich hochgeladen

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Kürzlich hochgeladen (20)

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 

Ember.js - Jak zatopit a neshořet!