Some examples of common javascript design patterns