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
99
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
280
Components on the Web: Frontend NE
jackfranklin
1
850
ReactiveConf: Lessons Migrating Complex Software
jackfranklin
0
530
Front Trends: Migrating complex software
jackfranklin
1
860
Migrating from Angular to React: Manc React
jackfranklin
1
220
Half Stack Fest: Webpack
jackfranklin
4
600
FullStackFest: Elm for JS Developers
jackfranklin
1
270
Codelicious: Intro to ES2015
jackfranklin
0
460
PolyConf: Elm for JS Developers
jackfranklin
0
310
Other Decks in Technology
See All in Technology
DDDのエッセンスを取り入れたAIでの開発
ak2ie
1
210
ホームラボ紹介
y_sera15
0
230
社内の7割が使うデータ基盤を、 データチーム2人で回すためにやったこと
koh_yoshi
4
1.5k
型落ちシンクライアント端末のPoEモジュールを自作したかった話
logica0419
0
320
AI画像認識を活用したゲーム内決済処理検証の自動化
gree_tech
PRO
0
260
MIXIで活躍できるエンジニアを 若手社員目線で考えてみる
mixi_engineers
PRO
0
130
【Aiming】共通基盤なのに「共通化しない」課金・認証基盤「LINK」が選び取ったシングルテナント戦略と運用の秘訣
saikeda
0
160
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
9.4k
長期運営で肥大化したExcelマスターデータの解消に向けた移行事例
gree_tech
PRO
0
260
形式手法特論:Hyperproperty とモデル検査 #kernelvm / Kernel VM Study Tokyo 19th
ytaka23
0
670
Go 1.27 の標準パッケージに uuid が入った!のでいろいろ喋る / go_127_std_go_uuid
convto
3
590
暗号化?某ファイルストレージはどうなるの!? 3rd Partyとうまく付き合う秘密度ラベル設計
kasada
0
140
Featured
See All Featured
Deep Space Network (abreviated)
tonyrice
0
270
WCS-LA-2024
lcolladotor
0
800
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
For a Future-Friendly Web
brad_frost
183
10k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
490
RailsConf 2023
tenderlove
30
1.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
680
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
430
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Designing for humans not robots
tammielis
254
26k
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