Introduction To Design Patterns

Pattern is a defined, used and tested solution for a know problem. Design patterns is all about re-use. Software design patterns evolved as a subject of study only when object oriented programming started becoming popular. OOPS and design patterns became inseparable.

In OOPS, we should have well defined boundaries for objects. That is every object should have its roles and responsibilities well defined. Then at next level, we should have a clear interaction plan between objects. If you design a OO software with the above principle, then by default you will be following some of the already defined design patterns.

A formal definition for design patterns, “A design pattern addresses a recurring design problem that arises in specific design situations and presents a solution to it” (Buschmann, et. al. 1996)

Java widely uses design patterns in its APIs. It started as early as Java 1.2 in java foundation classes. By then you can see the widespread use of commonly know design patterns in collections framework and IO packages. When I say commonly known design patterns, I mention about the set of 23 design patterns by Gang of Four (GOF). Gamma, Helm, Johnson and Vlissides known as Gang of Four (GOF) published a book “Design Patterns — Elements of Reusable Software” (1995) based on their series of technical meetings. It is one of the best seller in computer science books till date.

In China gang of four means different set of people. Jiang Qing (Mao Zedong’s fourth wife), Zhang Chunqiao, Yao Wenyuan, and Wang Hongwen were very popular leaders of cultural revolution. They almost seized power after Mao Zedong’s death. But they were finally arrested and imprisoned for life.

Our GOF divided the 23 design patterns into three types creational design patterns, structural design patterns and behavioral design patterns.

Creational design patterns can be used to instantiate objects. Instead of instantiating objects directly, depending on scenario either X or Y object can be instantiated. This will give flexibility for instantiation in high complex business logic situations.

Structural design patterns can be used to organize your program into groups. This segregation will provide you clarity and will enable you for easier maintainability.

  • Adapter Pattern
  • Bridge Pattern
  • Composite Pattern
  • Decorator Pattern
  • Facade Pattern
  • Flyweight Pattern
  • Proxy Pattern

Behavioral design patterns can be used to define the communication and control flow between objects.

  • Chain Of Responsibility Pattern
  • Command Pattern
  • Interpreter Pattern
  • Iterator Pattern
  • Mediator Pattern
  • Memento Pattern
  • Observer Pattern
  • State Pattern
  • Strategy Pattern
  • Template Method Pattern
  • Visitor Pattern

Reference Book : Design Pattern Book


About Sanju
I am Software Programmer. I am working in JAVA/J2EE Technologies.

16 Responses to Introduction To Design Patterns

  1. ugg outlet says:

    Awsome It is precisely what I got trying to find.

  2. ugg boots outlet says:

    Thank you for another wonderful weblog.When else could I am these types of information composed in these an incite complete way? I’ve a project that I’m at the moment carrying out work on, and i am certain this will aid me a significant amount..and For a nice and seeking like material since from few days….Thanks!!!!!

  3. cheap ugg boots says:

    Hey can I reference some of the content evident in this entry generally if i supplies a link back to your site?

  4. ugg boots clearance says:

    I often were going to write into my site something like that. May i take element of your post to my weblog? Thanks!

  5. Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your site? My blog is in the exact same area of interest as yours and my visitors would truly benefit from some of the information you provide here. Please let me know if this ok with you. Thanks!very nice put up, i actually love this web site, keep on it

  6. uggs on sale says:

    I??m usually to blog and i actually admire your content. The article content has actually peaks my interest. I??m going to bookmark your internet site and preserve checking achievable information.

  7. ugg boots sale says:

    is revolutionary approach to.

  8. ugg boots uk says:

    I definitely enjoying every small it and I do you have bookmarked to check out new issues blog post.

  9. Luke Egertson says:

    It’s the best time to make some plans for the future and it is time to be happy.I have read this post and if I could I desire to suggest you few interesting things or tips.Perhaps you can write next articles referring to this article.I want to read even more things about it!

  10. Pozycjonowanie says:

    I know this if off topic but I’m looking into starting my own blog and was wondering what all is required to get setup? I’m assuming having a blog like yours would cost a pretty penny? I’m not very web smart so I’m not 100% sure. Any recommendations or advice would be greatly appreciated. Thanks

  11. payday now says:

    That is the fitting blog for anyone who desires to find out about this topic. You realize so much its nearly exhausting to argue with you (not that I really would want…HaHa). You definitely put a brand new spin on a subject thats been written about for years. Great stuff, simply great!

  12. uggs on sale online says:

    So allowed me to reword that: Thnx for the deal with! But yeah Thnkx for spending enough time to share this, I am strongly concerning it and love reading on this topic. If potential, as you grow expertise

  13. grow kit says:

    First off I want to say outstanding blog! I had a rapid query in that I’d prefer to ask if you don’t thoughts. I was inquisitive to perceive how you center by yourself and clear the head just before creating. You know I have had a challenging time clearing my mind in obtaining my tips out there. I in fact do take pleasure in creating but it merely looks like the initially 10 to 15 minutes are generally lost simply trying to figure out how to begin. Any suggestions or hints? Value it!

  14. Meg Breighner says:

    It’s in reality a nice and helpful piece of information. I am happy that you shared this useful info with us. Please stay us informed like this. Thank you for sharing.

  15. divorce wichita says:

    I found your blog site on google and verify a couple of of your early posts. Continue to maintain up the excellent operate. I just extra up your RSS feed to my MSN Information Reader. Looking for ahead to studying extra from you in a while!…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: