- Coupling
- among classes
- among subsystems, modules
- related classes knowing the internal details of each other
- when one is changed, other has to be changed
- makes the system difficult to understand
- no possibility of reuse of the entwined code
- Cohesion
- inside the class, among the class attributes and behavior
- well defined roles for the classes within the system
- the data is closely related with the functions which the class is providing
- Law of Demeter (more specific case of "low coupling", LoD)
- motto is "only talk to your immediate friends"
- each unit should have only limited knowledge about other units "closely" related to the current unit (method/function "f")
- in context of OOD, closely related
- are the functions of the class in which unit (function "f") exists
- other argument classes of unit (function "f")
- functions of immediate part classes (computed and stored) of class of unit (function "f")
- computed classes are the classes that are the return type of functions of this class
- stored classes are the classes of the data members of this class
- composition, ( composite aggregation in UML), is part – whole relationship
- Winston et al describes describes several kind composition, with three basic properties
- configuration (functional or structural relationship between part and whole)
- homeomerous (parts are the same kind of as the whole or not)
- invariance (parts can be separated from the whole or not)
- based in these three properties the following kind of composition can be ascertained
- component – integral object composition (the integral whole is formed by the individual components, which can be removed but removing them will disintegrate the whole, like a laptop is made of different hardware components)
- material – object composition (the object is made is up the material, and the material cant be removed from the object, or it can be said that the object is made up of the material, like a cooking pan is made of steel)
- portion – object composition (portions are homeomeric with the object, like a link list is made up of individual nodes, in which each node can be considered as portion of the link list, each portion can be removed from the object)
- place – area composition (place within the area, and place cant be removed from the area, like pune is in India)
- member – bunch composition (members are just a collection which forms a bunch, like flowers in a bouquet)
- member – partnership composition (members are invariant part of the partnership, if parts are removed whole is destroyed)
Reference :
- before deciding on the style we need to find
- the components of the system
- the interaction between these components (what connects them)
- the constraints regarding the way components can combine and interact
- the underlying computational model
- essential invariants
- where it can be used, some examples
- advantages and disadvantages
- common specialization
Reference : cs.cmu.edu
- Organization of the system
- With increasing size and complexity what is to be specified ?
- gross organization
- global control structure
- protocols for communication
- synchronization, and data access
- functionality of each design element
- physical distribution
- composition of each design element
- scaling and performance consideration
- design alternatives
- Abstraction, the techniques how they grow
- high level programming languages abstract in the form of
- evaluation of arithmetic expression in conditional evaluation for deciding looping and procedure call
- modules which have related procedures
- data structures
- separation of module specification from its implementation
- abstract data types, to find what level of detail is sufficient for the task at hand, for this we need to segregate
- representation and operators
- specifications (what is expected from the software system)
- user defined types (classes ?)
- modules containing the user defined types
- the invariants of data structure (asserting that the structure remain consistent)
- protection of data structure from modification by other than the valid methods, of valid ADT
- access to the data, what is visible to all, what is selectively visible, and what is not
- recognizing the organization of a system, and giving a name to it, like
- client server model
- distributed object oriented approach
- pipeline
- ISO OSI Reference model (layered network)
- NIST/ECMA Reference model (layered communication substrates)
- X window system (event triggering and call-back)
Reference : www.cs.cmu.edu