Hi guys.
Design patterns are an important consideration when designing or developing any software systems or solutions. There is so much buzz around patterns. At the same time, we often get confused about their use. Basically we get questions like the following:
- What design patterns are
- Why to use them
- When to use them
- How many patterns we have
What design patterns are
Design patterns are basically proven solutions to common design problems. They can also be defined as recommended practices to solve any recurring problem in application design.
Please be clear that, design patterns are not ready-to-use code that can be used directly, instead they present approaches or recommendations to solve daily design challenges.
Why to use them
The reason for usign them is simple. Why re-invent the wheel, when we have workable, tested and well documented solutions for a set of common recurring problems?
We should use design patterns (when required) to design and develop reusable and scalable components that in turn helps the development team to finish the development activities in due time while attaining high quality.
Designing an application in a standard or tested fashion also helps other developers and code reviewers to understand the written code easily.
When to use them
This is a very pertinent issue and we should be well aware of their usefulness. Using design patterns without evaluating them properly can make the design unnecessarily complex.
There could be instances when you might not need them at all and you can simply live with basic OOP design principles.
Whether to use them or not depends on the scenario at hand. Each pattern talks about specific design problems and the standard solution for that. So before using them, spend a fair amount of time in analyzing your design issues and try to match it with the once-discussed in patterns.
I would like to emphasize the point that the key to find the right pattern is to understand and identify the scenario that any pattern is trying to address.
Once you find the right pattern for your specific problem or scenario, you can apply it to your software design.
The many patterns
There is no specific number of patterns, since they kind of evolve over time and the software industry has used and tested them. Having said that, there are folks like the “Gang of Four” that have well-documented and popularized them in the software development community. I also find SOLID design principles to be worth refer to.
To summarize the discussion, I would like to say to start your design with a few basic design principles, like clean coding, loose coupling and modular design and so on and continue to evaluate design challenges with known and existing issues discussed in design patterns. After evaluation, if you find any matching pattern then go ahead and use it else stick to whatever you have designed.
One last thing. Please don't force your application to use design patterns. Instead use them only if it makes sense.
I hope you have liked the article. Please share your comments.


Prakash TripathiTOP 100Posted Jun 17, 2016, 10:19 AM EDT
Thnx Manish.
Manish PandeyPosted Jun 17, 2016, 8:29 AM EDT
Very usefull...thanks..for sharing..Just going on next part..
Prakash TripathiTOP 100Posted May 9, 2016, 10:27 PM EDT
Thnx Ravi.
Ravi PatelPosted May 9, 2016, 9:35 PM EDT
nice explaination thanks
Prakash TripathiTOP 100Posted Apr 12, 2016, 9:29 AM EDT
Thnx Humayun
Humayun Kabir MamunPosted Apr 10, 2016, 11:36 PM EDT
Nice...
Prakash TripathiTOP 100Posted Apr 9, 2016, 6:38 AM EDT
Thnx Nagaraj.
Kuppurasu NagarajTOP 100Posted Apr 9, 2016, 6:34 AM EDT
Nice article..
Prakash TripathiTOP 100Posted Mar 11, 2016, 12:07 AM EST
Thnx Amit.
Amit Kumar SinghPosted Mar 10, 2016, 11:42 PM EST
Nice one
Prakash TripathiTOP 100Posted Mar 6, 2016, 5:51 PM EST
Thnx Kumaresh.
Prakash TripathiTOP 100Posted Mar 6, 2016, 5:51 PM EST
Thnx Karthiga.
Prakash TripathiTOP 100Posted Mar 6, 2016, 5:50 PM EST
Thnx Ankur.
Prakash TripathiTOP 100Posted Mar 6, 2016, 5:50 PM EST
Thnx Humayun.
Prakash TripathiTOP 100Posted Mar 6, 2016, 5:50 PM EST
Thnx Nitin.
Kumaresh RajalingamPosted Mar 6, 2016, 3:28 PM EST
good one
Kumaresh RajalingamPosted Mar 6, 2016, 3:28 PM EST
Nice explanation
Sr KarthigaPosted Mar 6, 2016, 3:16 PM EST
good one
Sr KarthigaPosted Mar 6, 2016, 3:16 PM EST
Nice explanation
Prakash TripathiTOP 100Posted Dec 30, 2015, 7:52 AM EST
Thnx Rupesh.
Rupesh KahanePosted Dec 30, 2015, 7:40 AM EST
great stuff...
Ankur MistryTOP 100Posted Dec 30, 2015, 4:00 AM EST
Nice Share
Humayun Kabir MamunPosted Dec 13, 2015, 8:25 PM EST
Nice...
NitinPosted Jun 15, 2015, 6:30 AM EDT
good one
Prakash TripathiTOP 100Posted Jun 14, 2015, 8:52 PM EDT
Thanks Santhakumar and Pankaj for liking it.
Pankaj Kumar ChoudharyTOP 100Posted Jun 14, 2015, 8:50 AM EDT
Really Very helpful article Sir............
Santhakumar MunuswamyPosted Jun 14, 2015, 8:39 AM EDT
Thanks for nice article:)