Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Modular JavaScript: FEL, Feb 2013
Search
Jack Franklin
February 28, 2013
Technology
96
0
Share
Modular JavaScript: FEL, Feb 2013
Jack Franklin
February 28, 2013
More Decks by Jack Franklin
See All by Jack Franklin
Advanced React Meetup: Testing JavaScript
jackfranklin
1
260
Components on the Web: Frontend NE
jackfranklin
1
850
ReactiveConf: Lessons Migrating Complex Software
jackfranklin
0
520
Front Trends: Migrating complex software
jackfranklin
1
840
Migrating from Angular to React: Manc React
jackfranklin
1
210
Half Stack Fest: Webpack
jackfranklin
4
590
FullStackFest: Elm for JS Developers
jackfranklin
1
270
Codelicious: Intro to ES2015
jackfranklin
0
430
PolyConf: Elm for JS Developers
jackfranklin
0
300
Other Decks in Technology
See All in Technology
会社説明資料|株式会社ギークプラス ソフトウェア事業部
geekplus_tech
0
220
10サービス以上のメール到達率改善を地道に継続的に進めている話 / Continue to improve email delivery rates across multiple services
yamaguchitk333
6
1.7k
AI時代に越境し、 組織を変えるQAスキルの正体 / QA Skills for Transforming an Organization
mii3king
5
4.4k
知ってた?JavaScriptの"正しさ"を検証するテストが5万以上もあること(Test262)
riyaamemiya
1
200
ブラウザの投機的読み込みと投機ルールAPIを理解し、Webサービスのパフォーマンスを最適化する
shuta13
3
310
なぜ、私がCommunity Builderに?〜活動期間1か月半でも選出されたワケ〜
yama3133
0
130
20260515 ⾃分のアカウントとプライバシーを守る認証と認可の話〜利⽤者向け〜
oidfj
0
140
20260513_生成AIを専属DSに_AI分析結果の検品テクニック_ハンズオン_交通事故データ
doradora09
PRO
0
220
雑談は、センサーだった
bitkey
PRO
2
240
オライリーイベント登壇資料「鉄リサイクル・産廃業界におけるAI技術実応用のカタチ」
takarasawa_
0
400
iOS・Androidの文字サイズ設定をWebViewに!モバイルUIのアクセシビリティTips
shincarpediem
2
100
ワールドカフェ再び、そしてゴール・ルール・ロール・ツール / World Café Revisited, and the Goals-Rules-Roles-Tools
ks91
PRO
0
150
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
300
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
ラッコキーワード サービス紹介資料
rakko
1
3.3M
The Pragmatic Product Professional
lauravandoore
37
7.3k
How to Talk to Developers About Accessibility
jct
2
190
A designer walks into a library…
pauljervisheath
211
24k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
280
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Statistics for Hackers
jakevdp
799
230k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
400
A better future with KSS
kneath
240
18k
Transcript
Modular JavaScript @Jack_Franklin
First: An Apology...
Who is this guy? Author of "Beginning jQuery" Blogger at
javascriptplayground.com Developer for Kainos (JS & Ruby) Comp-Sci student at University of Bath
Book Giveaway! Tweet your most cringe-worthy, clean joke with the
hashtag #feljoke I'll pick two winners once I'm done talking.
The era of web applications
What is Modular Development?
Separation of Concerns
One Module One Concern
Loose Coupling
modules don't know about each other modules are independent modules
don't talk to each other directly so they need some way of communicating
Publish and Subscribe
Modules have no knowledge of each other Modules publish events
Modules subscribe to events Loosely coupled, more maintainable modules don't publish events to specific other modules, but just do it generally
JS Patterns JavaScript is really good!
The Module Pattern var APP = (function() { var _count
= 0; var incrementCount = function() { _count++; } var getCount = function() { return _count; } return { incrementCount: incrementCount, getCount: getCount }; })(); _count is kept private can only be manipulated through incrementCount
RequireJS
RequireJS Implements the AMD Spec define() modules require() them No
more <script> tag rubbish Dynamic module loading Build tool
Package Managers
Package Managers JamJS Bower Component Volo nodefetch
GruntJS The JavaScript Task Runner
GruntJS Run tasks on your JS, including plugins for: -
Concatenating - Minifying - RequireJS Build Tool - Sass / LESS - CoffeeScript - Handlebars / Jade / templating - QUnit / Jasmine / Mocha / testing
Going Modular
- one step at a time - split your JS
up (in development) - use a tool (Grunt) for production JS - jQuery does Pub/Sub - initial hurdles outweighed by long-term gains
Questions? @Jack_Franklin javascriptplayground.com jackfranklin.co.uk github.com/jackfranklin