SlideShare a Scribd company logo
1 of 54
Download to read offline
Decoupling your JavaScript
Breaking large JavaScript into small pieces
Chico UI
Carousel
Modal
Chico UI
Why
Why
•Wrong inheritance pattern
Why
•Wrong inheritance pattern
•Non-extensible
Why
•Wrong inheritance pattern
•Non-extensible
•Non-scalable
Why
•Wrong inheritance pattern
•Non-extensible
•Non-scalable
•Miscommunication between widgets
v1.0
Modules
Modules
•Scalable
Modules
•Scalable
•Maintainable
Modules
•Scalable
•Maintainable
•Reusable
Best Practices
JavaScript doesn’t
provide modules
ECMAScript 6
2015
~
The Recipe
Identify
Define
Viewport

Desktop

Shared
JS

Mobile
JS

JS
Code!
Viewport

Desktop

Shared
JS

Mobile
JS

JS
shared/Viewport.js
shared/Viewport.js

prototype
shared/Viewport.js
Viewport

Desktop

Shared
JS

Mobile
JS

JS
desktop/Viewport.js
Viewport

Desktop

Shared
JS

Mobile
JS

JS
mobile/Viewport.js
Viewport Module
Why
•Wrong inheritance pattern
•Non-extensible
•Non-scalable
•Miscommunication between widgets
Why
•Wrong inheritance pattern
•Non-extensible
•Non-scalable
•Miscommunication between widgets
Communication
Callbacks
Events
Fight!
Fight!
Why
•Wrong inheritance pattern
•Non-extensible
•Non-scalable
•Miscommunication between widgets
Why
•Wrong inheritance pattern
•Non-extensible
•Non-scalable
•Miscommunication between widgets
Building
Modules
Package
Takeaway
•Chico v1.0
•Modules
•Extend with prototype
•Reuse: Mobile + Desktop
•Communicate via events
Fin

More Related Content

What's hot

Who is she in tunis advanced webmaster administration session
Who is she in tunis   advanced webmaster administration sessionWho is she in tunis   advanced webmaster administration session
Who is she in tunis advanced webmaster administration session
Michael Bryder
 

What's hot (13)

Single page applications
Single page applicationsSingle page applications
Single page applications
 
FusionCharts Clockworks
FusionCharts ClockworksFusionCharts Clockworks
FusionCharts Clockworks
 
CC 2015 Single Page Applications for the ASPNET Developer
CC 2015   Single Page Applications for the ASPNET DeveloperCC 2015   Single Page Applications for the ASPNET Developer
CC 2015 Single Page Applications for the ASPNET Developer
 
Webview: The fifth element
Webview: The fifth elementWebview: The fifth element
Webview: The fifth element
 
EXTRA: Workshop SOA, Microservices e Devops - Discoverability + Ui Arch
EXTRA: Workshop SOA, Microservices e Devops - Discoverability + Ui ArchEXTRA: Workshop SOA, Microservices e Devops - Discoverability + Ui Arch
EXTRA: Workshop SOA, Microservices e Devops - Discoverability + Ui Arch
 
Building web applications using kendo ui and the mvvm pattern
Building web applications using kendo ui and the mvvm patternBuilding web applications using kendo ui and the mvvm pattern
Building web applications using kendo ui and the mvvm pattern
 
MVVM & Validation with Kendo UI
MVVM & Validation with Kendo UIMVVM & Validation with Kendo UI
MVVM & Validation with Kendo UI
 
1 bootstrap-3-m0-slides
1 bootstrap-3-m0-slides1 bootstrap-3-m0-slides
1 bootstrap-3-m0-slides
 
Who is she in tunis advanced webmaster administration session
Who is she in tunis   advanced webmaster administration sessionWho is she in tunis   advanced webmaster administration session
Who is she in tunis advanced webmaster administration session
 
JavaScript와 TypeScript의 으리 있는 만남
JavaScript와 TypeScript의 으리 있는 만남JavaScript와 TypeScript의 으리 있는 만남
JavaScript와 TypeScript의 으리 있는 만남
 
Azure functions and container instances
Azure functions and container instancesAzure functions and container instances
Azure functions and container instances
 
BBUI
BBUIBBUI
BBUI
 
Easy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizEasy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataViz
 

Similar to Decoupling your JavaScript

Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Jeremy Likness
 
Priyanka_Resume_Oct102015
Priyanka_Resume_Oct102015Priyanka_Resume_Oct102015
Priyanka_Resume_Oct102015
priyanka gadia
 
Bala Sr Java Developer
Bala  Sr Java DeveloperBala  Sr Java Developer
Bala Sr Java Developer
Java Dev
 
JAVAJ2EE DeveloperSummary · 7 years of versatile e.docx
JAVAJ2EE DeveloperSummary       · 7 years of versatile e.docxJAVAJ2EE DeveloperSummary       · 7 years of versatile e.docx
JAVAJ2EE DeveloperSummary · 7 years of versatile e.docx
christiandean12115
 
SRIRAM THOTA_JAVA_RES
SRIRAM THOTA_JAVA_RESSRIRAM THOTA_JAVA_RES
SRIRAM THOTA_JAVA_RES
Sriram Thota
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao Behara
 

Similar to Decoupling your JavaScript (20)

Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
Sai Sharan_UI_Resume
Sai Sharan_UI_ResumeSai Sharan_UI_Resume
Sai Sharan_UI_Resume
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
Priyanka_Resume_Oct102015
Priyanka_Resume_Oct102015Priyanka_Resume_Oct102015
Priyanka_Resume_Oct102015
 
Sugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a timeSugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a time
 
Developing SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJSDeveloping SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJS
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
Bala Sr Java Developer
Bala  Sr Java DeveloperBala  Sr Java Developer
Bala Sr Java Developer
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with Knockoutjs
 
Woah, You Can Test IE & Microsoft Edge on a Mac?
Woah, You Can Test IE & Microsoft Edge on a Mac?Woah, You Can Test IE & Microsoft Edge on a Mac?
Woah, You Can Test IE & Microsoft Edge on a Mac?
 
Usersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJS
 
JAVAJ2EE DeveloperSummary · 7 years of versatile e.docx
JAVAJ2EE DeveloperSummary       · 7 years of versatile e.docxJAVAJ2EE DeveloperSummary       · 7 years of versatile e.docx
JAVAJ2EE DeveloperSummary · 7 years of versatile e.docx
 
JavaScripters Event Sep 17, 2016 · 2:00 PM: Scalable Javascript Design Patterns
JavaScripters Event Sep 17, 2016 · 2:00 PM: Scalable Javascript Design PatternsJavaScripters Event Sep 17, 2016 · 2:00 PM: Scalable Javascript Design Patterns
JavaScripters Event Sep 17, 2016 · 2:00 PM: Scalable Javascript Design Patterns
 
Internship softwaretraining@ijse
Internship softwaretraining@ijseInternship softwaretraining@ijse
Internship softwaretraining@ijse
 
Basics of Backbone.js
Basics of Backbone.jsBasics of Backbone.js
Basics of Backbone.js
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
SRIRAM THOTA_JAVA_RES
SRIRAM THOTA_JAVA_RESSRIRAM THOTA_JAVA_RES
SRIRAM THOTA_JAVA_RES
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_Webservice
 

More from Guillermo Paz

JavaScript: The prototype Property
JavaScript: The prototype PropertyJavaScript: The prototype Property
JavaScript: The prototype Property
Guillermo Paz
 
Chico UI - Retreat 2011
Chico UI - Retreat 2011Chico UI - Retreat 2011
Chico UI - Retreat 2011
Guillermo Paz
 

More from Guillermo Paz (7)

User First
User FirstUser First
User First
 
ES6 in Production [JSConfUY2015]
ES6 in Production [JSConfUY2015]ES6 in Production [JSConfUY2015]
ES6 in Production [JSConfUY2015]
 
HTML5: Introduction
HTML5: IntroductionHTML5: Introduction
HTML5: Introduction
 
JavaScript: The prototype Property
JavaScript: The prototype PropertyJavaScript: The prototype Property
JavaScript: The prototype Property
 
Estándares Web con Chico UI
Estándares Web con Chico UIEstándares Web con Chico UI
Estándares Web con Chico UI
 
Chico UI - Retreat 2011
Chico UI - Retreat 2011Chico UI - Retreat 2011
Chico UI - Retreat 2011
 
Weat - Presentación
Weat - PresentaciónWeat - Presentación
Weat - Presentación
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Decoupling your JavaScript