CSC/ECE 517 Fall 2007/wiki3 4 sa: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


= Introduction =
= Introduction =
All the basic design principles converge on the use of abstraction for incorporating flexibility using loose coupling behaviour. Interface Segregation Principle (ISP) is a guideline for designing different interfaces.The Interface-Segregation Principle focuses on the cohesiveness of interfaces with respect to the clients that use them.
All the basic design principles converge on the use of abstraction for incorporating flexibility using loose coupling behavior. The Interface Segregation Principle (ISP) provides guidelines for designing interfaces to classes that must provide different services to different clients. The Interface Segregation Principle focuses on the cohesiveness of interfaces with respect to the clients that use them.


= Definition =
= Definition =
ISP was originally presented in a paper by Robert C. Martin in his ''Engineering Notebook'' column for the ''C++ Report''. The paper is still available at the Object Mentor website [http://www.objectmentor.com/resources/articles/isp.pdf].


The essence of Integration Segregation Principle is that  
The essence of Integration Segregation Principle is that  
<b>"Clients should not be forced to depend upon interfaces that they don’t use."</b>
<b>"Clients should not be forced to depend upon interfaces that they don’t use."</b>


Some other definitions of ISP are
Some other definitions of ISP are:
"Many client specific interfaces are better than one general purpose interface"
: "Many client specific interfaces are better than one general purpose interface"
• "The dependency of one class to another one should depend on the smallest possible interface"
• "The dependency of one class to another one should depend on the smallest possible interface"
• "Make fine grained interfaces that are client specific."
• "Make fine grained interfaces that are client specific."

Revision as of 15:06, 18 November 2007

Take the Interface Segregation principle and catalog the information on it available on the Web. We didn't cover it in class, but you can look it up on the Web or in the ACM DL. Find good descriptions and good, concise, understandable examples. Tell which you consider the best to present to a class.

Introduction

All the basic design principles converge on the use of abstraction for incorporating flexibility using loose coupling behavior. The Interface Segregation Principle (ISP) provides guidelines for designing interfaces to classes that must provide different services to different clients. The Interface Segregation Principle focuses on the cohesiveness of interfaces with respect to the clients that use them.

Definition

ISP was originally presented in a paper by Robert C. Martin in his Engineering Notebook column for the C++ Report. The paper is still available at the Object Mentor website [1].

The essence of Integration Segregation Principle is that "Clients should not be forced to depend upon interfaces that they don’t use."

Some other definitions of ISP are:

"Many client specific interfaces are better than one general purpose interface"

• "The dependency of one class to another one should depend on the smallest possible interface" • "Make fine grained interfaces that are client specific."


Examples


Resources

1) http://www.objectmentor.com/resources/articles/isp.pdf 2) http://ifacethoughts.net/2006/03/28/interface-segregation-principle/


Further reading

Note: Santosh Gurijala (skgurija) and Agustin Vega-Frias (jvegafr) are the authors of this page.