CSC/ECE 517 Fall 2009/wiki3 3 cp: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 1: Line 1:
== Common Closure Principle ==
== Common Closure Principle ==


In simple words the Common Closure Principle refers to ''classes that change topether, belong together'', this is a very simple definition taken from the book [http://books.google.com.mx/books?id=4pjbgVHzomsC&pg=PA26&lpg=PA26&dq=Common+Closure+Principle&source=bl&ots=snjcz2p1Uc&sig=KfIZS53bVf8ESsoZc8cJl9Ajl0A&hl=es&ei=S1MDS6SFLIvjlAed87HpAQ&sa=X&oi=book_result&ct=result&resnum=9&ved=0CDIQ6AEwCA# Java Design: Objects, UML and Process] written by Kirk Knoernschild, however a broader definition with examples are given in this wikipage.
In simple words the Common Closure Principle refers to ''classes that change topether, belong together'', this is a very simple definition taken from the book [http://books.google.com.mx/books?id=4pjbgVHzomsC&pg=PA26&lpg=PA26&dq=Common+Closure+Principle&source=bl&ots=snjcz2p1Uc&sig=KfIZS53bVf8ESsoZc8cJl9Ajl0A&hl=es&ei=S1MDS6SFLIvjlAed87HpAQ&sa=X&oi=book_result&ct=result&resnum=9&ved=0CDIQ6AEwCA# Java Design: Objects, UML and Process] written by Kirk Knoernschild.
 
According to [http://www.objectmentor.com/omTeam/martin_r.html Robert Martin] the definition of Common Closure Principle is that 
 
      Classes within a released component should share common closure. That
      is, if one needs to be changed, they all are likely to need to be
      changed. What affects one, affects all.
 
In other words, '''what affects one, affects all''' broader and detailed explanations are given in this wikiwork.


==Introduction and Objective==
==Introduction and Objective==

Revision as of 03:46, 18 November 2009

Common Closure Principle

In simple words the Common Closure Principle refers to classes that change topether, belong together, this is a very simple definition taken from the book Java Design: Objects, UML and Process written by Kirk Knoernschild.

According to Robert Martin the definition of Common Closure Principle is that

      Classes within a released component should share common closure. That 
      is, if one needs to be changed, they all are likely to need to be 
      changed. What affects one, affects all.

In other words, what affects one, affects all broader and detailed explanations are given in this wikiwork.

Introduction and Objective

According to Robert Martin the definition of Common Closure Principle is that

"Classes within a released component should share common closure. That is, if one needs to be changed, they all are likely to need to be changed. What affects one, affects all."

How to Implement Common Closure Principle ?

Java Example

Ruby Example

What are the advantages and disadvantages?

Reading Recommendations

Reference Books

External Links

Bob Martin's

Appendix