CSC/ECE 517 Fall 2009/wiki3 19 ee: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:
=Uniform Access Principle=
=Uniform Access Principle=


The '''Uniform Access Principle''' states that...
The '''Uniform Access Principle''' states that any attribute of a module (usually a class) should be accessed with the same syntax, regardless of the nature of the data. Simply put, when a consumer reads or writes a value, they should not know (or care) weather they accessing a variable or invoking a method. Thus, no matter how the module internally handles the data, externally the information is always accessed uniformly.


==Origin of the Uniform Access Principle==
==Origin of the Uniform Access Principle==
The Uniform Access Principle was created by the French engineer Bertrand Meyer.  Meyer is known to be a strong proponent of object oriented programming, and in fact was one of the earliest and most outspoken champions of OO.  His book ''Object-Oriented Software Construction'', first published in 1988, is considered to be a foundational publication of the object oriented programming movement.[http://en.wikipedia.org/wiki/Bertrand_Meyer]  It was in this book that he put forth the uniform access principal by stating "All services offered by a module should be available through a uniform notation, which does not betray whether they are implemented through storage or through computation."[http://en.wikipedia.org/wiki/Uniform_access_principle]


==Advantages of the Uniform Access Principle==
==Advantages of the Uniform Access Principle==


There are many advantages associated with using the Uniform Access Principal when writing software.
===Reading Properties===
===Ease of Understanding===
===Ease of Understanding===
===Convenience of Interface===
===Convenience of Interface===
===Maintainability of Interface===
===Maintainability of Interface===


==Disadvantages of the Uniform Access Principle==
==Disadvantages of the Uniform Access Principle==


===Writing Properties===
===Performance Issues===
===Performance Issues===
===Class Maintenance===
===Class Maintenance===
===Language Restrictions===
===Language Restrictions===


==Code Examples==
==Code Examples==


==References==
==References==

Revision as of 01:16, 19 November 2009

Uniform Access Principle

The Uniform Access Principle states that any attribute of a module (usually a class) should be accessed with the same syntax, regardless of the nature of the data. Simply put, when a consumer reads or writes a value, they should not know (or care) weather they accessing a variable or invoking a method. Thus, no matter how the module internally handles the data, externally the information is always accessed uniformly.

Origin of the Uniform Access Principle

The Uniform Access Principle was created by the French engineer Bertrand Meyer. Meyer is known to be a strong proponent of object oriented programming, and in fact was one of the earliest and most outspoken champions of OO. His book Object-Oriented Software Construction, first published in 1988, is considered to be a foundational publication of the object oriented programming movement.[1] It was in this book that he put forth the uniform access principal by stating "All services offered by a module should be available through a uniform notation, which does not betray whether they are implemented through storage or through computation."[2]

Advantages of the Uniform Access Principle

There are many advantages associated with using the Uniform Access Principal when writing software.

Reading Properties

Ease of Understanding

Convenience of Interface

Maintainability of Interface

Disadvantages of the Uniform Access Principle

Writing Properties

Performance Issues

Class Maintenance

Language Restrictions

Code Examples

References