CSC/ECE 517 Summer 2008/wiki3 5 rp: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
Sometimes it is a good idea to introduce into a system an object that has no counterpart in the real world. This is called the pure fabrication pattern. Find examples of pure fabrication, and weave them into a narrative that can teach programmers when it is helpful and when it is not helpful to fabricate objects. | Sometimes it is a good idea to introduce into a system an object that has no counterpart in the real world. This is called the pure fabrication pattern. Find examples of pure fabrication, and weave them into a narrative that can teach programmers when it is helpful and when it is not helpful to fabricate objects. | ||
= | =Background= | ||
All design patterns, regardless of their specific purpose, are born from the same basic principles. These principles include high cohesion, low coupling, and other features which result in flexible, maintainable, extensible code. Most often it is possible to separate the objects of an OO design into real world abstractions, or objects which reflect well known design patterns, such as a factory or an observer. Sometimes, however, the need for high cohesion, low coupling, and separation of dependence exists within software when there is no real world object representation or familiar design pattern to provide a solution. This is when pure fabrication is needed. Simply put, pure fabrication | All design patterns, regardless of their specific purpose, are born from the same basic principles. These principles include [http://en.wikipedia.org/wiki/Cohesion_(computer_science) high cohesion], [http://en.wikipedia.org/wiki/Coupling_(computer_science) low coupling], and other features which result in flexible, maintainable, extensible code. Most often it is possible to separate the objects of an OO design into real world abstractions, or objects which reflect well known design patterns, such as a factory or an observer. Sometimes, however, the need for high cohesion, low coupling, and separation of dependence exists within software when there is no real world object representation or familiar design pattern to provide a solution. This is when pure fabrication is needed. Simply put, pure fabrication means creating a class object completely unrelated to the problem domain specifically for the purpose of achieving some degree of high cohesion, low coupling, potential for code re-use and high maintainability. | ||
Pure Fabrication is often attributed to Craig Larman as part of his nine [http://en.wikipedia.org/wiki/GRASP_(Object_Oriented_Design) GRASP] design patterns. Each of these patterns is similar to all other design patterns in that they strive to achieve code refactoring, decoupling, and reusability. Arguably, they are more generic than the [http://en.wikipedia.org/wiki/Design_Patterns GoF] patterns, and pure fabrication is perhaps the most generic of them. | |||
=External Links= | =External Links= | ||
http://davidhayden.com/blog/dave/archive/2005/09/18/2476.aspx<br> | http://davidhayden.com/blog/dave/archive/2005/09/18/2476.aspx<br> | ||
[[CSC/ECE 517 Summer 2008/wiki3 Assignment|Back to the assignment page]] | [[CSC/ECE 517 Summer 2008/wiki3 Assignment|Back to the assignment page]] |
Revision as of 13:17, 25 July 2008
Pure Fabrication
Sometimes it is a good idea to introduce into a system an object that has no counterpart in the real world. This is called the pure fabrication pattern. Find examples of pure fabrication, and weave them into a narrative that can teach programmers when it is helpful and when it is not helpful to fabricate objects.
Background
All design patterns, regardless of their specific purpose, are born from the same basic principles. These principles include high cohesion, low coupling, and other features which result in flexible, maintainable, extensible code. Most often it is possible to separate the objects of an OO design into real world abstractions, or objects which reflect well known design patterns, such as a factory or an observer. Sometimes, however, the need for high cohesion, low coupling, and separation of dependence exists within software when there is no real world object representation or familiar design pattern to provide a solution. This is when pure fabrication is needed. Simply put, pure fabrication means creating a class object completely unrelated to the problem domain specifically for the purpose of achieving some degree of high cohesion, low coupling, potential for code re-use and high maintainability.
Pure Fabrication is often attributed to Craig Larman as part of his nine GRASP design patterns. Each of these patterns is similar to all other design patterns in that they strive to achieve code refactoring, decoupling, and reusability. Arguably, they are more generic than the GoF patterns, and pure fabrication is perhaps the most generic of them.
External Links
http://davidhayden.com/blog/dave/archive/2005/09/18/2476.aspx