Design Patterns Introduction

Pattern is nothing but best practices that the programmer can use to solve common problem when designing a system.

What is Design pattern?

Design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.

That is while developing software application we may face different problems. Design Pattern is the Template for the solution to the common problem which used at different situations.

Why we need Design patterns?

We may re-invent the solution to problem after spending some time. But with out spending time we can re-used existing design patterns to solve the COMMON PROBLEM from the existing alternatives.

Design patterns are the proven techniques as efficient solutions to the common problems.

Design patterns help you to use existing solutions for the common problem with out re-invent and best solution. So no need to provide extra documentation for the solution used for the common problem.

Example

Let us suppose the problem is need to create a class such a way only one instance of the object should be exist at a single time.

We can use existing solution for this problem. That is we can use single ton pattern to solve this problem. We can see what is the single ton pattern and how it will be useful.

What are the types ?

Algorithm strategy patterns addressing concerns related to high-level strategies describing how to exploit application characteristics on a computing platform.

Computational design patterns addressing concerns related to key computation identification.

Execution patterns that address concerns related to supporting application execution, including strategies in executing streams of tasks and building blocks to support task synchronization.

Implementation strategy patterns addressing concerns related to implementing source code to support 1. program organization, and 2. the common data structures specific to parallel programming.

Structural design patterns addressing concerns related to high-level structures of applications being developed.

Conclusion

Design patterns are nothing but solution templates to the conman problems occurring in our real life. If we know theses templates we can use that templates to solve our problem with minimal changes with that template.

Hope this will be helpful and easy to understand for the learns.

X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now