Design Patterns - Architectural elements of frameworks

author-image
CIOL Bureau
Updated On
New Update

Avijeet Dash and Satyabrata Dash

Advertisment

What makes an expert? I believe it is experience. It's all those times you
spend solving problems, helping you later when they reoccur. You tend to look into the codes you wrote in the last project or in a project few years back. Problems reoccur in a specific context, and they can have various solutions. The best solution can be called an Expert Solution. Design Patterns are those expert solutions to common architectural problems that reoccur in a particular context.

Designing reusable software is very hard. Normally we end up writing
voluminous but repetitive code. The task becomes more and more complicated as
the project size grows. Design Pattern offers to store solutions for typical
problems occurring over and over and use the same solution without writing code
twice.

Design Patterns helps in solving the day-to-day problems that Object Oriented
designers and developers face

Advertisment
  • Finding appropriate Objects
  • Determining the object granularity
  • Specifying the object interfaces
  • Specifying the object implementation
  • Finding the ideal object collaboration
  • Achieving reusability, maintainability, extensibility, scalability and
    performance

Design Patterns provide out-of-the-box solutions that solve all or part of
the above challenges. We have been using Design Patterns in some form or other.
It’s probably time to recognize them (Pattern mining), name them and
communicate using them (build into UML). It leads towards standardization of
common solutions in form of patterns that will result in simplicity in
understanding and managing complex systems, of course at the cost of
understanding the patterns.

Design Patterns capture solutions that have evolved over time as developers
strive for greater flexibility in their software. Whereas class libraries are
reusable source code, and components are reusable packaged objects, patterns are
generic, reusable design descriptions that are customized to solve a specific
problem. The study of Design Patterns provides a common vocabulary for
communication and documentation, and it provides a framework for evolution and
improvement of existing patterns.

Advertisment

The famous 23 GOF (Gang Of Four) patterns are mostly considered as the
foundation for all other patterns. They are categorized based on their Purpose
as Creational, Structural and Behavioural.

List of GOF Patterns

Creational

Structural

Behavioral

 

Abstract Factory

Builder

Factory Method

Prototype

Singleton

 

Adapter

Bridge

Composite

Decorator

Façade

Flyweight

Proxy

 

Chain of Responsibility

Command

Iterator

Mediator

Memento

Observer

State

Strategy

Visitor

Interpreter

Template Method

Advertisment

(The authors are senior developers at MindTree Consulting. They can be reached at avijeetd@mindtree.com and satyabrata_dash@mindtree.com. References: Design
Patterns, elements of reusable object-oriented software
by Gamma, Helm,
Johnson and Design Patterns in Java by James W. Cooper)

tech-news