Geeks With Blogs

News


Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done

Design Patterns

Another useful site:  http://www.dofactory.com/Patterns/Patterns.aspx

·        Creational - the way classes instantiate

o     Singleton 18

§         Ensure a class has one instance

·        Hide “New” Constuctor

·        Add Shared solitary instance of self

o     Abstract Factory 21

§         Create families of related or dependent objects without specifying classes

·        Daddy, Mommy, Baby Bear (interfaces)

o     Builder n/a

§         Separate the construction of a complex object from its representation so that the same construction process can create different representations

 

o     Factory Method 26

§         Design an Interface for object creation, but let sub-classes decide which class to instantiate.

·        Protected member can be inherited

·        Overridable methods

 

o     Prototype n/a

§         Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype

 

·        Structural – the way classes inherit

o     Adapter 29

§         Convert an interface for a class into another interface clients expect

o     Facade 29

§         Provide a unified interface A for sub-interfaces 1, 2, 3

o     Bridge 34

§         Decouple an abstraction from an implementation so that the 2 can vary independently

·        Purchase Orders Interface

·        Suppliers Implementation

o     Composite 39

§         Compose objects into a tree structure collection of containers and leaves to represent part-whole hierarchies to let clients treat objects and compositions of objects uniformly.

o     Decorator 43

§         Attach additional responsibilities on Objects dynamically

·        Interface -> Concrete -> Decorator -> Sub-Decorators

o     Proxy 49

§         Provide ObjB surrogate of an ObjA to control (limit/override) access to ObjA.

 

o     Flyweight n/a

§         Provide a shared object/structure for a one-instance, shared data structure

·        Behavioral – supervise messages between objects

o     Observer 52

§         Define a one way dependency between objects so that when an objects change state, dependents are notified.

·        Sender Interface notifies Observer Interface

o     State 55

§         Allow object to alter behavior when internal distinguishable state changes.

·        Sender Interface notifies Observer Interface

·         Example:  Lightbulb has a "Press Switch" method which changes the state of a private property.

o     Strategy 60

§         Encapsulate each of a family of algorithms so that algorithm varies for client.

·        Sender Interface notifies Observer Interface

·         Example:  Arrange interfaces so that inheriting classes implement a method differently, then code calls one or other inheriting class.

o     Visitor n/a

 §        change the class structure without changing the actual class to separate the logic and algorithm from the current data structure.

 

 

Posted on Tuesday, July 25, 2006 5:06 PM Design Patterns - OOP | Back to top

Related Posts on Geeks With Blogs Matching Categories

Comments on this post: Design Patterns Outline

# re: Design Patterns Outline
Requesting Gravatar...
thanks for this wonderful article. I really liked it.
Left by watch movies online on Dec 02, 2011 9:41 PM

# re: Design Patterns Outline
Requesting Gravatar...
thanks for this really helpful stuff.
Left by nokia mobiles price list on Dec 02, 2011 9:43 PM

# re: Design Patterns Outline
Requesting Gravatar...
After what seemed like weeks of daily leaks and then a cancelled launch event due to Hurricane Sandy, Google has finally announced its latest Nexus Android phone, the Feiteng Mini N9300 PhoneManufactured by LG
Left by weng on Oct 31, 2012 2:12 AM

Your comment:
 (will show your gravatar)


Copyright © Rodney Vinyard | Powered by: GeeksWithBlogs.net