SlideShare a Scribd company logo
1 of 28
Download to read offline
Build tons of multi-device 
JavaScript applications 
Jean Baptiste Guerraz 
Skilld. CTO & Co-founder 
Igor Uzlov 
Skilld. Lead JS Developer 
http://www.skilld.fr
What Skilld is ? 
- A band of (20+) crazy IT punks :) 
- Distributed over 3 time slots 
- Ukraine, Russia, Peru = Skilld never stops! 
- Driven by French frogs 
- Who build any WWW related objects (wherever it’s 
displayed) 
- Using flexible open-source (only!) techs (Can.JS, 
Cordova, Node.js, Drupal, Symfony and few more!) 
- Only one limit! 72h!
What Skilld were asked to do ? 
An application that works on the following platforms: 
- Mobile (Android, IOS, Windows Phone) 
- From IOS 5 & Android 2.3 ;( 
- Tablets (Android, IOS) 
- Facebook 
- Website (multi-device)
What needs 
to complete that mission ? 
- A light framework 
- Yeah… Android 2.3+ / IOS 5 
- A performances oriented framework 
- A backbone 
- But not backbone.js! (We used it too much already!) 
- A way to manage layouts 
- A wrapper for mobile / tablets applications
A light and performant framework ? 
http://bit.ly/1dlnWRg
A light and performant framework ? 
http://bit.ly/1uR0OXc 
Controllers initialization
A light and performant framework ? 
http://bit.ly/1uR0OXc 
Live-Binding initialization
Model View Constructor Controller 
- Model 
A backbone ? 
- From REST service to (observables) Objects 
- A kind of JS ORM :) 
- View 
- Just a template ;) 
- Mustache.js 
- Constructor (require init & destroy methods) 
- An object that deals only with processing 
- Controller (require init & destroy methods) 
- An object responsible for a part of, or the whole, 
User Interface (an object that deals with DOM) 
Give your projects a structure punks!
A backbone ? 
Asynchronous Module Definitions 
RequireJS 
● File loader 
● Module definitions 
● Dependencies management 
● Works super fast with nodejs (r.js) 
o Run AMD-based projects in Node and Rhino. 
o but please, use Node! ;) 
o Includes the RequireJS Optimizer that combines 
(and minify thanks to Uglifyjs) scripts for optimal 
browser delivery.
A backbone ? 
Asynchronous Module Definitions 
Let’s optimize our project!
A backbone? 
Event driven Finite State Machine 
For example this...
Let’s add a context! 
An (observable) key / value storage related to 
current state 
Car radio example 
State : radio 
Context : FM frequency value 
State : MP3 player 
Context : mp3 file URI
A backbone? 
Mediator pattern 
A central object for all others to communicate 
(publish / subscribe) 
Once again, the state context to the rescue! 
http://bit.ly/1AxOFeg
A backbone ? 
Observers pattern 
A simple way to know what’s going on, and so when to react! 
Keep it easy, Observe the state context :) 
http://bit.ly/1xNsfES
A backbone ? 
Abstract Factory / Builder pattern 
Build my objects punk! 
http://bit.ly/1AxOKib
A backbone ? 
Layouts & Regions
A backbone ? 
Layouts & Regions 
Give your UI a high flexibility! 
- Layout 
- A set of regions 
- A template (mustache) 
- Region 
- A “place” to print out some HTML 
- Or even a layout 
- Inception rocks! 
(Layout > Region > Layout > Region…)
Layouts & Regions 
Layout definition file : 
define 
( 
function() 
{ 
return { 
name: 'twoRows', 
layout: 'views/layouts/twoRows.mustache', 
regions: 
[ 
{name:'row1', selector:'.two-rows-row-1'}, 
{name:'row2', selector:'.two-rows-row-2'} 
] 
} 
} 
);
Layouts & Regions 
Layout template file : 
<div class="two-rows-row-1"></div> 
<div class="two-rows-row-2"></div>
Layouts & Regions 
A region is a 
Document Fragment 
(performances matter!)
Files & Directories 
www/ 
|-- app 
| |-- config 
| |-- constructors 
| |-- controllers 
| |-- fixtures 
| |-- layouts 
| |-- models 
| |-- views 
… 
|-- vendors 
| |-- can 
| |-- skilld 
| |-- jquery 
| |-- zepto 
| |-- require 
| |-- lawnchair 
| |-- i18n 
... 
|-- vendors/skilld 
|-- construct 
| |-- stateInterface.js 
|-- controller 
| |-- stateInterface.js 
| |-- pageInterface.js 
|-- model 
|-- ui 
| |-- layouts.js 
| |-- ... 
autoloader.js 
model.js 
router.js 
state.js 
storage.js 
workers.js
Configurations ? 
www/app/config/ 
|-- i18n 
| -- locales.js 
|-- layouts 
| |-- about.js 
| |-- account.js 
| |-- activities.js 
... 
|-- routes 
| |-- about.js 
| |-- account.js 
| |-- activities.js 
... 
-- workers 
|-- about.js 
|-- account.js 
|-- activities.js 
….
Configurations - Routes 
... 
return [ 
{ 
query: '/login', 
defaults: {}, 
state: 'login' 
} 
]; 
... 
... 
return [ 
{ 
query: '/help/:helpAboutItem', 
defaults: 
{ 
'helpAboutItem' : 1 
}, 
state: 'help' 
} 
]; 
...
Configurations - Workers 
... 
state: 
{ 
login: 
[ 
{path: 'constructors/authentication', recycle: true}, 
{path: 'controllers/login', recycle: false} 
] 
}, 
stateContext: { 
checkin: [ 
{path: 'controllers/checkin', recycle: false} 
] 
} 
...
Configurations - Layouts 
... 
state: 
{ 
friends: 
[ 
{name: 'base', target: null, path: 'layouts/base'}, 
{name: 'main', target: 'base.content', path: 'layouts/main'}, 
{name: '2rows', target: 'base.content.main.content', path: 'layouts/2rows'} 
] 
}, 
stateContext: {} 
...
A wrapper for 
mobile / tablets applications 
Apache Cordova 
(or PhoneGap)
Apache Cordova (/ Phonegap) 
Develop once deploy everywhere! 
● Cordova is… 
o Just a browser! (chrome webview or android stock browser 
webview) 
o A JS API to access devices features 
o Compass 
o Accelerometer 
o File System / File Transfer 
o Splashscreen 
o Camera 
o Contacts 
o Media 
o And plenty of other cool plugins (like FacebookConnect, 
SocialSharing, … and custom ones!!)
Thank you! Merci! Дякую! 
Any question ? 
SkilldJS Comming soon on GitHub :) 
@jbguerraz 
@iuzlov 
http://www.skilld.fr/en 
Find those slides on Slideshare : 
@iuzlov / @jbguerraz

More Related Content

What's hot

Adaptive theming using compass susy grid
Adaptive theming using compass susy gridAdaptive theming using compass susy grid
Adaptive theming using compass susy gridsoovor
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewVisual Engineering
 
React & Radium (Colin Megill)
React & Radium (Colin Megill) React & Radium (Colin Megill)
React & Radium (Colin Megill) Future Insights
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignChiheb Chebbi
 
Compass VS Less
Compass VS LessCompass VS Less
Compass VS LessSarah Hick
 
An Impromptu Introduction to HTML5 Canvas
An Impromptu Introduction to HTML5 CanvasAn Impromptu Introduction to HTML5 Canvas
An Impromptu Introduction to HTML5 CanvasBen Hodgson
 
Squishy pixels
Squishy pixelsSquishy pixels
Squishy pixelsFITC
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingJames Cryer
 
CSS Animations & Transitions
CSS Animations & TransitionsCSS Animations & Transitions
CSS Animations & TransitionsEdward Meehan
 
Interface Styling & Scripting on WebKit Mobile
Interface Styling & Scripting on WebKit MobileInterface Styling & Scripting on WebKit Mobile
Interface Styling & Scripting on WebKit MobileDavid Aurelio
 
Perch, Patterns and Old Browsers
Perch, Patterns and Old BrowsersPerch, Patterns and Old Browsers
Perch, Patterns and Old BrowsersRachel Andrew
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not FlashThomas Fuchs
 

What's hot (18)

Adaptive theming using compass susy grid
Adaptive theming using compass susy gridAdaptive theming using compass susy grid
Adaptive theming using compass susy grid
 
Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General Overview
 
Fastest css3 animations
Fastest css3 animations Fastest css3 animations
Fastest css3 animations
 
React & Radium (Colin Megill)
React & Radium (Colin Megill) React & Radium (Colin Megill)
React & Radium (Colin Megill)
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Compass VS Less
Compass VS LessCompass VS Less
Compass VS Less
 
All About Sammy
All About SammyAll About Sammy
All About Sammy
 
An Impromptu Introduction to HTML5 Canvas
An Impromptu Introduction to HTML5 CanvasAn Impromptu Introduction to HTML5 Canvas
An Impromptu Introduction to HTML5 Canvas
 
Variations on a Theme
Variations on a ThemeVariations on a Theme
Variations on a Theme
 
Squishy pixels
Squishy pixelsSquishy pixels
Squishy pixels
 
Tools for Modern Web Design
Tools for Modern Web DesignTools for Modern Web Design
Tools for Modern Web Design
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y trying
 
CSS Animations & Transitions
CSS Animations & TransitionsCSS Animations & Transitions
CSS Animations & Transitions
 
Interface Styling & Scripting on WebKit Mobile
Interface Styling & Scripting on WebKit MobileInterface Styling & Scripting on WebKit Mobile
Interface Styling & Scripting on WebKit Mobile
 
Perch, Patterns and Old Browsers
Perch, Patterns and Old BrowsersPerch, Patterns and Old Browsers
Perch, Patterns and Old Browsers
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 

Similar to Build JavaScript Apps for Multiple Devices

FP - Découverte de Play Framework Scala
FP - Découverte de Play Framework ScalaFP - Découverte de Play Framework Scala
FP - Découverte de Play Framework ScalaKévin Margueritte
 
Once upon a time, there were css, js and server-side rendering
Once upon a time, there were css, js and server-side renderingOnce upon a time, there were css, js and server-side rendering
Once upon a time, there were css, js and server-side renderingAndrea Giannantonio
 
Only JavaScript, only Meteor.js
Only JavaScript, only Meteor.jsOnly JavaScript, only Meteor.js
Only JavaScript, only Meteor.jsTomáš Hromník
 
Heroku pop-behind-the-sense
Heroku pop-behind-the-senseHeroku pop-behind-the-sense
Heroku pop-behind-the-senseBen Lin
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Ryan Price
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackIgnacio Martín
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1Mohammad Qureshi
 
Scalding big ADta
Scalding big ADtaScalding big ADta
Scalding big ADtab0ris_1
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Webmikeleeme
 
Oaf development-guide
Oaf development-guideOaf development-guide
Oaf development-guide俊 朱
 

Similar to Build JavaScript Apps for Multiple Devices (20)

Death of a Themer
Death of a ThemerDeath of a Themer
Death of a Themer
 
Windows 8 for Web Developers
Windows 8 for Web DevelopersWindows 8 for Web Developers
Windows 8 for Web Developers
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
End-to-end testing with geb
End-to-end testing with gebEnd-to-end testing with geb
End-to-end testing with geb
 
FP - Découverte de Play Framework Scala
FP - Découverte de Play Framework ScalaFP - Découverte de Play Framework Scala
FP - Découverte de Play Framework Scala
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Node azure
Node azureNode azure
Node azure
 
Once upon a time, there were css, js and server-side rendering
Once upon a time, there were css, js and server-side renderingOnce upon a time, there were css, js and server-side rendering
Once upon a time, there were css, js and server-side rendering
 
Only JavaScript, only Meteor.js
Only JavaScript, only Meteor.jsOnly JavaScript, only Meteor.js
Only JavaScript, only Meteor.js
 
Heroku pop-behind-the-sense
Heroku pop-behind-the-senseHeroku pop-behind-the-sense
Heroku pop-behind-the-sense
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
Scalding big ADta
Scalding big ADtaScalding big ADta
Scalding big ADta
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Web
 
IOC + Javascript
IOC + JavascriptIOC + Javascript
IOC + Javascript
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Oaf development-guide
Oaf development-guideOaf development-guide
Oaf development-guide
 
Nodejs.meetup
Nodejs.meetupNodejs.meetup
Nodejs.meetup
 

More from Skilld

201910 skilld presentation-societe
201910 skilld presentation-societe201910 skilld presentation-societe
201910 skilld presentation-societeSkilld
 
Session Drupagora 2019 - Agilité dans tous ses états
Session Drupagora 2019 - Agilité dans tous ses étatsSession Drupagora 2019 - Agilité dans tous ses états
Session Drupagora 2019 - Agilité dans tous ses étatsSkilld
 
Case study : 2 applications mobiles réalisées avec Drupal
Case study : 2 applications mobiles réalisées avec DrupalCase study : 2 applications mobiles réalisées avec Drupal
Case study : 2 applications mobiles réalisées avec DrupalSkilld
 
Lviv eurodrupalcamp 2015 - drupal contributor howto
Lviv eurodrupalcamp 2015  - drupal contributor howtoLviv eurodrupalcamp 2015  - drupal contributor howto
Lviv eurodrupalcamp 2015 - drupal contributor howtoSkilld
 
Drupal, les hackers, la sécurité & les (très) grands comptes
Drupal, les hackers, la sécurité & les (très) grands comptesDrupal, les hackers, la sécurité & les (très) grands comptes
Drupal, les hackers, la sécurité & les (très) grands comptesSkilld
 
Lviv 2013 d7 vs d8
Lviv 2013 d7 vs d8Lviv 2013 d7 vs d8
Lviv 2013 d7 vs d8Skilld
 
Retrospective 2013 de Drupal !
Retrospective 2013 de Drupal !Retrospective 2013 de Drupal !
Retrospective 2013 de Drupal !Skilld
 
Retrospective 2013 de la communauté Drupal 8
Retrospective 2013 de la communauté Drupal 8Retrospective 2013 de la communauté Drupal 8
Retrospective 2013 de la communauté Drupal 8Skilld
 
Drupal Camp Kiev 2012 - High Performance Drupal Web Sites
Drupal Camp Kiev 2012 - High Performance Drupal Web SitesDrupal Camp Kiev 2012 - High Performance Drupal Web Sites
Drupal Camp Kiev 2012 - High Performance Drupal Web SitesSkilld
 
Drupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances DrupalDrupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances DrupalSkilld
 
Drupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances DrupalDrupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances DrupalSkilld
 

More from Skilld (11)

201910 skilld presentation-societe
201910 skilld presentation-societe201910 skilld presentation-societe
201910 skilld presentation-societe
 
Session Drupagora 2019 - Agilité dans tous ses états
Session Drupagora 2019 - Agilité dans tous ses étatsSession Drupagora 2019 - Agilité dans tous ses états
Session Drupagora 2019 - Agilité dans tous ses états
 
Case study : 2 applications mobiles réalisées avec Drupal
Case study : 2 applications mobiles réalisées avec DrupalCase study : 2 applications mobiles réalisées avec Drupal
Case study : 2 applications mobiles réalisées avec Drupal
 
Lviv eurodrupalcamp 2015 - drupal contributor howto
Lviv eurodrupalcamp 2015  - drupal contributor howtoLviv eurodrupalcamp 2015  - drupal contributor howto
Lviv eurodrupalcamp 2015 - drupal contributor howto
 
Drupal, les hackers, la sécurité & les (très) grands comptes
Drupal, les hackers, la sécurité & les (très) grands comptesDrupal, les hackers, la sécurité & les (très) grands comptes
Drupal, les hackers, la sécurité & les (très) grands comptes
 
Lviv 2013 d7 vs d8
Lviv 2013 d7 vs d8Lviv 2013 d7 vs d8
Lviv 2013 d7 vs d8
 
Retrospective 2013 de Drupal !
Retrospective 2013 de Drupal !Retrospective 2013 de Drupal !
Retrospective 2013 de Drupal !
 
Retrospective 2013 de la communauté Drupal 8
Retrospective 2013 de la communauté Drupal 8Retrospective 2013 de la communauté Drupal 8
Retrospective 2013 de la communauté Drupal 8
 
Drupal Camp Kiev 2012 - High Performance Drupal Web Sites
Drupal Camp Kiev 2012 - High Performance Drupal Web SitesDrupal Camp Kiev 2012 - High Performance Drupal Web Sites
Drupal Camp Kiev 2012 - High Performance Drupal Web Sites
 
Drupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances DrupalDrupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances Drupal
 
Drupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances DrupalDrupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances Drupal
 

Recently uploaded

定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Personfurqan222004
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 

Recently uploaded (20)

定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Person
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 

Build JavaScript Apps for Multiple Devices

  • 1. Build tons of multi-device JavaScript applications Jean Baptiste Guerraz Skilld. CTO & Co-founder Igor Uzlov Skilld. Lead JS Developer http://www.skilld.fr
  • 2. What Skilld is ? - A band of (20+) crazy IT punks :) - Distributed over 3 time slots - Ukraine, Russia, Peru = Skilld never stops! - Driven by French frogs - Who build any WWW related objects (wherever it’s displayed) - Using flexible open-source (only!) techs (Can.JS, Cordova, Node.js, Drupal, Symfony and few more!) - Only one limit! 72h!
  • 3. What Skilld were asked to do ? An application that works on the following platforms: - Mobile (Android, IOS, Windows Phone) - From IOS 5 & Android 2.3 ;( - Tablets (Android, IOS) - Facebook - Website (multi-device)
  • 4. What needs to complete that mission ? - A light framework - Yeah… Android 2.3+ / IOS 5 - A performances oriented framework - A backbone - But not backbone.js! (We used it too much already!) - A way to manage layouts - A wrapper for mobile / tablets applications
  • 5. A light and performant framework ? http://bit.ly/1dlnWRg
  • 6. A light and performant framework ? http://bit.ly/1uR0OXc Controllers initialization
  • 7. A light and performant framework ? http://bit.ly/1uR0OXc Live-Binding initialization
  • 8. Model View Constructor Controller - Model A backbone ? - From REST service to (observables) Objects - A kind of JS ORM :) - View - Just a template ;) - Mustache.js - Constructor (require init & destroy methods) - An object that deals only with processing - Controller (require init & destroy methods) - An object responsible for a part of, or the whole, User Interface (an object that deals with DOM) Give your projects a structure punks!
  • 9. A backbone ? Asynchronous Module Definitions RequireJS ● File loader ● Module definitions ● Dependencies management ● Works super fast with nodejs (r.js) o Run AMD-based projects in Node and Rhino. o but please, use Node! ;) o Includes the RequireJS Optimizer that combines (and minify thanks to Uglifyjs) scripts for optimal browser delivery.
  • 10. A backbone ? Asynchronous Module Definitions Let’s optimize our project!
  • 11. A backbone? Event driven Finite State Machine For example this...
  • 12. Let’s add a context! An (observable) key / value storage related to current state Car radio example State : radio Context : FM frequency value State : MP3 player Context : mp3 file URI
  • 13. A backbone? Mediator pattern A central object for all others to communicate (publish / subscribe) Once again, the state context to the rescue! http://bit.ly/1AxOFeg
  • 14. A backbone ? Observers pattern A simple way to know what’s going on, and so when to react! Keep it easy, Observe the state context :) http://bit.ly/1xNsfES
  • 15. A backbone ? Abstract Factory / Builder pattern Build my objects punk! http://bit.ly/1AxOKib
  • 16. A backbone ? Layouts & Regions
  • 17. A backbone ? Layouts & Regions Give your UI a high flexibility! - Layout - A set of regions - A template (mustache) - Region - A “place” to print out some HTML - Or even a layout - Inception rocks! (Layout > Region > Layout > Region…)
  • 18. Layouts & Regions Layout definition file : define ( function() { return { name: 'twoRows', layout: 'views/layouts/twoRows.mustache', regions: [ {name:'row1', selector:'.two-rows-row-1'}, {name:'row2', selector:'.two-rows-row-2'} ] } } );
  • 19. Layouts & Regions Layout template file : <div class="two-rows-row-1"></div> <div class="two-rows-row-2"></div>
  • 20. Layouts & Regions A region is a Document Fragment (performances matter!)
  • 21. Files & Directories www/ |-- app | |-- config | |-- constructors | |-- controllers | |-- fixtures | |-- layouts | |-- models | |-- views … |-- vendors | |-- can | |-- skilld | |-- jquery | |-- zepto | |-- require | |-- lawnchair | |-- i18n ... |-- vendors/skilld |-- construct | |-- stateInterface.js |-- controller | |-- stateInterface.js | |-- pageInterface.js |-- model |-- ui | |-- layouts.js | |-- ... autoloader.js model.js router.js state.js storage.js workers.js
  • 22. Configurations ? www/app/config/ |-- i18n | -- locales.js |-- layouts | |-- about.js | |-- account.js | |-- activities.js ... |-- routes | |-- about.js | |-- account.js | |-- activities.js ... -- workers |-- about.js |-- account.js |-- activities.js ….
  • 23. Configurations - Routes ... return [ { query: '/login', defaults: {}, state: 'login' } ]; ... ... return [ { query: '/help/:helpAboutItem', defaults: { 'helpAboutItem' : 1 }, state: 'help' } ]; ...
  • 24. Configurations - Workers ... state: { login: [ {path: 'constructors/authentication', recycle: true}, {path: 'controllers/login', recycle: false} ] }, stateContext: { checkin: [ {path: 'controllers/checkin', recycle: false} ] } ...
  • 25. Configurations - Layouts ... state: { friends: [ {name: 'base', target: null, path: 'layouts/base'}, {name: 'main', target: 'base.content', path: 'layouts/main'}, {name: '2rows', target: 'base.content.main.content', path: 'layouts/2rows'} ] }, stateContext: {} ...
  • 26. A wrapper for mobile / tablets applications Apache Cordova (or PhoneGap)
  • 27. Apache Cordova (/ Phonegap) Develop once deploy everywhere! ● Cordova is… o Just a browser! (chrome webview or android stock browser webview) o A JS API to access devices features o Compass o Accelerometer o File System / File Transfer o Splashscreen o Camera o Contacts o Media o And plenty of other cool plugins (like FacebookConnect, SocialSharing, … and custom ones!!)
  • 28. Thank you! Merci! Дякую! Any question ? SkilldJS Comming soon on GitHub :) @jbguerraz @iuzlov http://www.skilld.fr/en Find those slides on Slideshare : @iuzlov / @jbguerraz