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
560
An introduction to Git
pascalprecht
6
420
Making your JavaScript faster
pascalprecht
3
470
Other Decks in Programming
See All in Programming
20250708_JAWS_opscdk
takuyay0ne
2
130
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
13k
AI時代のソフトウェア開発を考える(2025/07版) / Agentic Software Engineering Findy 2025-07 Edition
twada
PRO
99
37k
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
130
DMMを支える決済基盤の技術的負債にどう立ち向かうか / Addressing Technical Debt in Payment Infrastructure
yoshiyoshifujii
3
410
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
2
12k
Goで作る、開発・CI環境
sin392
0
260
商品比較サービス「マイベスト」における パーソナライズレコメンドの第一歩
ucchiii43
0
180
フロントエンドのパフォーマンスチューニング
koukimiura
5
2k
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
200
SQLアンチパターン第2版 データベースプログラミングで陥りがちな失敗とその対策 / Intro to SQL Antipatterns 2nd
twada
PRO
11
1.3k
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
1.1k
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
72
4.9k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Embracing the Ebb and Flow
colly
86
4.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
The Cult of Friendly URLs
andyhume
79
6.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
Designing Experiences People Love
moore
142
24k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
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