CSC/ECE 517 Summer 2008/wiki3 6 esb: Difference between revisions
Line 2: | Line 2: | ||
Description of protected variation | Description of protected variation | ||
Protected variation and Polymorphism | |||
Protected Variation and Polymorphism seem related. What is the difference | Protected Variation and Polymorphism seem related. What is the difference | ||
between the two? Where would you apply one pattern over the other? | between the two? Where would you apply one pattern over the other? | ||
Line 10: | Line 10: | ||
for a particular use of Polymorphism. | for a particular use of Polymorphism. | ||
OCP | |||
An example of an | An example of an | ||
.Key Open-Closed Principle | .Key Open-Closed Principle |
Revision as of 18:30, 24 July 2008
Protected Variation
Description of protected variation
Protected variation and Polymorphism Protected Variation and Polymorphism seem related. What is the difference between the two? Where would you apply one pattern over the other?
Polymorphism is a powerful technology that is very useful for handling Protected Variation. Protected Variation gives one reason "why" for a particular use of Polymorphism.
OCP
An example of an .Key Open-Closed Principle is... X can be opened to Y and always Z. And it's only open to Y if it Y needs to access something and has permission to. While Z can always access it because it has permission to. That look right?
I'd express it like this: if X uses Y in some way or other you don't want changes to Y to effect X, but you also want to be able to change Y in ways that don't change X.
Introduction
Keep information out of the grasp of components that could damage integrity. Introduce reader to protected variation -Open/Closed Principle and Information Hiding
Why use Protected Variation?
General overview
- Example 1
- Example 2
How would you classify it
Coding Examples
Conclusion
See Also
External links
http://codecourse.sourceforge.net/materials/The-Importance-of-Being-Closed.pdf
http://www.rgoarchitects.com/Files/ooprimer.ppt#288,9,OCP Example