Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
0
95
Modular JavaScript: FEL, Feb 2013
Jack Franklin
February 28, 2013
Tweet
Share
More Decks by Jack Franklin
See All by Jack Franklin
Advanced React Meetup: Testing JavaScript
jackfranklin
1
240
Components on the Web: Frontend NE
jackfranklin
1
820
ReactiveConf: Lessons Migrating Complex Software
jackfranklin
0
490
Front Trends: Migrating complex software
jackfranklin
1
820
Migrating from Angular to React: Manc React
jackfranklin
1
190
Half Stack Fest: Webpack
jackfranklin
4
560
FullStackFest: Elm for JS Developers
jackfranklin
1
250
Codelicious: Intro to ES2015
jackfranklin
0
390
PolyConf: Elm for JS Developers
jackfranklin
0
280
Other Decks in Technology
See All in Technology
re:Invent 2025 ~何をする者であり、どこへいくのか~
tetutetu214
0
210
今年のデータ・ML系アップデートと気になるアプデのご紹介
nayuts
1
290
AWS Trainium3 をちょっと身近に感じたい
bigmuramura
1
140
Lessons from Migrating to OpenSearch: Shard Design, Log Ingestion, and UI Decisions
sansantech
PRO
1
120
品質のための共通認識
kakehashi
PRO
3
250
Snowflakeでデータ基盤を もう一度作り直すなら / rebuilding-data-platform-with-snowflake
pei0804
4
1.4k
AWSを使う上で最低限知っておきたいセキュリティ研修を社内で実施した話 ~みんなでやるセキュリティ~
maimyyym
2
320
AIと二人三脚で育てた、個人開発アプリグロース術
zozotech
PRO
1
710
生成AIでテスト設計はどこまでできる? 「テスト粒度」を操るテーラリング術
shota_kusaba
0
700
コミューンのデータ分析AIエージェント「Community Sage」の紹介
fufufukakaka
0
480
グレートファイアウォールを自宅に建てよう
ctes091x
0
150
WordPress は終わったのか ~今のWordPress の制作手法ってなにがあんねん?~ / Is WordPress Over? How We Build with WordPress Today
tbshiki
1
710
Featured
See All Featured
Thoughts on Productivity
jonyablonski
73
5k
Site-Speed That Sticks
csswizardry
13
1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Building Applications with DynamoDB
mza
96
6.8k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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