Saturday, January 24, 2015

Design patterns - Introduction

What are design patterns?

"One day, your boss wants you to create a web application for the inventory system. You realized the problems during the development of the project and managed to solve them before. Now, you can't remember how you did it and which project is it. Isn't it frustrating?"

Well these problems are not new anymore and GOF has a suggested solution on how to handle things in particular context. Here I present "design patterns".

Design patterns solve almost all of the common design problems that happens in real-world application.

Why do we need to know / use design patterns?
  • Design patterns make your life easier that it removes a lot of constraints when designing specific requirements
  • It helps you to easily communicate with other intermediate or senior developers
  • Most of the design patterns makes your code organized and flexible

Okay, enough talking. What are these design patterns that you are talking about?

There are lot of design patterns.

Few of them are:
  • Factory pattern - responsible in creating an object in uniform
  • Memento pattern - commonly used in state-based situation
  • Adapter pattern - commonly used to support third-party or plug-able modules 
  • Strategy pattern - makes your action interchangeable

Don't worry, we'll discuss them one by one on my next post. Stay tuned!

No comments:

Post a Comment