What is design pattern?

Photo by Porapak Apichodilok from Pexels

Design pattern is a general solutions for common case that happen in the programming world. But, we should adapt with with the actual condition. The Design pattern was initiated by Gang of Four (Erich Gamma, John Vlissides, Ralph Johnson, Richard Helm) in the book titled “Design Patterns: Elements of Reusable Object-Oriented Software”, in 1994.

What is the benefit of design pattern?

  1. With design pattern, we are able to build large scale system with high maintainability
    • It is easier to add new function
    • It is easier to scale up
    • It is easier to solve the defect
  2. The other side is, we can solve our problem faster
    • Basically, design pattern is a generic solutions. So we can adapt the design pattern to solve the problem we face
  3. Ensure that our code accomplish high quality level
    • It is one of the ways how we can avoid “spaghetti” code

Design pattern classification

  1. Creational pattern
    • This design pattern focus on how an object is created
  2. Structural pattern
    • This design pattern focus on how objects and classes is structured
  3. Behavioral pattern
    • This design pattern focus on how objects communicates each other

In the next post, I will write about the Factory Pattern, it is one of the Creational Patterns.

Thanks

Tinggalkan komentar

I’m Riza

Welcome to my website. I’m happy to share my knowledge and experience here, especially related with my expertise in digital solution for enterprise. I’ll talk many topics around technology, AI, and others. Happy to know you!

You can find me in network platform below

Let’s connect