15. Each unit should have only limited
knowledge about other units: only
units "closely" related to the current
unit.
Each unit should only talk to its
friends; don't talk to strangers.
Only talk to your immediate friends.
17. class Order < ActiveRecord::Base
belongs_to :user
delegate :street, :to => :user
end
class User < ActiveRecord::Base
has_one :address
delegate :street, :to => :address
end
18. class Order < ActiveRecord::Base
belongs_to :user
def address_street
user.address_street
end
end
class User < ActiveRecord::Base
has_one :address
def address_street
address.street
end
end
25. Connascence of Name
Connascence of Type
Connascence of Meaning
Connascence of Position
Connascence of
Algorithm
Connascence of
Execution
Connascence of Timing
Connascence of Identity
26. Rule of Degree
Connascence of Name
Connascence of Type
Connascence of Meaning
Connascence of Position
Connascence of Algorithm
Connascence of Execution
Connascence of Timing
Connascence of Identity
Connascence of Name\nConnascence of name is when multiple components must agree on the name of an entity.\nConnascence of Type\nConnascence of type is when multiple components must agree on the type of an entity.\nConnascence of Meaning\nConnascence of meaning is when multiple components must agree on the meaning particular values.\nConnascence of Position\nConnascence of positions is when multiple components must agree on the order of values.\nConnascence of Algorithm\nConnascence of algorithm is when multiple components must agree on a particular algorithm.\nConnascence of Execution (order)\nConnascence of execution is when the order of execution of multiple components is important.\nConnascence of Timing\nConnascence of timing is when the timing of the execution of multiple components is important.\nConnascence of Identity\nConnascence of identity is when multiple components must reference the entity.\n\n
Connascence of Name\nConnascence of name is when multiple components must agree on the name of an entity.\nConnascence of Type\nConnascence of type is when multiple components must agree on the type of an entity.\nConnascence of Meaning\nConnascence of meaning is when multiple components must agree on the meaning particular values.\nConnascence of Position\nConnascence of positions is when multiple components must agree on the order of values.\nConnascence of Algorithm\nConnascence of algorithm is when multiple components must agree on a particular algorithm.\nConnascence of Execution (order)\nConnascence of execution is when the order of execution of multiple components is important.\nConnascence of Timing\nConnascence of timing is when the timing of the execution of multiple components is important.\nConnascence of Identity\nConnascence of identity is when multiple components must reference the entity.\n\n