pseudo-pattern Name : Object App Template [ OAT ]
Classification : Structural
Description :
A design pattern intended to streamline the javascript module writing process [ for front end apps ], reducing redundancy by abstracting the most used settings and helper functions. The pattern is designed to be implemented in a readable stream of functions, organized in object literal notation. It is currently illustrated using several jQuery Methods but the pattern could easily be made into a stand alone app by replacing the $.extend method and using traditional ajax methods.
- Provides a simplified and easy to read template for large bodies of code, contained by a specific context.
- Creates private variables accessible to all methods inside the specific context.
- Sets a common language template for variables inside each object.
- Stores the common denominator functions for all the apps in one script file, page or module. ( helpers )
inspired by Douglas Crockford’s functional Object pattern