SlideShare a Scribd company logo
{ { E M B E R - C O M P O N E N T S
D E E P D I V E = T R U E } }
@ R A Y T I L E Y
B A C K I N M Y
D A Y
MODEL
VIEW
CONTROLLER
M O D E L L A Y E R
I S R E A L L Y T H E
R O U T E R
MODEL
VIEW
CONTROLLER
U S E A
C O M P O N E N T
MODEL
VIEW
CONTROLLER
W H A T I S
E M B E R
B E C O M I N G ?
W H A T E M B E R
I S B E C O M I N G
ROUTER
W H A T E M B E R
B E C O M I N G
ROUTER
GLUE
R O U T E R
G L U E D
C O M P O N E N T S
ROUTER
GLUE
COMPONENTS
2.0
H T T P : / / W 3 C . G I T H U B . I O / W E B C O M P
O N E N T S / S P E C / C U S T O M /
W3C Spec
Custom Element Spec Ember
createdCallback init
attatchedCallback didInsertElement
detachedCallback willDestroyElement
attributeChangedCallback * data binding *
– @ W Y C A T S V I A @ M I X O N I C
“Components are
akin to functions
with callbacks”
U S I N G A C O M P O N E N T
W H A T I S A C O M P O N E N T
Markup
Javascript
W H A T I S A C O M P O N E N T
Markup
Javascript
Styles
W H A T I S A C O M P O N E N T
template
class
css
O R G A N I Z A T I O N
• Use Pods
• Organize components by route where appropriate
• Components can be nested in directories
• Organize Early
• Put styles in pod structure
• https://github.com/ebryn/ember-component-css
• https://github.com/petehunt/jsxstyle
ps://github.com/dockyard/styleguides/blob/master/ember.md#use-pods-structu
ISOLATION
// components/sweet-component/component.js
import Ember from 'ember';
export default Ember.Component.extend({
foo: null,
actions: {
save: function() {
this.sendAction('on-save', this.get('foo'));
},
delete: function() {
this.sendAction('on-delete', this.get('foo'));
}
}
});
B U G
W R A P P I N G A T H I R D
P A R T Y L I B R A R Y
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'input',
attributeBindings: ['value'],
classNames: ['date-picker'],
didInsertElement: function() {
var options = {};
var picker = new Pikaday(options);
picker.setDate(this.get('value'), true);
this.set('_picker', picker);
},
willDestroyElement: function() {
this.get('_picker').destroy();
}
});
format: 'YYYY-MM-DD',
didInsertElement: function() {
var self = this;
var options = {
field: this.$()[0],
format: this.get('format'),
onSelect: function() {
Ember.run(function() {
var date = self.get('_picker').getDate();
self.set('value', date);
self.sendAction('on-select', date);
});
}
};
D A T A D O W N - A C T I O N S
U P
Action Checkbox
C O O R D I N A T I N G
C O M P O N E N T S
C O O R D I N A T I N G
C O M P O N E N T S
- W I T H B L O C K P A R A M S
( D E M O )
//Draggable Item
import Ember from 'ember';
export default Ember.Component.extend({
mouseDown: function() {
this.startDrag();
},
touchStart: function() {
this.startDrag();
}
startDrag: function() {
this.get('canvas').send('startDrag', this.get('dragData'));
}
dragData: Ember.computed(...)
});
H A N D L I N G B R O W S E R E V E N T S
http://emberjs.com/api/classes/Ember.View.html
//Drag Canvas
import Ember from 'ember';
export default Ember.Component.extend({
dragging: false,
touchMove: function() {...},
mouseMove: function() {...}
mouseUp: function() {...},
touchEnd: function() {...}
endDrag: function() {...},
updatePosition: function() {...}
actions: {
startDrag: function(dragData) {
this.setProperties({
dragging: true,
dragData: dragData
});
},
doDrop: function(dropData) {
this.sendAction('on-drop', dropData, this.get('dragData'));
}
}
});
C O O R D I N A T I N G
C O M P O N E N T S
- W I T H S E R V I C E S
// services/drag-coordinator.js
import Ember from 'ember';
export default Ember.Component.extend({
canvas: null,
registerCanvas: function() {...},
unregisterCanvas: function() {...}
});
// Any component that needs access to drag canvas
import Ember from 'ember';
export default Ember.Component.extend({
dragCoordinator: Ember.inject.service(),
canvas: Ember.computed.alias('dragCoordinator.canvas')
});
D Y N A M I C C O M P O N E N T S
W I T H { { C O M P O N E N T } }
( D E M O )
var title =
{
field: 'title',
component: 'text-search-filter',
placeholder: 'Title',
display: 'Title',
operators: [
{
operator: 'equals',
display: 'Contains'
},
{
operator: 'notEquals',
display: 'Does Not Contain'
}
]
};
H T T P : / / V I C T O R A R I A S . C O M . B R / I M A G E S / D U C K _ T Y P I N G . J P G
2.0
T H A N K S F O R
R E M I N D I N G M E
https://github.com/emberjs/ember.js/pull/10461
ISOLATION
L O O K ! I P U T A N U N D E R S C O R E I N
F R O N T O F I T
import Ember from 'ember';
export default Ember.Component.extend({
_superSecretInternalState: 'safe and secure',
actions: {
doSomething: function() {
var userValue = this.attrs.someValue;
...
}
}
}
});
E M B E R 2 . 0
import Ember from 'ember';
export default Ember.Route.extend({
attributes: function(params, queryParams) {
return {
model: this.model(params);
}
}
});
T O O M A N Y O F M Y C O M P O N E N T S
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
classNames: ['sweet-component']
attributeBindings: ['some-attribute']
actions: {
save: function() {
this.sendAction('save')
}
}
}
});
E L E M E N T A N D F R A G M E N T R F C
T A G L E S S C O M P O N E N T = = =
F R A G M E N T
C O M B I N E D W I T H B E T T E R A C T I O N
H A N D L I N G
http://emberjs.jsbin.com/rwjblue/394/edit?html,js,output
A L L T H E O T H E R R O A D T O 2 . 0
S T U F F
• Road to 2.0 RFC
• Routable Components RFC
• Elements and Fragments RFC
• Erik is impatient
R E C A P
• Components are Ember’s vision of custom elements
today
• They simplify the learning curve of ember allowing a
unified interface for getting content and behaviors for UI.
• Organize Early
• Favor data down actions up
• You can coordinate between components to build
complex but compassable interfaces
R E C A P
• Use the {{component}} helper when you need to choose
a component at run time.
• Be on the lookout for sweet new features in Glimmer
and Ember 2.0 which are just around the corner.
T H A N K S !
@raytiley (github & twitter)
raytiley@gmail.com

More Related Content

What's hot

node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.io
Steven Beeckman
 
Hello Swift 3/5 - Function
Hello Swift 3/5 - FunctionHello Swift 3/5 - Function
Hello Swift 3/5 - Function
Cody Yun
 
優しいWAFの作り方
優しいWAFの作り方優しいWAFの作り方
優しいWAFの作り方
techmemo
 
Advanced programming with #nodecopter
Advanced programming with #nodecopterAdvanced programming with #nodecopter
Advanced programming with #nodecopter
Laurent Eschenauer
 
Drones, Flying robots and Javascript
Drones, Flying robots and JavascriptDrones, Flying robots and Javascript
Drones, Flying robots and Javascript
Laurent Eschenauer
 
How to develop modern web application framework
How to develop modern web application frameworkHow to develop modern web application framework
How to develop modern web application framework
techmemo
 
Promise of an API
Promise of an APIPromise of an API
Promise of an API
Maxim Zaks
 
Newtonraphson algorithm derivation
Newtonraphson algorithm derivationNewtonraphson algorithm derivation
Newtonraphson algorithm derivation
Asha Anu Kurian
 
Implementing pattern-matching in JavaScript (short version)
Implementing pattern-matching in JavaScript (short version)Implementing pattern-matching in JavaScript (short version)
Implementing pattern-matching in JavaScript (short version)
François-Guillaume Ribreau
 
fabfile.py
fabfile.pyfabfile.py
fabfile.py
Corey Oordt
 
Implementation of c string functions
Implementation of c string functionsImplementation of c string functions
Implementation of c string functions
mohamed sikander
 
GeoGebra JavaScript CheatSheet
GeoGebra JavaScript CheatSheetGeoGebra JavaScript CheatSheet
GeoGebra JavaScript CheatSheet
Jose Perez
 
Oro meetup #4
Oro meetup #4Oro meetup #4
Oro meetup #4
Oleg Zinchenko
 
Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)
Oleg Zinchenko
 
InterConnect: Server Side Swift for Java Developers
InterConnect:  Server Side Swift for Java DevelopersInterConnect:  Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java Developers
Chris Bailey
 
Introduction to ES2015
Introduction to ES2015Introduction to ES2015
Introduction to ES2015
kiranabburi
 
Data Structure - 2nd Study
Data Structure - 2nd StudyData Structure - 2nd Study
Data Structure - 2nd Study
Chris Ohk
 
C++ Programming - 11th Study
C++ Programming - 11th StudyC++ Programming - 11th Study
C++ Programming - 11th Study
Chris Ohk
 
Excellent
ExcellentExcellent
Excellent
Marco Otte-Witte
 
One definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим житьOne definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим жить
Platonov Sergey
 

What's hot (20)

node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.io
 
Hello Swift 3/5 - Function
Hello Swift 3/5 - FunctionHello Swift 3/5 - Function
Hello Swift 3/5 - Function
 
優しいWAFの作り方
優しいWAFの作り方優しいWAFの作り方
優しいWAFの作り方
 
Advanced programming with #nodecopter
Advanced programming with #nodecopterAdvanced programming with #nodecopter
Advanced programming with #nodecopter
 
Drones, Flying robots and Javascript
Drones, Flying robots and JavascriptDrones, Flying robots and Javascript
Drones, Flying robots and Javascript
 
How to develop modern web application framework
How to develop modern web application frameworkHow to develop modern web application framework
How to develop modern web application framework
 
Promise of an API
Promise of an APIPromise of an API
Promise of an API
 
Newtonraphson algorithm derivation
Newtonraphson algorithm derivationNewtonraphson algorithm derivation
Newtonraphson algorithm derivation
 
Implementing pattern-matching in JavaScript (short version)
Implementing pattern-matching in JavaScript (short version)Implementing pattern-matching in JavaScript (short version)
Implementing pattern-matching in JavaScript (short version)
 
fabfile.py
fabfile.pyfabfile.py
fabfile.py
 
Implementation of c string functions
Implementation of c string functionsImplementation of c string functions
Implementation of c string functions
 
GeoGebra JavaScript CheatSheet
GeoGebra JavaScript CheatSheetGeoGebra JavaScript CheatSheet
GeoGebra JavaScript CheatSheet
 
Oro meetup #4
Oro meetup #4Oro meetup #4
Oro meetup #4
 
Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)
 
InterConnect: Server Side Swift for Java Developers
InterConnect:  Server Side Swift for Java DevelopersInterConnect:  Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java Developers
 
Introduction to ES2015
Introduction to ES2015Introduction to ES2015
Introduction to ES2015
 
Data Structure - 2nd Study
Data Structure - 2nd StudyData Structure - 2nd Study
Data Structure - 2nd Study
 
C++ Programming - 11th Study
C++ Programming - 11th StudyC++ Programming - 11th Study
C++ Programming - 11th Study
 
Excellent
ExcellentExcellent
Excellent
 
One definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим житьOne definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим жить
 

Viewers also liked

Shorten your life infographic
Shorten your life infographicShorten your life infographic
Shorten your life infographic
Hypervibe AU
 
SMWSantiago - Mónica Bulnes
SMWSantiago - Mónica BulnesSMWSantiago - Mónica Bulnes
SMWSantiago - Mónica Bulnes
danidron
 
Marca pessoal
Marca pessoalMarca pessoal
Marca pessoal
Alessandro Santos
 
Planificacion estrategica
Planificacion estrategicaPlanificacion estrategica
Planificacion estrategica
jhosfrank
 
Hip hop2 (1)
Hip hop2 (1)Hip hop2 (1)
Hip hop2 (1)
Luisa Guzman Fandiño
 
Katonah-Lewisboro: It matters where you draw the line
Katonah-Lewisboro: It matters where you draw the lineKatonah-Lewisboro: It matters where you draw the line
Katonah-Lewisboro: It matters where you draw the line
SaveKLSchools
 
Understanding and treating mental illness 4.15 fnl
Understanding and treating mental illness 4.15 fnlUnderstanding and treating mental illness 4.15 fnl
Understanding and treating mental illness 4.15 fnl
Kindred Healthcare
 
SMWSantiago - Erick Bellido
SMWSantiago - Erick BellidoSMWSantiago - Erick Bellido
SMWSantiago - Erick Bellido
danidron
 
Evaluation
Evaluation Evaluation
Evaluation
hannahwoollaston
 
Proceso de extraccion de la materia prima el aluminio- --2 a
Proceso de extraccion de la materia prima   el aluminio-  --2 aProceso de extraccion de la materia prima   el aluminio-  --2 a
Proceso de extraccion de la materia prima el aluminio- --2 asurtialuminiossilva
 
כללים להתנהלות נכונה באיביי
 כללים להתנהלות נכונה באיביי כללים להתנהלות נכונה באיביי
כללים להתנהלות נכונה באיביי
Eyal Daniel
 
istributed system
istributed systemistributed system
istributed system
abdillahkarine
 
Guia articuladora1
Guia articuladora1Guia articuladora1
Guia articuladora1
LAURA GALVAN PEREZ
 
Factorizacion polinomios
Factorizacion polinomiosFactorizacion polinomios
Factorizacion polinomios
carinaalvarez
 
Fuentesdel derecho
Fuentesdel derechoFuentesdel derecho
Fuentesdel derecho
Uviitho Zepeda
 
Ponencia alfonso muñoz
Ponencia alfonso muñozPonencia alfonso muñoz
Ponencia alfonso muñoz
Isabel Gabriel Más
 
Hemoglobin
HemoglobinHemoglobin
Hemoglobin
Aya Zakraya
 
Aldo rossi
Aldo rossiAldo rossi
Aldo rossi
Isabella Marra
 
My presentation
My presentationMy presentation
My presentation
rob1992
 

Viewers also liked (20)

Shorten your life infographic
Shorten your life infographicShorten your life infographic
Shorten your life infographic
 
SMWSantiago - Mónica Bulnes
SMWSantiago - Mónica BulnesSMWSantiago - Mónica Bulnes
SMWSantiago - Mónica Bulnes
 
Marca pessoal
Marca pessoalMarca pessoal
Marca pessoal
 
Planificacion estrategica
Planificacion estrategicaPlanificacion estrategica
Planificacion estrategica
 
Hip hop2 (1)
Hip hop2 (1)Hip hop2 (1)
Hip hop2 (1)
 
Katonah-Lewisboro: It matters where you draw the line
Katonah-Lewisboro: It matters where you draw the lineKatonah-Lewisboro: It matters where you draw the line
Katonah-Lewisboro: It matters where you draw the line
 
Understanding and treating mental illness 4.15 fnl
Understanding and treating mental illness 4.15 fnlUnderstanding and treating mental illness 4.15 fnl
Understanding and treating mental illness 4.15 fnl
 
SMWSantiago - Erick Bellido
SMWSantiago - Erick BellidoSMWSantiago - Erick Bellido
SMWSantiago - Erick Bellido
 
Evaluation
Evaluation Evaluation
Evaluation
 
Proceso de extrusion ok
Proceso de extrusion okProceso de extrusion ok
Proceso de extrusion ok
 
Proceso de extraccion de la materia prima el aluminio- --2 a
Proceso de extraccion de la materia prima   el aluminio-  --2 aProceso de extraccion de la materia prima   el aluminio-  --2 a
Proceso de extraccion de la materia prima el aluminio- --2 a
 
כללים להתנהלות נכונה באיביי
 כללים להתנהלות נכונה באיביי כללים להתנהלות נכונה באיביי
כללים להתנהלות נכונה באיביי
 
istributed system
istributed systemistributed system
istributed system
 
Guia articuladora1
Guia articuladora1Guia articuladora1
Guia articuladora1
 
Factorizacion polinomios
Factorizacion polinomiosFactorizacion polinomios
Factorizacion polinomios
 
Fuentesdel derecho
Fuentesdel derechoFuentesdel derecho
Fuentesdel derecho
 
Ponencia alfonso muñoz
Ponencia alfonso muñozPonencia alfonso muñoz
Ponencia alfonso muñoz
 
Hemoglobin
HemoglobinHemoglobin
Hemoglobin
 
Aldo rossi
Aldo rossiAldo rossi
Aldo rossi
 
My presentation
My presentationMy presentation
My presentation
 

Similar to {{components deepDive=true}}

Intro to Ember.JS 2016
Intro to Ember.JS 2016Intro to Ember.JS 2016
Intro to Ember.JS 2016
Sandino Núñez
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming En
guest9bcef2f
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)
Davide Cerbo
 
Building a p2 update site using Buckminster
Building a p2 update site using BuckminsterBuilding a p2 update site using Buckminster
Building a p2 update site using Buckminster
guest5e2b6b
 
What is new in sulu 2.0
What is new in sulu 2.0What is new in sulu 2.0
What is new in sulu 2.0
danrot
 
Effecient javascript
Effecient javascriptEffecient javascript
Effecient javascript
mpnkhan
 
前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
Ting Lv
 
State manager in Vue.js, from zero to Vuex
State manager in Vue.js, from zero to VuexState manager in Vue.js, from zero to Vuex
State manager in Vue.js, from zero to Vuex
Commit University
 
Introducing Vuex in your project
Introducing Vuex in your projectIntroducing Vuex in your project
Introducing Vuex in your project
Denny Biasiolli
 
Using Renderless Components in Vue.js during your software development.
Using Renderless Components in Vue.js during your software development.Using Renderless Components in Vue.js during your software development.
Using Renderless Components in Vue.js during your software development.
tothepointIT
 
Combres
CombresCombres
Combres
Buu Nguyen
 
Chaincode Development 區塊鏈鏈碼開發
Chaincode Development 區塊鏈鏈碼開發Chaincode Development 區塊鏈鏈碼開發
Chaincode Development 區塊鏈鏈碼開發
HO-HSUN LIN
 
Loadrunner
LoadrunnerLoadrunner
Loadrunner
danwrong
 
Lecture5
Lecture5Lecture5
Lecture5
ravifeelings
 
Angular 2.0 - What to expect
Angular 2.0 - What to expectAngular 2.0 - What to expect
Angular 2.0 - What to expect
Allan Marques Baptista
 
Introduction to VueJS & Vuex
Introduction to VueJS & VuexIntroduction to VueJS & Vuex
Introduction to VueJS & Vuex
Bernd Alter
 
Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlight
Jeff Blankenburg
 
Build Lightweight Web Module
Build Lightweight Web ModuleBuild Lightweight Web Module
Build Lightweight Web Module
Morgan Cheng
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Frost
 
JavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best PracticesJavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best Practices
Siarhei Barysiuk
 

Similar to {{components deepDive=true}} (20)

Intro to Ember.JS 2016
Intro to Ember.JS 2016Intro to Ember.JS 2016
Intro to Ember.JS 2016
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming En
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)
 
Building a p2 update site using Buckminster
Building a p2 update site using BuckminsterBuilding a p2 update site using Buckminster
Building a p2 update site using Buckminster
 
What is new in sulu 2.0
What is new in sulu 2.0What is new in sulu 2.0
What is new in sulu 2.0
 
Effecient javascript
Effecient javascriptEffecient javascript
Effecient javascript
 
前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
 
State manager in Vue.js, from zero to Vuex
State manager in Vue.js, from zero to VuexState manager in Vue.js, from zero to Vuex
State manager in Vue.js, from zero to Vuex
 
Introducing Vuex in your project
Introducing Vuex in your projectIntroducing Vuex in your project
Introducing Vuex in your project
 
Using Renderless Components in Vue.js during your software development.
Using Renderless Components in Vue.js during your software development.Using Renderless Components in Vue.js during your software development.
Using Renderless Components in Vue.js during your software development.
 
Combres
CombresCombres
Combres
 
Chaincode Development 區塊鏈鏈碼開發
Chaincode Development 區塊鏈鏈碼開發Chaincode Development 區塊鏈鏈碼開發
Chaincode Development 區塊鏈鏈碼開發
 
Loadrunner
LoadrunnerLoadrunner
Loadrunner
 
Lecture5
Lecture5Lecture5
Lecture5
 
Angular 2.0 - What to expect
Angular 2.0 - What to expectAngular 2.0 - What to expect
Angular 2.0 - What to expect
 
Introduction to VueJS & Vuex
Introduction to VueJS & VuexIntroduction to VueJS & Vuex
Introduction to VueJS & Vuex
 
Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlight
 
Build Lightweight Web Module
Build Lightweight Web ModuleBuild Lightweight Web Module
Build Lightweight Web Module
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
 
JavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best PracticesJavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best Practices
 

Recently uploaded

Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Requirement Traceability in Xen Functional Safety
Requirement Traceability in Xen Functional SafetyRequirement Traceability in Xen Functional Safety
Requirement Traceability in Xen Functional Safety
Ayan Halder
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 

Recently uploaded (20)

Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Requirement Traceability in Xen Functional Safety
Requirement Traceability in Xen Functional SafetyRequirement Traceability in Xen Functional Safety
Requirement Traceability in Xen Functional Safety
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 

{{components deepDive=true}}

  • 1. { { E M B E R - C O M P O N E N T S D E E P D I V E = T R U E } } @ R A Y T I L E Y
  • 2. B A C K I N M Y D A Y MODEL VIEW CONTROLLER
  • 3. M O D E L L A Y E R I S R E A L L Y T H E R O U T E R MODEL VIEW CONTROLLER
  • 4. U S E A C O M P O N E N T MODEL VIEW CONTROLLER
  • 5. W H A T I S E M B E R B E C O M I N G ?
  • 6. W H A T E M B E R I S B E C O M I N G ROUTER
  • 7. W H A T E M B E R B E C O M I N G ROUTER GLUE
  • 8. R O U T E R G L U E D C O M P O N E N T S ROUTER GLUE COMPONENTS
  • 9.
  • 10.
  • 11. 2.0
  • 12. H T T P : / / W 3 C . G I T H U B . I O / W E B C O M P O N E N T S / S P E C / C U S T O M / W3C Spec
  • 13. Custom Element Spec Ember createdCallback init attatchedCallback didInsertElement detachedCallback willDestroyElement attributeChangedCallback * data binding *
  • 14. – @ W Y C A T S V I A @ M I X O N I C “Components are akin to functions with callbacks”
  • 15. U S I N G A C O M P O N E N T
  • 16. W H A T I S A C O M P O N E N T Markup Javascript
  • 17. W H A T I S A C O M P O N E N T Markup Javascript Styles
  • 18. W H A T I S A C O M P O N E N T template class css
  • 19. O R G A N I Z A T I O N • Use Pods • Organize components by route where appropriate • Components can be nested in directories • Organize Early • Put styles in pod structure • https://github.com/ebryn/ember-component-css • https://github.com/petehunt/jsxstyle
  • 21.
  • 22.
  • 24.
  • 25.
  • 26. // components/sweet-component/component.js import Ember from 'ember'; export default Ember.Component.extend({ foo: null, actions: { save: function() { this.sendAction('on-save', this.get('foo')); }, delete: function() { this.sendAction('on-delete', this.get('foo')); } } });
  • 27.
  • 28. B U G
  • 29.
  • 30.
  • 31.
  • 32. W R A P P I N G A T H I R D P A R T Y L I B R A R Y
  • 33. import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'input', attributeBindings: ['value'], classNames: ['date-picker'], didInsertElement: function() { var options = {}; var picker = new Pikaday(options); picker.setDate(this.get('value'), true); this.set('_picker', picker); }, willDestroyElement: function() { this.get('_picker').destroy(); } });
  • 34. format: 'YYYY-MM-DD', didInsertElement: function() { var self = this; var options = { field: this.$()[0], format: this.get('format'), onSelect: function() { Ember.run(function() { var date = self.get('_picker').getDate(); self.set('value', date); self.sendAction('on-select', date); }); } };
  • 35.
  • 36. D A T A D O W N - A C T I O N S U P Action Checkbox
  • 37.
  • 38. C O O R D I N A T I N G C O M P O N E N T S
  • 39. C O O R D I N A T I N G C O M P O N E N T S - W I T H B L O C K P A R A M S
  • 40. ( D E M O )
  • 41.
  • 42.
  • 43. //Draggable Item import Ember from 'ember'; export default Ember.Component.extend({ mouseDown: function() { this.startDrag(); }, touchStart: function() { this.startDrag(); } startDrag: function() { this.get('canvas').send('startDrag', this.get('dragData')); } dragData: Ember.computed(...) });
  • 44. H A N D L I N G B R O W S E R E V E N T S http://emberjs.com/api/classes/Ember.View.html
  • 45. //Drag Canvas import Ember from 'ember'; export default Ember.Component.extend({ dragging: false, touchMove: function() {...}, mouseMove: function() {...} mouseUp: function() {...}, touchEnd: function() {...} endDrag: function() {...}, updatePosition: function() {...} actions: { startDrag: function(dragData) { this.setProperties({ dragging: true, dragData: dragData }); }, doDrop: function(dropData) { this.sendAction('on-drop', dropData, this.get('dragData')); } } });
  • 46. C O O R D I N A T I N G C O M P O N E N T S - W I T H S E R V I C E S
  • 47.
  • 48. // services/drag-coordinator.js import Ember from 'ember'; export default Ember.Component.extend({ canvas: null, registerCanvas: function() {...}, unregisterCanvas: function() {...} });
  • 49. // Any component that needs access to drag canvas import Ember from 'ember'; export default Ember.Component.extend({ dragCoordinator: Ember.inject.service(), canvas: Ember.computed.alias('dragCoordinator.canvas') });
  • 50. D Y N A M I C C O M P O N E N T S W I T H { { C O M P O N E N T } }
  • 51. ( D E M O )
  • 52. var title = { field: 'title', component: 'text-search-filter', placeholder: 'Title', display: 'Title', operators: [ { operator: 'equals', display: 'Contains' }, { operator: 'notEquals', display: 'Does Not Contain' } ] };
  • 53. H T T P : / / V I C T O R A R I A S . C O M . B R / I M A G E S / D U C K _ T Y P I N G . J P G
  • 54.
  • 55. 2.0
  • 56. T H A N K S F O R R E M I N D I N G M E https://github.com/emberjs/ember.js/pull/10461
  • 58. L O O K ! I P U T A N U N D E R S C O R E I N F R O N T O F I T
  • 59.
  • 60. import Ember from 'ember'; export default Ember.Component.extend({ _superSecretInternalState: 'safe and secure', actions: { doSomething: function() { var userValue = this.attrs.someValue; ... } } } });
  • 61. E M B E R 2 . 0 import Ember from 'ember'; export default Ember.Route.extend({ attributes: function(params, queryParams) { return { model: this.model(params); } } });
  • 62.
  • 63.
  • 64. T O O M A N Y O F M Y C O M P O N E N T S import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'span', classNames: ['sweet-component'] attributeBindings: ['some-attribute'] actions: { save: function() { this.sendAction('save') } } } });
  • 65. E L E M E N T A N D F R A G M E N T R F C
  • 66. T A G L E S S C O M P O N E N T = = = F R A G M E N T
  • 67. C O M B I N E D W I T H B E T T E R A C T I O N H A N D L I N G http://emberjs.jsbin.com/rwjblue/394/edit?html,js,output
  • 68. A L L T H E O T H E R R O A D T O 2 . 0 S T U F F • Road to 2.0 RFC • Routable Components RFC • Elements and Fragments RFC • Erik is impatient
  • 69. R E C A P • Components are Ember’s vision of custom elements today • They simplify the learning curve of ember allowing a unified interface for getting content and behaviors for UI. • Organize Early • Favor data down actions up • You can coordinate between components to build complex but compassable interfaces
  • 70. R E C A P • Use the {{component}} helper when you need to choose a component at run time. • Be on the lookout for sweet new features in Glimmer and Ember 2.0 which are just around the corner.
  • 71. T H A N K S ! @raytiley (github & twitter) raytiley@gmail.com

Editor's Notes

  1. Ember is an “MVC” framework Components Introduced: https://github.com/emberjs/website/blob/master/source/blog/2013-06-23-ember-1-0-rc6.md
  2. For the model layer you can use ember data, or ember model, or plain jquery, or just POJOs. The real power of “models” in ember comes from the router which gives you a place to load your data, but it doesn’t matter the form that data takes.
  3. For each route you get a view, controller and template… but the distinction between those separate items is fuzzy and most of the time you should just use a component.
  4. So if models are loose, and you shouldn’t use views and controllers except for rare circumstances, what is ember?
  5. Router - Ember’s top feature from day one is the router. It is inspiring and still leads other frameworks.
  6. Glue - A framework is really a bunch of decisions made for you ahead of time. A bunch of small micro-libraries glued together for you so you don’t .
  7. Components - Ember is a front end framework for building a UI. Components are the building blocks of a web UI
  8. I remember sitting in IRC when components were being discussed.
  9. Initial reaction was less than thrilled.
  10. At the time our app was almost ready for launch… we didn’t migrate anything over to components. All of our views continued working fine and we were happy. Looking back especially has glimmer and 2.0 come down the road, the foresight was great. #thoughtleaders
  11. Components come from the custom element spec. Similar to Angular directives, react, and polymer.
  12. Custom elements and components are essentially markup and javascript combined. Both can react to browser events, and provide lifecycle hooks.
  13. Currently only mustache syntax is available… Angle brackets are coming. Components must have dash to align with spec. Arguments passed in as hash. Components can yield a template in block form.
  14. A component is some markup or some javascript or both.
  15. Lots of efforts to also tackle the styling question.
  16. With render we could tie a view, controller and template together.
  17. The killer feature of components is their isolation. Actions don’t escape a component unless explicitly given a handler and properties are part of the component templates context unless explicitly passed in.
  18. We can see here there are actions and properties available in the context the component is called in. But we can change the name and even switch what an action will do when the component is invoked.
  19. Shows how components can use the properties passed in. Also actions that originate inside a component do nothing if the component is not invoked with a handler.
  20. Pause and Demo app real quicky. Current Component count 80+.
  21. Refactoring - Another reason why component isolation is a benefit is it can make refactoring a UI easier. Should the content go in a side pane?
  22. Refactoring - Or maybe content should go in a modal. Having the content isolated to a component makes moving it around as a logical chunk easier.
  23. Lots of components in our app are just wrapping other libraries. Most of these will just require passing in options, setting up the plugin in the didInsertElement hook and cleaning up in the willDestroyElement.
  24. Wrapping a Plugin - Expand in the options. Notice now we run the plugins callback in an Ember.run. This is important. Also notice how we use component properties to configure the plugin, and call sendAction when the date picker calls its callback.
  25. Ember Addons is starting to replace a lot of our wrapper components. We’ll submit bugs / patches if we find a major issue. Spread the burden of maintenance, usually more complete.
  26. “Data Down Actions Up” is the hot new trend replacing 2 way data binding. The {{action-checkbox}} won’t change any state when clicked. Instead sends an action. Has loads of benefits but can be tricky. Sometimes you need to rewrite the element to avoid weird edge cases.
  27. Example Tweeted by Ember Sherpa of Data down actions up for a text input that formats the date once the user enters a new value.
  28. Sometimes components need to work together to.Think calendars, video players, tables. Here will go over a drag and drop scheduling interface.
  29. Block Params are in 1.10.0. Are awesome. Allow components to expose values into yielded templates. Show examples of where using block params in app. Demo Drag and drop scheduling.
  30. The drag canvas coordinates all the drag and drop and wraps all the draggables, droppables and helpers. Ultimately flexible. If the inner components are not passed a canvas, they will assert.
  31. You yield block params from a components template. In this case were yielding the entire component. You could yield selective values.
  32. The inner components can dispatch to the “canvas” component that was passed in. Also notice how the components allow us to respond to browser events.
  33. Its good to review list of events components and views respond to. You can always register custom events.
  34. After the {{draggable-item}} kicks off a drag the coordinator is responsible for tracking it, checking for intersections, etc. Since all the inner components have the canvas instance, they can create computed properties from canvas properties (x,y coordinates, intersecting, etc)
  35. Communicating with block params is great for components grouped locally. Sometimes components need to coordinate across routes.
  36. This is actually how our drag and drop works. The sidebar is a nested route. The drag canvas wraps everything including the outlet.
  37. Services also released in Ember 1.10.0. Really awesome dependency injection pattern. Makes coordinating globalish things much easier.
  38. Instead of passing a block param into the component, we just inject the service and use an alias.
  39. Sometimes you don’t know ahead of time which component to use. Could use crazy {{if}} branching… but its ugly. Use component helper instead. Demo advanced search builder.
  40. We have a file of search fields that we import. Notice the “component” property. Tells the interface what component to display if user adds this filter.
  41. Its javascript. Components don’t care what properties you pass in. When using component helper its useful to pass in anything that will be needed.
  42. Here we pass all the possible options to a component helper. The individual components know how to look up what data they need based on the type of component.
  43. Usually when I give a talk I do an arc where I build something up and then knock it down a little. I like to show all the sides. This time around the answers are right around the corner.
  44. Isolation in components today is really only one way. The outside world can set any of your components properties it wants
  45. No way to prevent it and no great way to reason about what was passed in vs came with the component.
  46. In glimmer properties passed into a component will be added to an attrs hash. Makes it sane to reason about what was passed in vs what is part of the component class.
  47. Attributes will also affect routable components. A new route hook allows you to specify what the attrs hash contains when your routable component is rendered.
  48. Glimmer also lands with some new lifecycle hooks inspired by react.
  49. An important new hook involving attires is willRecieveAttrs. Allows to react to attribute changes. Think of our pikaday component. If the format changes we probably need to recreate the plugin. Removes the need for an observer to handle this.
  50. Too many of my components have JS classes because I need to set properties on the elements tag or I need to catch and re-fire actions. The new element keyword removes the need for these classes and lets me handle everything in the template.
  51. The element keyword lets me set properties on the components element.
  52. Fragments give us a clear way to denote a component with no tag. Still unclear how this.$() will work. Might return a dom range, but may be left off completely.
  53. Actions now always need to be caught and re-fired. Can be tedious.Now actions will just be functions on the attrs hash.