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
2
220
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
Tweet
Share
More Decks by Pascal Precht
See All by Pascal Precht
Introduction to HTML5 Filesystem API
pascalprecht
3
350
Version Control With Git
pascalprecht
8
570
An introduction to Git
pascalprecht
6
420
Making your JavaScript faster
pascalprecht
3
470
Other Decks in Programming
See All in Programming
What's New in Web AI?
christianliebel
PRO
0
130
ゼロダウンタイムでミドルウェアの バージョンアップを実現した手法と課題
wind111
0
200
GeistFabrik and AI-augmented software development
adewale
PRO
0
100
問題の見方を変える「システム思考」超入門
panda_program
0
300
チーム開発の “地ならし"
konifar
8
5.5k
アーキテクチャと考える迷子にならない開発者テスト
irof
9
3.2k
DartASTとその活用
sotaatos
2
140
2026年向け会社紹介資料
misu
0
240
モデル駆動設計をやってみよう Modeling Forum2025ワークショップ/Let’s Try Model-Driven Design
haru860
0
160
Module Harmony
petamoriken
2
480
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
720
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
1
750
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
680
Building Adaptive Systems
keathley
44
2.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
How to Think Like a Performance Engineer
csswizardry
28
2.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
37
The Cult of Friendly URLs
andyhume
79
6.7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
The Cost Of JavaScript in 2023
addyosmani
55
9.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