Design Patterns in JavaScript