SlideShare a Scribd company logo
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 grid
soovor
 
Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
Visual Engineering
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General Overview
Visual Engineering
 
Fastest css3 animations
Fastest css3 animations Fastest css3 animations
Fastest css3 animations
Ismail Berkay Beyaz
 
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 design
Gopinath Ambothi
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
Chiheb Chebbi
 
Compass VS Less
Compass VS LessCompass VS Less
Compass VS Less
Sarah Hick
 
All About Sammy
All About SammyAll About Sammy
All About Sammy
Scott Becker
 
An Impromptu Introduction to HTML5 Canvas
An Impromptu Introduction to HTML5 CanvasAn Impromptu Introduction to HTML5 Canvas
An Impromptu Introduction to HTML5 CanvasBen Hodgson
 
Variations on a Theme
Variations on a ThemeVariations on a Theme
Variations on a Theme
Commercial Progression
 
Squishy pixels
Squishy pixelsSquishy pixels
Squishy pixels
FITC
 
Tools for Modern Web Design
Tools for Modern Web DesignTools for Modern Web Design
Tools for Modern Web Design
Commercial Progression
 
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
James Cryer
 
CSS Animations & Transitions
CSS Animations & TransitionsCSS Animations & Transitions
CSS Animations & Transitions
Edward 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 Browsers
Rachel 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 Flash
Thomas 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 tons of multi-device JavaScript applications - Part 1 : Boilerplate, design patterns & MVC(C), high performance UI

Death of a Themer
Death of a ThemerDeath of a Themer
Death of a Themer
James Panton
 
Knolx session
Knolx sessionKnolx session
Knolx session
Knoldus Inc.
 
End-to-end testing with geb
End-to-end testing with gebEnd-to-end testing with geb
End-to-end testing with geb
Jesús L. Domínguez Muriel
 
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
Kévin Margueritte
 
Node azure
Node azureNode azure
Node azure
Emanuele DelBono
 
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
Andrea Giannantonio
 
Only JavaScript, only Meteor.js
Only JavaScript, only Meteor.jsOnly JavaScript, only Meteor.js
Only JavaScript, only Meteor.js
Tomáš Hromník
 
Heroku pop-behind-the-sense
Heroku pop-behind-the-senseHeroku pop-behind-the-sense
Heroku pop-behind-the-sense
Ben Lin
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
Ryan 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 Webpack
Ignacio Martín
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
Daniel Cukier
 
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 ADta
b0ris_1
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Web
mikeleeme
 
IOC + Javascript
IOC + JavascriptIOC + Javascript
IOC + Javascript
Brian Cavalier
 
Oaf development-guide
Oaf development-guideOaf development-guide
Oaf development-guide俊 朱
 
Nodejs.meetup
Nodejs.meetupNodejs.meetup
Nodejs.meetup
Vivian S. Zhang
 

Similar to Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, design patterns & MVC(C), high performance UI (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-societe
Skilld
 
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
Skilld
 
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
Skilld
 
Lviv eurodrupalcamp 2015 - drupal contributor howto
Lviv eurodrupalcamp 2015  - drupal contributor howtoLviv eurodrupalcamp 2015  - drupal contributor howto
Lviv eurodrupalcamp 2015 - drupal contributor howto
Skilld
 
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
Skilld
 
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 8
Skilld
 
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 Drupal
Skilld
 
Drupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances DrupalDrupagora 2012 Optimisation performances Drupal
Drupagora 2012 Optimisation performances Drupal
Skilld
 

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

Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 

Recently uploaded (20)

Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 

Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, design patterns & MVC(C), high performance UI

  • 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