CSC/ECE 517 Summer 2008/wiki3 8 smr: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 33: Line 33:
What are good examples of each? Do other languages besides Eiffel support them? Is it difficult to follow these principles in certain o-o languages?
What are good examples of each? Do other languages besides Eiffel support them? Is it difficult to follow these principles in certain o-o languages?


"The designer of a module should strive to make all information about the module part of the module itself" [ftp://ftp.idc.ac.il/pub/courses/cs/oosc/ch1-3.ppt#288,34,Self-Documentation Principle].
"The designer of a module should strive to make all information about the module part of the module itself" [ftp://ftp.idc.ac.il/pub/courses/cs/oosc/ch1-3.ppt#288,34,Self-Documentation%20Principle].


=== Single-choice ===
=== Single-choice ===

Revision as of 21:19, 25 July 2008

Meyer's principles. Bertrand Meyer is a prominent author in o-o design. He has developed a set of principles, many of which are embodied in the Eiffel language. Consider the principles of small interfaces, explicit interfaces, the uniform-access principle, the self-documentation principle, and the single-choice principle. What are good examples of each? Do other languages besides Eiffel support them? Is it difficult to follow these principles in certain o-o languages?


Introduction

What are good examples of each? Do other languages besides Eiffel support them? Is it difficult to follow these principles in certain o-o languages?

Small Interfaces

What are good examples of each? Do other languages besides Eiffel support them? Is it difficult to follow these principles in certain o-o languages?

"The small interface or weak coupling principle states that if any two modules or objects communicate they should exchange as little information as possible" [1].

Explicit Interfaces

What are good examples of each? Do other languages besides Eiffel support them? Is it difficult to follow these principles in certain o-o languages?

"The principle of explicit interfaces maintains that all communications between modules must be visible. This means that as well as minimizing the number of interfaces and the amount of communication, all communications must also be clearly represented in the system: In the following diagram we can see that a tightly coupled relationship exits between module A and module B, as they are both reliant on variable x. In order to adhere to the criteria of decomposability, composibilty, continuity and understandability the data relationship between A and B must be clearly marked:


It is not disirable that A can change the value of x without this being visible in its code. Similarly, B’s interests in x must also be clearly visible" [2].

Uniform-access

What are good examples of each? Do other languages besides Eiffel support them? Is it difficult to follow these principles in certain o-o languages?

[3]

Self-documentation

What are good examples of each? Do other languages besides Eiffel support them? Is it difficult to follow these principles in certain o-o languages?

"The designer of a module should strive to make all information about the module part of the module itself" [4].

Single-choice

What are good examples of each? Do other languages besides Eiffel support them? Is it difficult to follow these principles in certain o-o languages?

[5]

Conclusion

Also See