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
Win at live with JavaScript Patterns
Search
Pascal Precht
September 26, 2011
Programming
230
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Win at live with JavaScript Patterns
German slides about JavaScript Coding Patterns for the first Hannover.js Meetup in Germany
Pascal Precht
September 26, 2011
More Decks by Pascal Precht
See All by Pascal Precht
Introduction to HTML5 Filesystem API
pascalprecht
3
360
Version Control With Git
pascalprecht
8
600
An introduction to Git
pascalprecht
6
430
Making your JavaScript faster
pascalprecht
3
490
Other Decks in Programming
See All in Programming
自作OSでスライド発表する
uyuki234
1
3.8k
どこまでゆるくて許されるのか
tk3fftk
0
490
1B+ /day規模のログを管理する技術
broadleaf
0
140
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
640
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
2.7k
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
100
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
400
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
2
1.5k
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
130
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
500
Performance Engineering for Everyone
elenatanasoiu
0
270
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
340
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
220
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
630
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
360
How STYLIGHT went responsive
nonsquared
100
6.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Visualization
eitanlees
152
17k
Typedesign – Prime Four
hannesfritz
42
3.1k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Transcript
Win at live with JavaScript Patterns By Pascal Precht HannoverJS
08/11
I am not a Guru!
None
Gutes Software- Design
„Kaum etwas ist so schnellen Veränderungen unterworfen wie Software.“
„Software muss erweiterbar sein.“
Patterns
Was ist ein Pattern?
Eine Lösung für ein häufig auftretendes Problem.
... Eine bewährte Vorgehensweise, eine nützliche Abstraktion und eine Vorlage
für das Lösen ganzer Problem- Kategorien.
Welche Vorteile bieten Patterns?
Vorteile von Patterns v Besserer Code / Vermeidung von Redundanzen
v Abstraktion v Bessere Kommunikation im Team
Arten der Patterns
Arten der Patterns v Design-Patterns // Entwurfsmuster v Coding-Patterns //
Spezifische Muster v Anti-Patterns // „Negative Assoziation“
JavaScript Patterns
None
Das funktioniert.
None
Aber Vorsicht!
None
None
None
None
Hoisting
None
None
None
Das Single-var-Pattern
None
Vorteile des Single-var- Pattern
Vorteile des Single-var- Pattern v Zentrale Deklaration/Initialisierung v Code ist
leichter zu lesen v Vermeidung logischer Fehler
The better way!
Objekte und Literale
None
Very bad!
None
Achtung!
None
None
Das Object-Literal- Pattern
None
Vorteile des Object- Literal-Pattern v Weniger Code v Objects sind
„nur“ Hashes v Keine Object-Constructor-Überraschungen
But I need a constructor!
None
Sh*t! I forgot the new!
Ohne new zeigt this auf das globale Objekt!
None
Muster zum erzwingen von new
None
Funktionen
Das Callback-Pattern
None
None
None
None
Immediate-Function- Pattern
None
None
Vorteile des Immediate- Function-Pattern
Vorteile des Immediate- Function-Pattern v Kapselung von Aufgaben v Keine
globale Variabeln v Modulares Verhalten
Das Immediate-Object- Pattern
None
Vorteile des Immediate- Object-Pattern
Vorteile des Immediate- Object-Pattern v Globaler Namesraum wird frei gehalten
v Modulares Verhalten v Private Hilfs-Funktionen sind deutlich erkennbar
None
None
Das Configuration- Object-Pattern
None
None
None
Vorteile des Object- Configuration-Pattern
Flexibilität.
None
None
None
Thank you!
Stay tuned! Twitter: @PascalPrecht Blog: HopelessArt.com
None