Professional Documents
Culture Documents
Code Smells
Code Smells
Create a method in the client class with an instance of the server class as its
first argument.
Incomplete Library Class Introduce Foreign Method
Data Class
Refused Bequest
Comments
Create a method in the client class with an instance of the server class as its
first argument.
Incomplete Library Class
Data Class Data Class
Refused Bequest
Comments
Data classes are like children. They are
okay as a starting point, but to
participate as a grownup object, they
need to take some responsibility.
Incomplete Library Class
Data Class
Refused Bequest
Comments These are classes that have fields,
getting and setting methods for the
fields, and nothing else. Such classes
are dumb data holders and are almost
certainly being manipulated in far too
much detail by other classes. In early
stages these classes may have public
fields.
Incomplete Library Class
Data Class
Refused Bequest
Comments If so, you should immediately
apply Encapsulate Field before anyone
notices. If you have collection fields,
check to see whether they are properly
encapsulated and apply Encapsulate
Collection if they aren't. Use Remove
Setting Method on any field that
should not be changed.
Incomplete Library Class Encapsulate Field
Data Class
Refused Bequest
Comments
Incomplete Library Class Encapsulate Field
Data Class
Refused Bequest
Comments