SlideShare a Scribd company logo
1 of 49
Download to read offline
MODULARIZE
ALLTHETHINGS
Buildingthecasefor
Modularization
Realworldexamples:
Monolithicapplications
The2013website
The2013website
stickyheader
parallax
contactform
carousel
Theelephant
intheroom
Reinventingthewheel
Reinventingthewheel
Notinventedheresyndrome
Reinventingthewheel
Notinventedheresyndrome
Learningcurve
Youcouldhave
itsomuchbetter
Modularizing
Identifying
reusable
blocks
Whatifreusinganelement
couldbeassimpleas:
Whatifreusinganelement
couldbeassimpleas:
Leavingthe
comfortzone
Timeforanew
workflow
Package
Managers
npm:
defaultNode.jspackagemanager
comeswithnewNode.jsinstallations
mostpopularfront-endpackagemanager
mustbeinstalledusingnpm
DifferencesbetweennpmandBower
package.json bower.json
Module
definition
window.namespace
window.namespace
CommonJS
AMD
UMD
UMD
Frameworks
AngularJS
Angularhasitsownmoduledefinitions.
DirectivesandServicesaregreat!
Newtechnologies
Webcomponents
Automating
Tasks
Yeoman
Yeomanisnotonlygreatforstartingbigprojects.
Runageneratorandgetyourmodule
structurereadyinamatterofseconds!
generator-node
generator-amd
generator-angular
Grunt
YourYeomangeneratorwillcertainlybringyou
aGruntfilewithmanyusefulGrunttasksbydefault.
Improveitwithtaskstospeedupmodulereleases:
grunt-bump
grunt-sg-release
Publishing
Itdoesn’tHAVEtobeopen-source.BothnpmandBower
supportsmanyendpointssuchasGit,SVN,zip,localfolder,etc.
npmpublish/bowerregister
Onceourpackageispublishedwecanjustinstallanduseit.
Justaswewanted:
Reusing
third-party
modules
CedricDugas
“CanIcodeitmyselfeasily?
DoIhavetime?
Whatbrowsersisthissupporting?
Numberofopenissues?
What’sthecodesize?
DoItrustthisguy(orteam)?”
Shareyour
modules!
Merci!
@ruyadorno
http://ruyadorno.com
-PaintallthememesbySamSpratt:http://samspratt.com/
-MonolithIIIbyTimJarvis:http://www.magnasoma.co.uk/#/monolith-3
-Elephantintheroomphoto:“BarelyLegal”exhibition,September15,2006.(REUTERS/FredProuser)
-LegoColorBricksbyAlanChia:http://commons.wikimedia.org/wiki/File:Lego_Color_Bricks.jpg
-FranzFerdinand-YouCouldHaveItSoMuchBetteralbumcover
-GoGopherpackagesphotobyNathanYoungman:http://nathany.com/go-packages/
--PatterntilesbyToniF:https://www.flickr.com/photos/st-lite/2660966951
-PileofKittensbyPeterHasselbom:https://www.flickr.com/photos/peter_hasselbom/3072326220
-Kittenk3byKubilayOzvardar:https://www.flickr.com/photos/mrkubi/1222735107
ImageCredits
-Packagemanagementsystem:http://en.wikipedia.org/wiki/Package_management_system
-NotInventedhere:http://en.wikipedia.org/wiki/Not_invented_here
-NPMPublish:https://www.npmjs.org/doc/cli/npm-publish.html
-BowerAPI:http://bower.io/docs/api/
-CommonJS:http://www.commonjs.org/
-Browserify:http://browserify.org/
-Nod-Node.jsmodulesDoc:http://nodejs.org/api/modules.html
-AMD:https://github.com/amdjs/amdjs-api
-RequireJS:http://requirejs.org/
-UMD:https://github.com/umdjs/umd
-Bower.jsonspec:https://github.com/bower/bower.json-spec
-npmpackage.jsonspec:https://www.npmjs.org/doc/files/package.json.html
-AngularJS:https://angularjs.org/
--Webcomponents:http://webcomponents.org/
-Moutandmodularity:http://blog.millermedeiros.com/mout-and-modularity/
-Substackopinionsonmodules:http://substack.net/how_I_write_modules
-DeathtomonolithiclibrariesbyCedricDugas:http://www.position-absolute.com/articles/death-to-mono-
lithic-libraries/
ListofJavascriptPackagemanagers:
-npm:https://www.npmjs.org/
-Bower:http://bower.io/
-Volo:http://volojs.org/
-Jam:http://jamjs.org/
-Component:https://github.com/component/component
References

More Related Content

Similar to Modularize all the things

Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable MasterpieceTransforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable MasterpieceDan Gribbin
 
Flu3nt highlights
Flu3nt highlightsFlu3nt highlights
Flu3nt highlightsdswork
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppEdureka!
 
AngularJS preso with directives and route resolve
AngularJS preso with directives and route resolveAngularJS preso with directives and route resolve
AngularJS preso with directives and route resolveBrent Goldstein
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To DjangoTuan Anh Tran
 
Writing Performant Front-end Code
Writing Performant Front-end CodeWriting Performant Front-end Code
Writing Performant Front-end CodeLyubomir Bozhinov
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed AssafAhmed Assaf
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Matthew McCullough
 
Strata CA 2019: From Jupyter to Production Manu Mukerji
Strata CA 2019: From Jupyter to Production Manu MukerjiStrata CA 2019: From Jupyter to Production Manu Mukerji
Strata CA 2019: From Jupyter to Production Manu MukerjiManu Mukerji
 
How to develop reusable components with Babel and Rollup.js
How to develop reusable components with Babel and Rollup.jsHow to develop reusable components with Babel and Rollup.js
How to develop reusable components with Babel and Rollup.jsHugo Magalhães
 
OSDC 2017 | Is that an Ansible? Stop holding it like a Puppet by Felix Frank
OSDC 2017 | Is that an Ansible? Stop holding it like a Puppet by Felix FrankOSDC 2017 | Is that an Ansible? Stop holding it like a Puppet by Felix Frank
OSDC 2017 | Is that an Ansible? Stop holding it like a Puppet by Felix FrankNETWAYS
 
OSDC 2017 - Felix Frank - Is that an Ansible_ Stop holding It Like a Puppet
OSDC 2017 - Felix Frank - Is that an Ansible_ Stop holding It Like a PuppetOSDC 2017 - Felix Frank - Is that an Ansible_ Stop holding It Like a Puppet
OSDC 2017 - Felix Frank - Is that an Ansible_ Stop holding It Like a PuppetNETWAYS
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To DjangoJay Graves
 
Building Massive AngularJS Apps
Building Massive AngularJS AppsBuilding Massive AngularJS Apps
Building Massive AngularJS AppsGordon Bockus
 
10 Businesses That Used Vue.js To Get To The Top.pdf
10 Businesses That Used Vue.js To Get To The Top.pdf10 Businesses That Used Vue.js To Get To The Top.pdf
10 Businesses That Used Vue.js To Get To The Top.pdfMoon Technolabs Pvt. Ltd.
 

Similar to Modularize all the things (20)

Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable MasterpieceTransforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
Flu3nt highlights
Flu3nt highlightsFlu3nt highlights
Flu3nt highlights
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web App
 
AngularJS preso with directives and route resolve
AngularJS preso with directives and route resolveAngularJS preso with directives and route resolve
AngularJS preso with directives and route resolve
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
 
Writing Performant Front-end Code
Writing Performant Front-end CodeWriting Performant Front-end Code
Writing Performant Front-end Code
 
React Django Presentation
React Django PresentationReact Django Presentation
React Django Presentation
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
Developers survival-guide
Developers survival-guideDevelopers survival-guide
Developers survival-guide
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
Strata CA 2019: From Jupyter to Production Manu Mukerji
Strata CA 2019: From Jupyter to Production Manu MukerjiStrata CA 2019: From Jupyter to Production Manu Mukerji
Strata CA 2019: From Jupyter to Production Manu Mukerji
 
How to develop reusable components with Babel and Rollup.js
How to develop reusable components with Babel and Rollup.jsHow to develop reusable components with Babel and Rollup.js
How to develop reusable components with Babel and Rollup.js
 
EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...
EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...
EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...
 
OSDC 2017 | Is that an Ansible? Stop holding it like a Puppet by Felix Frank
OSDC 2017 | Is that an Ansible? Stop holding it like a Puppet by Felix FrankOSDC 2017 | Is that an Ansible? Stop holding it like a Puppet by Felix Frank
OSDC 2017 | Is that an Ansible? Stop holding it like a Puppet by Felix Frank
 
OSDC 2017 - Felix Frank - Is that an Ansible_ Stop holding It Like a Puppet
OSDC 2017 - Felix Frank - Is that an Ansible_ Stop holding It Like a PuppetOSDC 2017 - Felix Frank - Is that an Ansible_ Stop holding It Like a Puppet
OSDC 2017 - Felix Frank - Is that an Ansible_ Stop holding It Like a Puppet
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
 
Building Massive AngularJS Apps
Building Massive AngularJS AppsBuilding Massive AngularJS Apps
Building Massive AngularJS Apps
 
10 Businesses That Used Vue.js To Get To The Top.pdf
10 Businesses That Used Vue.js To Get To The Top.pdf10 Businesses That Used Vue.js To Get To The Top.pdf
10 Businesses That Used Vue.js To Get To The Top.pdf
 

Recently uploaded

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
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 businesspanagenda
 
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 FMESafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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 DiscoveryTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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...Jeffrey Haguewood
 
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, ...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Recently uploaded (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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...
 
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, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Modularize all the things