User Tools

Site Tools


principles:open-closed_principle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
principles:open-closed_principle [2013-01-30 15:04] – created: stement, origin, further reading, relations christianprinciples:open-closed_principle [2013-06-15 15:40] – [Context] 94.217.39.37
Line 6: Line 6:
 ===== Context ===== ===== Context =====
 /* fill in contexts here: */ /* fill in contexts here: */
-  * [[contexts:Object-Oriented Design]] +  * [[contexts:Object-Oriented Design]] 
 +  * [[contexts:API Design]] 
  
  
Line 21: Line 23:
  
 ===== Strategies ===== ===== Strategies =====
 +
 +
 +===== Caveats =====
 +
 +Beware that wrong application of OCP may lead to the anti-pattern [[anti-patterns:onion]].
 +
 +See also section [[#contrary principles]].
  
  
Line 60: Line 69:
 {{page>collections:Principles in "Object-Oriented Software Construction"#Box}} {{page>collections:Principles in "Object-Oriented Software Construction"#Box}}
  
-===== Example =====+===== Examples =====
  
  
Line 73: Line 82:
   * Robert C. Martin: //Agile Software Development, Principles, Patterns, and Practices//, p. 99pp.   * Robert C. Martin: //Agile Software Development, Principles, Patterns, and Practices//, p. 99pp.
   * [[http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod|ButUncleBob: Principles of OOD]]   * [[http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod|ButUncleBob: Principles of OOD]]
 +
principles/open-closed_principle.txt · Last modified: 2022-03-02 23:55 by tory