Design Patterns

Design patterns are the repeating patterns of solving problems in software. A nice book called "The Design Patterns, Java Companion" [ available here ] by J. W. Cooper explains design patterns in very simple words. He says that when we tell a colleague how we accomplished a tricky bit of programming so he doesn’t have to recreate it from scratch. We simply recognize effective ways for objects to communicate while maintaining their own separate existences.

He has collected some useful definitions of design patterns:
  • “Design patterns are recurring solutions to design problems you see over
  • “Design patterns constitute a set of rules describing how to accomplish certain tasks in the realm of software development.”
  • “Design patterns focus more on reuse of recurring architectural design themes, while frameworks focus on detailed design… and implementation.”.
  • “A pattern addresses a recurring design problem that arises in specific design situations and presents a solution to it”
  • “Patterns identify and specify abstractions that are above the level of single classes and instances, or of components.”
But while it is helpful to draw analogies to architecture, cabinet making and logic, design patterns are not just about the design of objects, but about the communication between objects. In fact, we sometimes think of them as communication patterns. It is the design of simple, but elegant, methods of communication that makes many design patterns so important.

0 comments:

Post a Comment