The Mudbug Media programming team regularly meets for “study hall” sessions in which we review important programming techniques and practices. Recently, we discussed the classic Design Patterns approach to software engineering. Design patterns are flexible templates for solving common problems in software design.
$(document).ready() function—it delays the process of running the enclosed code until necessary. The observer pattern is made trivial thanks to
.bind(), allowing objects to be notified automatically of changes in state. And the
.each() method implements the iterator pattern, accessing every element of an aggregate object in turn.