Design Patterns
Design patterns are recognized solutions to common problems defined originally by the Gang of Four programmers. Design patterns are used throughout the ASP.NET Framework. The various patterns are commonly divided into several different groups depending on the nature of the design problem they intend to solve.
Creational Patterns
- Factory - This pattern is used to create concrete class instances without specifying the exact class type.
- Abstract Factory - This pattern is used to create concrete class instances without specifying the exact class type.
- Flyweight - A pattern used to maximize the sharing of objects resulting in reduced memory consumption.
- Singleton - This pattern insures that only a single instance of a given object can exist.
Structural Patterns
- Adapter - Convert the interface of a class into another interface clients expect. Adpater lets the classes work together that couldn't otherwise because of incompatible interfaces
- Bridge - Decouples an abstraction from its implementation so that the two can vary independantly.
- Composite - Compose objects into tree strutures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
- Decorator - Allows an objects behavior to be altered at runtime.
- Facade - Used to provide a simpler interface into a more complicated portion of code.
- Proxy - Provides a Placeholder for another object to control access to it.
Behavioral Patterns
- Observer
- State - Allows an object to change it behaviour when its internal state changes.
- Strategy - Allows multiple algorithms to be used interchangeably at runtime.
- Visitor
Anitpatterns
Antipatterns are misapplied design patterns. Common Antipatterns include:
Videos
Articles
Books
Revision number 24, Saturday, May 03, 2008 7:09:12 PM by xanderer
You must Login to comment.
Revision #3
Wed, Mar 5, 2008 7:56 AM
by
|
Proxy
Proxy Design Pattern The Gang Of Four definition of this design pattern is "Provides a surrogate or placeholder for another object to control access to it". In the example below we use the pattern to enable caching on an ASP.net page. This code uses the Factory
|
Revision #5
Sat, Feb 23, 2008 6:55 AM
by
|
Factory
Factory The job of the Factory design pattern is to create concrete sub classes. You can see the Factory desing pattern used throughout the .NET Framework. A VB example of the Factory Pattern ' A Simple Interface Public Interface IVehicle Sub Drive(ByVal miles
|
Revision #3
Wed, Feb 27, 2008 5:30 PM
by
|
MVP Pattern
MVP (Model View Presenter)Framework The MVP pattern is an Architecture Pattern used to build ASP.net applications. It refers to splitting up the responsibilities for gathering, displaying, and storing data from a web page into separate objects: a Model object
|