Welcome to YLOAN.COM
yloan.com » Design » five important criteria for judging the goodness of an object-oriented design
Gadgets and Gizmos misc Design Bankruptcy Licenses performance choices memorabilia bargain carriage tour medical insurance data

five important criteria for judging the goodness of an object-oriented design

five important criteria for judging the goodness of an object-oriented design


It is quite obvious that there are several subjective judgments involved in arriving at a good object-oriented design. Therefore, several alternative design solutions to the same problem are possible. In order to be able to determine which of any two designs is better, some criteria for judging the goodness of a design must be identified. The following are some of the accepted criteria for judging the goodness of a design.

Coupling guidelines. The number of messages between two objects or among a group of objects should be minimum. Excessive coupling between objects is determined to modular design and prevents reuse.

Cohesion guideline. In OOD, cohesion is about three levels: # Cohesiveness of the individual methods. Cohesiveness of each of the individual method is desirable, since it assumes that each method does only a well-defined function. # Cohesiveness of the data and methods within a class. This is desirable since it assures that the methods of an object do actions for which the object is naturally responsible, i.e. it assures that no action has been improperly mapped to an object. # Cohesiveness of an entire class hierarchy. Cohesiveness of methods within a class is desirable since it promotes encapsulation of the objects.


Hierarchy and factoring guidelines. A base class should not have too many subclasses. If too many subclasses are derived from a single base class, then it becomes difficult to understand the design. In fact, there should approximately be no more than 72 classes derived from a base class at any level.

Keeping message protocols simple. Complex message protocols are an indication of excessive coupling among objects. If a message requires more than 3 parameters, then it is an indication of bad design.

Number of Methods. Objects with a large number of methods are likely to be more application-specific and also difficult to comprehend limiting the possibility of their reuse. Therefore, objects should not have too many methods. This is a measure of the complexity of a class. It is likely that the classes having more than about seven methods would have problems.

Depth of the inheritance tree. The deeper a class is in the class inheritance hierarchy, the greater is the number of methods it is likely to inherit, making it more complex. Therefore, the height of the inheritance tree should not be very large.
A Glimpse into the Unique Lifestyle and Culture of the Penang People Brandon Krieger Holistic Lifestyle Coach Discusses What Is Your Passion? Communication Design Careers Implications of human cognition capabilities on user interface design New Cpsc Rules Ban Crib Design Linked To Suffocation Deaths Handbags Are A Perfect Means For Storage And Style Men's Fashion Hairstyles Say no to freelance for web designing Make a Lasting Style Statement With Voi Jeans and Voi Clothing Web Design Cumbria Easy Web Design Tips That Produce Real Results 3d Logo Design- An Ideal Way To Make An Enduring Recognition Popular Types Of Embroidery Designs For Embroidery Digitizing
print
www.yloan.com guest:  register | login | search IP(216.73.216.250) California / Anaheim Processed in 0.016887 second(s), 7 queries , Gzip enabled , discuz 5.5 through PHP 8.3.9 , debug code: 14 , 2523, 99,
five important criteria for judging the goodness of an object-oriented design Anaheim