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
Frontend NE
February 04, 2016
Technology
1
660
Large Scale JavaScript Application Architecture
Frontend NE
February 04, 2016
Tweet
Share
More Decks by Frontend NE
See All by Frontend NE
Standardizing 'select': What the future holds for HTML - Stephanie Stimac @ FrontendNE
frontendne
4
250
CSS Regression testing - James A Lambert @ FrontendNE
frontendne
1
230
Building a design system for Lloyds Banking - Lilly Dart @ FrontendNE
frontendne
0
1.1k
What I learnt about hiring diverse teams from conducting a fully-anonymous recruitment process - Bethan Vicent
frontendne
0
170
Web Design that Doesn't Make Trans People Uncomfortable - Jessica Kelsall
frontendne
0
570
Contain yourself - Docker for developers
frontendne
2
180
Design process of a website
frontendne
0
170
What the JAMstack?
frontendne
1
740
Talking the talk
frontendne
0
340
Other Decks in Technology
See All in Technology
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
180
OCI Data Integration技術情報 / ocidi_technical_jp
oracle4engineer
PRO
1
2.6k
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
28k
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
140
TinyGoを使ったVSCode拡張機能実装
askua
2
210
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
610
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
1
630
TypeScript、上達の瞬間
sadnessojisan
23
7.4k
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
240
Microsoft Intune アプリのトラブルシューティング
sophiakunii
1
420
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
360
QAEチームが辿った3年 ボクらが改善業務にスクラムを選んだワケ / 20241108_cloudsign_ques23
bengo4com
0
1.3k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Music & Morning Musume
bryan
46
6.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.8k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Building Applications with DynamoDB
mza
90
6.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
505
140k
A Tale of Four Properties
chriscoyier
156
23k
Faster Mobile Websites
deanohume
305
30k
Done Done
chrislema
181
16k
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???