Wednesday, March 13, 2013

Design Patterns in Java

The terminology of "Design Pattern" in software developed is based on the GOF (Gang of Four) book "Design Patterns - Elements of Reusable Object-Oriented Software" from Erich Gamma, Richard Helm, Ralph Johnson und John Vlissides. Design Pattern are proven solutions approaches to specific problems. A design pattern is not framework and is not directly deployed via code.
Design Pattern have two main usages:
  • Common language for developers: They provide developer a common language for certain problems. For example if a developer tells another developer that he is using a Singleton, the another developer (should) know exactly what this means.
  • Capture best practices: Design patterns capture solutions which have been applied to certain problems. By learning these patterns and the problem they are trying to solve a unexperienced developer can learn a lot about software design.
Design pattern are based on the base principles of object orientated design.
  • Program to an interface not an implementation
  • Favor object composition over inheritance
Design Patterns can be divided into:
  • Creational Patterns
  • Structural Patterns
  • Behavioral Patterns

No comments:

Post a Comment