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
Large Scale JavaScript Application Architecture
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Frontend NE
February 04, 2016
Technology
820
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Large Scale JavaScript Application Architecture
Frontend NE
February 04, 2016
More Decks by Frontend NE
See All by Frontend NE
Standardizing 'select': What the future holds for HTML - Stephanie Stimac @ FrontendNE
frontendne
4
470
CSS Regression testing - James A Lambert @ FrontendNE
frontendne
1
380
Building a design system for Lloyds Banking - Lilly Dart @ FrontendNE
frontendne
0
1.6k
What I learnt about hiring diverse teams from conducting a fully-anonymous recruitment process - Bethan Vicent
frontendne
0
340
Web Design that Doesn't Make Trans People Uncomfortable - Jessica Kelsall
frontendne
0
800
Contain yourself - Docker for developers
frontendne
2
310
Design process of a website
frontendne
0
370
What the JAMstack?
frontendne
1
1k
Talking the talk
frontendne
0
580
Other Decks in Technology
See All in Technology
医療の現場を変革に挑戦した半年間の軌跡 - PythonとAIで現場を変える / From Code to Care
soudai
PRO
0
560
[potatotips #96] Give Your AI Agent the Flutter Playbook
korodroid
0
140
SmartHR Engineering Team Deck
smarthr
1
3.4k
Rust×eBPFでEDRっぽいものをつくる
sunlife3
2
820
小粒でもパワフルなJS Runtime Antjsについて
comamoca
0
120
Head First モブプログラミング / Head First Mobprogramming
takaking22
10
12k
ホームラボ紹介
y_sera15
0
230
【Aiming】共通基盤なのに「共通化しない」課金・認証基盤「LINK」が選び取ったシングルテナント戦略と運用の秘訣
saikeda
0
140
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
170
属人化を叩き割れ!「制作加速」と「安定化」の矛盾を打破する:8年目プロダクトが辿り着いた「ミスが起こり得ない」アセット制作フローの全貌
gree_tech
PRO
0
120
Sets in Go
ramalho
1
1.2k
AI画像認識を活用したゲーム内決済処理検証の自動化
gree_tech
PRO
0
110
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
KATA
mclloyd
PRO
35
15k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
480
The SEO identity crisis: Don't let AI make you average
varn
0
530
A Modern Web Designer's Workflow
chriscoyier
698
190k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
500
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
950
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Designing Experiences People Love
moore
143
24k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Transcript
Large Scale JavaScript Large Scale JavaScript Application Architecture Application Architecture
ahumphreys87 ahumphreys87 JavaScript Architect at Bede Gaming. JavaScript Game Framework
that powers cross platform Bingo client and Slots games. Node.js Slots Engine, Chat Server. Node.js API facade. Core contributor to Marionette.js Issue triaging, Pull Request reviews. Bug fixing. New features!
Introduction Introduction What is a large JavaScript application? Common Pitfalls.
Useful Patterns. How frameworks apply these principles. Questions???
Over 100,000 LOC? Over Xmb in size? Lots of files?
Hard to maintain What is a Large JavaScript What is a Large JavaScript Application? Application?
"A large JavaScript application is a non-trivial application that requires
significant effort to maintain and where most of the data manipulation takes place in the browser." Addy Osmani
Modularise Modularise Break the large application up. Think of logical
components. Different sections on the screen?
4 Questions 4 Questions 1. Can I reuse my modules?
2. Will my application still function if this breaks? 3. Is it testable? 4. Does it depend on anything else?
Common Pitfalls Common Pitfalls Tight coupling. Event webs. Lack of
tests.
Tight Coupling Tight Coupling Modules depend on each other. What
happens if another module breaks? Can we reuse this module? Can you test it?
Event Webs Event Webs
Often caused by tight coupling. Modules fire events between each
other. Debugging becomes difficult. Untestable.
Loosen up! Loosen up! Loosely coupled modules. They can be
reused. They don't depend on others. They are easy to test. Create a Facade. Create a Mediator.
Facade Facade
Abstracts complexity. Exposes a simple interface. bind/trigger. Modules only communicate
with the facade.
Mediator Mediator
The "brains" of the application. Performs application specific actions based
on the events. Controls what the facade listens for. Controls what the facade sends where.
The Result The Result Modules can break without breaking the
full application. Modules can be tested independently. Modules can be reused.
How do the big guns do it? How do the
big guns do it? Backbone.Radio Services Vanilla Classes Directives Services 2 way data binding Flux Action / Dispatcher Components Components. Actions Routes / Controllers
Questions??? Questions???