Solution : The classes and/or objects that participate in the design pattern, their structure (e.g., in terms of a UML class diagram), their responsibilities, and their collaborations.The problem description should provide guidance to assist others in recognizing situations where the pattern can be applied. A concrete motivational scenario can be used to help describe the problem. Problem : A general description of the problem context and the goals and constraints that occur repeatedly in that context.Following the GoF book, we can also group patterns into higher level classifications such as creational, structural, and behavioral patterns. Names provide a vocabulary for patterns, and they have implied semantics choose names carefully. Pattern Name and Classification : A short, meaningful name for the pattern, usually only one or two words. 3) How do I document a design pattern?Ī pattern description must address the following major points: Patterns raise the level of abstraction when discussing and documenting software designs. The study of design patterns will have a similar (but more profound) effect by allowing designers to say composite pattern or observer pattern in a particular design context, without having to describe all classes, relationships, and collaborations which make up the pattern. Software developers understand fundamental data structures such as a stack because these data structures are well-documented in textbooks and are taught in computer science courses. As an analogy, consider that during a discussion among programmers, the words stack and tree can be used freely without explanation. Moreover, 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. Design patterns allow us to reuse the knowledge of experienced software designers. Design patterns capture solutions that have evolved over time as developers strive for greater flexibility in their software, and they document the solutions in a way which facilitates their reuse in other, possibly unrelated systems. 2) Why is the study of patterns important?Īs initial software designs are implemented and deployed, programmers often discover improvements which make the designs more adaptable to change. 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. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |