Common design patterns for JavaScript development