Design Patterns

Note: This web is under construction. Design Patterns Catalog is filled continuously!!!

What it is?

Design Pattern is the term that denotes reusable solution for a problem that repeatedly occurs in almost all software projects. Think back when you have worked on some project (client application, web server, whatever) and think about two or three issues that appeared in all of them. Yes, there definitely are some issues that repeated and which were about to solve in the same way. But, don't interchange design pattern with reusable solution in form of some library (a set of commonly used classes). The design pattern is abstract reusable solution, this means that for the same category of problems you can apply same way of solving that.

When to use?

The question "when to use" is relatively simple to answer. It is: whenever you encounter design issue which is likely to be solved in some proven way. E.g. do you want to control creation of specific object, so that nobody else can break it? Use creational design patterns. Or do you have library that makes what you want but doesn't have interface you require? Use structural design patterns. In other situation, do you need two objects to communicate somehow? Use behavioral design patterns. In many cases, your application will probably be multi-threaded and that's always complicated. Use concurrency design patterns. There is plenty of patterns for many common problems that can make your life easier. Design patterns will not solve problem for you, but they can give you good basis.

How to use?

Each design pattern focuses on specific problem. So, first you have to identify what are you going to solve. Then you shall select the most appropriate pattern and fit it to your problem. Then, follow the guidelines of the pattern to solve your problem. You will have then skeleton of the solution that needs to be decorated with business logic and additional coding stuff.

Why to use?

That's simple, because design patterns are templates for solving common problems that have been tuned by dozens of software designers and thoroughly proven by millions of software developers all over the world. Simply said, they are good and handy.


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License