427 design standard

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 5: Line 5:
 
* Always write a getter, but minimize access.
 
* Always write a getter, but minimize access.
 
* Always call getter, even in same object.
 
* Always call getter, even in same object.
 +
 +
:This standard was influenced by the [[Getters and setters]] and [[Encapsulation boundary]] ideas.
 +
 +
:But do we really agree?

Revision as of 05:19, 25 July 2008

What rules do we all agree on? Let's write them here so everybody can follow them in their design study.

Getters and setters

  • Always make fields have protected access.
  • Always write a getter, but minimize access.
  • Always call getter, even in same object.
This standard was influenced by the Getters and setters and Encapsulation boundary ideas.
But do we really agree?
Personal tools