The easiest is the Singleton, for having unique object instance.
Jul 28, 2011
I guess I started with the following (may not be in order though) and it was accidental but was definitely helpful and am sticking to these common patterns in my everyday application development....
- Singleton (one instance -> global point of access)
- Factory Method (Use generic factory if you are working with .net to create configurable types)
- Strategy (if you need to vary your algorithms at runtime e.g. sorting->quicksort->or->mergesort->or some other sorting logic)
- Decorator (attach additional responsibility to an object)
- Facade (Provide higher level of abstraction)
- Command (for eg. for menu actions and toolbar actions)
- Template Method (for what it says... for templated methods that has predefined set of execution cycle like the asp.net page life cycle for eg.)
- And then pick up the ones you understand or could related to in your real work or project work environment.
Hope this helps!.
Rajesh Pillai, Jul 29, 2011
Thanks for the reply Rajesh. A separate class library to store user session state was the option I went with.
Mar 05, 2011