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
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
290
Components on the Web: Frontend NE
jackfranklin
1
850
ReactiveConf: Lessons Migrating Complex Software
jackfranklin
0
530
Front Trends: Migrating complex software
jackfranklin
1
870
Migrating from Angular to React: Manc React
jackfranklin
1
220
Half Stack Fest: Webpack
jackfranklin
4
610
FullStackFest: Elm for JS Developers
jackfranklin
1
270
Codelicious: Intro to ES2015
jackfranklin
0
470
PolyConf: Elm for JS Developers
jackfranklin
0
310
Other Decks in Technology
See All in Technology
AI時代だからこそ、スケールしないことをやろう
yutashigemura
1
110
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
0
460
Bet AI Day 2026丨バクラク Autopilot、業務システムの再設計
layerx
PRO
2
1.6k
Amazon S3 Tablesに全部任せてみた結果——コンパクション/スナップショット管理は本当に手放せるか
shigeruoda
0
420
薬剤師(ドメインエキスパート)と一緒に育てる薬局向けAIアシスタント
kakehashi
PRO
2
120
Code4Lib JAPANカンファレンス2026 開会挨拶 / Code4Lib JAPAN Conference 2026: Opening Remarks
ykiyota
0
220
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
200
AI 駆動 Terraform 開発/SRE_BizReach_MIXI_2
visional_engineering_and_design
3
1.9k
「図書館」という名前のままでいいのか -Code4Lib JAPANカンファレンス2026 アンカンファレンス報告- / Code4Lib JAPAN Conference 2026: Unconference Report
ykiyota
0
110
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
230
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
410
Bet AI Day 2026丨Agentは、「金融」という巨大産業の何を変えられるのか
layerx
PRO
0
1.2k
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
980
How to make the Groovebox
asonas
2
2.4k
WENDY [Excerpt]
tessaabrams
12
39k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
Mind Mapping
helmedeiros
1
350
Exploring anti-patterns in Rails
aemeredith
3
500
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
510
Product Roadmaps are Hard
iamctodd
55
13k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
400
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
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