Tuesday 12 November 2019

Design Pattern in Software Development (Examples using C#)

Design patterns are typical solutions which helps us solve to commonly-occurring problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code.

A pattern is not a specific piece of code, but a general concept for solving a particular problem. They are like pre-made blueprints that we can customize to solve a recurring design problem in our code.

(Design patterns are optimized, reusable solutions to the programming problems that we encounter every day. A design pattern is not a class or a library that we can simply plug into our system; it's much more than that. It is a template that has to be implemented in the correct situation. It's not language-specific either. A good design pattern should be implementable in most—if not all—languages, depending on the capabilities of the language. Most importantly, any design pattern can be a double-edged sword— if implemented in the wrong place, it can be disastrous and create many problems for you. However, implemented in the right place, at the right time, it can be your savior.)

  • Creational patterns provide object creation mechanisms that increase flexibility and reuse of existing code. (provide instantiation mechanisms, making it easier to create objects in a way that suits the situation.)
  • Structural patterns explain how to assemble objects and classes into larger structures, while keeping the structures flexible and efficient. (generally deal with relationships between entities, making it easier for these entities to work together)
  • Behavioral patterns take care of effective communication and the assignment of responsibilities between objects.(are used in communications between entities and make it easier and more flexible for these entities to communicate)

No comments:

Post a Comment

Baisic Useful Git Commands

  Pushing a fresh repository Create a fresh repository(Any cloud repository). Open terminal (for mac ) and command (windows) and type the be...