solid principles – interface segregation principle

7
SOLID PRINCIPLES – INTERFACE SEGREGATION PRINCIPLE [ISP] BY PIYAWAN AND NITISAK M PRESENT IN CERTIFIED SCRUM DEVELOPER CLASS

Upload: nitisak-mooltreesri

Post on 29-Nov-2014

135 views

Category:

Software


0 download

DESCRIPTION

ISP is one of the five SOLID principles of Object-Oriented Design.

TRANSCRIPT

Page 1: Solid principles – interface segregation principle

SOLID PRINCIPLES – INTERFACE SEGREGATION

PRINCIPLE [ISP]

BY PIYAWAN AND NITISAK M

PRESENT IN CERTIFIED SCRUM DEVELOPER CLASS

Page 2: Solid principles – interface segregation principle

ORIGIN

Robert C. Martin

Page 3: Solid principles – interface segregation principle

INTEND

“No client should be forced to depend on methods it does not use”

Make fine grained interfaces that are client specific

Page 4: Solid principles – interface segregation principle

EXAMPLES

Page 5: Solid principles – interface segregation principle

REFACTORING

Page 6: Solid principles – interface segregation principle

CONCLUSION

• [1] ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. Such shrunken interfaces are also called role interfaces.

• [2] ISP is intended to keep a system decoupled and thus easier to refactor, change, and redeploy.

Page 7: Solid principles – interface segregation principle

Q&A