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
550
An introduction to Git
pascalprecht
6
420
Making your JavaScript faster
pascalprecht
3
450
Other Decks in Programming
See All in Programming
PHPUnit 高速化テクニック / PHPUnit Speedup Techniques
pinkumohikan
1
1.2k
プログラミング教育のコスパの話
superkinoko
0
120
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
5
850
PHPでお金を扱う時、終わりのない 謎の1円調査の旅にでなくて済む方法
nakka
3
1.4k
AI時代のプログラミング教育 / programming education in ai era
kishida
23
21k
RailsでCQRS/ESをやってみたきづき
suzukimar
2
1.5k
新卒から4年間、20年もののWebサービスと 向き合って学んだソフトウェア考古学
oguri
8
6.9k
パスキーのすべて / 20250324 iddance Lesson.5
kuralab
0
130
Day0 初心者向けワークショップ実践!ソフトウェアテストの第一歩
satohiroyuki
0
440
AI Agents with JavaScript
slobodan
0
150
GDG Super.init(version=6) - From Where to Wear : 모바일 개발자가 워치에서 발견한 인사이트
haeti2
0
560
Modern Angular:Renovation for Your Applications @angularDays 2025 Munich
manfredsteyer
PRO
0
140
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Raft: Consensus for Rubyists
vanstee
137
6.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
29
2k
Become a Pro
speakerdeck
PRO
27
5.2k
It's Worth the Effort
3n
184
28k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.6k
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