SlideShare a Scribd company logo
1 of 22
SOLID
What is good design?
INTRODUCTION


• My name is Ferran Caellas
• Backend developer at eyeOS
• Specialities and interests: Software
  Arquitecture, Patterns, Object Oriented
  Programing and Project Management.
TNTWIWHDI
That’s Not The Way I Would Have Done It
DEFINITION OF A BAD DESIGN

It is hard to change because every change affects too many other
                       parts of the system.

                           RIGIDITY

   When you make a change, unexpected parts of the system
                          break.

                          FRAGILITY

 It is hard to reuse in another application because it cannot be
            disentangled from the current application.

                        IMMOBILITY
There should never be more than one reason for a
                class to change
SINGLE RESPONSIBILITY PRINCIPLE
SINGLE RESPONSIBILITY PRINCIPLE




Two resonsibilities:
1. Provide a mathematical model of the geometry of a rectangle.
2. Render the rectangle on a graphical user interface.
SINGLE RESPONSIBILITY PRINCIPLE




We moved the computational parts of a rectangle into a
separated class called GeometricRectangle. Now changes
made to the way rectangles are rendered cannot affect
the ComputationalGeometryApplication.
Software entities should be open for extension,
          but closed for modification
     OPEN CLOSED PRINCIPLE
OPEN CLOSED PRINCIPLE




Open for extension                    Closed to modification
The behavior of the module can be     The source code of a module is inviolate.
extended. We can make the module      No one is allowed to make source code
behave in new and different ways as   changes to it.
the requirements of the application
changes or to meet the needs of new
applications.




               Abstraction is the key.
                    In fact, polimorphism
OPEN CLOSED PRINCIPLE




$employeeToSave = new Employee();
$employeeToSave.setName(‘Ferran’);
$employeeToSave.setSurames(‘Caellas Puig’);
…
$employeeToSave.toXml();
OPEN CLOSED PRINCIPLE



            // Initializing the employee to save
            $employeeToSave = new Employee();
            $employeeToSave.setName(‘Ferran’);
            $employeeToSave.setSurames(‘Caellas Puig’);
            …


            // Creating type of writer we want to use
            $xmlDataWriter = new XmlDataWriter();



            // Creating the employe writer
            $employeeWriter = new EmployeeWriter();
            $employeeWriter.setEmployee($employeeToSave);
            $employeeWritter.setWriter($xmlDataWriter);
            $employeeWriter.write();
Functions that use pointers or references to base classes must be able to
            use objects of derived classes without knowing it

  LISKOV SUBSTITUTION PRINCIPLE
LISKOV SUBSTITUTION PRINCIPLE




Function setDimensions (rectangle) {
      rectangle.setWidth(5);
      rectangle.setHeight(2);
}

r = new Square();
setDimensions(r);
High level modules should not depend upon low level modules.
            Both sould depend upon abstractions.

        Abstractions should not depend upon details.
         Details should depend upon abstractions.

    DEPENDENCY INVERSION
          PRINCIPLE
DEPENDENCY INVERSION PRINCIPLE




The high level module Copy is depending in the low level
modules ReadKeyboard and WritePrinter.
DEPENDENCY INVERSION PRINCIPLE




Now the Copy module is not depending in the
submodules anymore, we can now reuse the copy class
with new kinds of readers or writers.
Clients should not be forced to depend upon interfaces
                 that they do not use.

 INTERFACE SEGREGATION
       PRINCIPLE
INTERFACE SEGREGATION PRINCIPLE




The Automatic Teller Machine (ATM) problem. The user interface of an
ATM machine needs to be very flexible. It may need to be presented on a
screen, a braile tablet or spoken out a speech synthesizer.
INTERFACE SEGREGATION PRINCIPLE




Each transaction that the ATM can perform is encapsulated as a
derivative of the class Transaction. Each of these objects issues messages
to the UI.
Changes to one of the derivatives of Transaction will force corresponding
change to the UI affecting all the other derivatives of Transaction and
every other class that depends upon the UI interface.
INTERFACE SEGREGATION PRINCIPLE




Now, there is a specific UI interface for every of the transactions, a
change in one of the transactions will only affect the UI implementing
this concrete interface.
In example, we can have a separate UI only doing deposits and this will
implement only the IDepositUI and not any of the other UI interfaces.
FURTHER READINGS



Robert C. Martin papers about SOLID principles:
http://www.objectmentor.com/resources/articles/srp.pdf
http://www.objectmentor.com/resources/articles/ocp.pdf
http://www.objectmentor.com/resources/articles/lsp.pdf
http://www.objectmentor.com/resources/articles/dip.pdf
http://www.objectmentor.com/resources/articles/isp.pdf

Agile Software Development, Principles, Patterns, and Practices
(Robert C. Martin)
http://www.amazon.com/exec/obidos/ASIN/0135974445/objec
tmentorinc
SOLID
What is good design?

More Related Content

Similar to SOLID

The Clean Architecture
The Clean ArchitectureThe Clean Architecture
The Clean ArchitectureDmytro Turskyi
 
jQquerysummit - Large-scale JavaScript Application Architecture
jQquerysummit - Large-scale JavaScript Application Architecture jQquerysummit - Large-scale JavaScript Application Architecture
jQquerysummit - Large-scale JavaScript Application Architecture Jiby John
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVMBoulos Dib
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development GuideNitin Giri
 
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...DicodingEvent
 
[Android] DI in multimodule application
[Android] DI in multimodule application[Android] DI in multimodule application
[Android] DI in multimodule applicationOleg Mazhukin
 
Object Oriented Design SOLID Principles
Object Oriented Design SOLID PrinciplesObject Oriented Design SOLID Principles
Object Oriented Design SOLID Principlesrainynovember12
 
Solid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile developmentSolid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile developmentSimon Gould
 
ALPHA Script - Presentation
ALPHA Script - PresentationALPHA Script - Presentation
ALPHA Script - PresentationPROBOTEK
 
Dependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsDependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsJuan Lopez
 
King Tut Architecture
King Tut ArchitectureKing Tut Architecture
King Tut ArchitectureGary Pedretti
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignIrwansyah Irwansyah
 
Software design principles - jinal desai
Software design principles - jinal desaiSoftware design principles - jinal desai
Software design principles - jinal desaijinaldesailive
 
Design Patterns every Android developer should know
Design Patterns every Android developer should knowDesign Patterns every Android developer should know
Design Patterns every Android developer should knowmuratcanbur
 

Similar to SOLID (20)

Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
The Clean Architecture
The Clean ArchitectureThe Clean Architecture
The Clean Architecture
 
jQquerysummit - Large-scale JavaScript Application Architecture
jQquerysummit - Large-scale JavaScript Application Architecture jQquerysummit - Large-scale JavaScript Application Architecture
jQquerysummit - Large-scale JavaScript Application Architecture
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVM
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
 
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...
 
JavaFX in Action Part I
JavaFX in Action Part IJavaFX in Action Part I
JavaFX in Action Part I
 
[Android] DI in multimodule application
[Android] DI in multimodule application[Android] DI in multimodule application
[Android] DI in multimodule application
 
Object Oriented Design SOLID Principles
Object Oriented Design SOLID PrinciplesObject Oriented Design SOLID Principles
Object Oriented Design SOLID Principles
 
Solid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile developmentSolid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile development
 
ALPHA Script - Presentation
ALPHA Script - PresentationALPHA Script - Presentation
ALPHA Script - Presentation
 
Dependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsDependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and Patterns
 
King Tut Architecture
King Tut ArchitectureKing Tut Architecture
King Tut Architecture
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
 
Facade Design Pattern
Facade Design PatternFacade Design Pattern
Facade Design Pattern
 
SOLID Design principles
SOLID Design principlesSOLID Design principles
SOLID Design principles
 
Software design principles - jinal desai
Software design principles - jinal desaiSoftware design principles - jinal desai
Software design principles - jinal desai
 
Design Patterns every Android developer should know
Design Patterns every Android developer should knowDesign Patterns every Android developer should know
Design Patterns every Android developer should know
 
Android architecture
Android architectureAndroid architecture
Android architecture
 

Recently uploaded

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Recently uploaded (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

SOLID

  • 2. INTRODUCTION • My name is Ferran Caellas • Backend developer at eyeOS • Specialities and interests: Software Arquitecture, Patterns, Object Oriented Programing and Project Management.
  • 3. TNTWIWHDI That’s Not The Way I Would Have Done It
  • 4. DEFINITION OF A BAD DESIGN It is hard to change because every change affects too many other parts of the system. RIGIDITY When you make a change, unexpected parts of the system break. FRAGILITY It is hard to reuse in another application because it cannot be disentangled from the current application. IMMOBILITY
  • 5. There should never be more than one reason for a class to change SINGLE RESPONSIBILITY PRINCIPLE
  • 6. SINGLE RESPONSIBILITY PRINCIPLE Two resonsibilities: 1. Provide a mathematical model of the geometry of a rectangle. 2. Render the rectangle on a graphical user interface.
  • 7. SINGLE RESPONSIBILITY PRINCIPLE We moved the computational parts of a rectangle into a separated class called GeometricRectangle. Now changes made to the way rectangles are rendered cannot affect the ComputationalGeometryApplication.
  • 8. Software entities should be open for extension, but closed for modification OPEN CLOSED PRINCIPLE
  • 9. OPEN CLOSED PRINCIPLE Open for extension Closed to modification The behavior of the module can be The source code of a module is inviolate. extended. We can make the module No one is allowed to make source code behave in new and different ways as changes to it. the requirements of the application changes or to meet the needs of new applications. Abstraction is the key. In fact, polimorphism
  • 10. OPEN CLOSED PRINCIPLE $employeeToSave = new Employee(); $employeeToSave.setName(‘Ferran’); $employeeToSave.setSurames(‘Caellas Puig’); … $employeeToSave.toXml();
  • 11. OPEN CLOSED PRINCIPLE // Initializing the employee to save $employeeToSave = new Employee(); $employeeToSave.setName(‘Ferran’); $employeeToSave.setSurames(‘Caellas Puig’); … // Creating type of writer we want to use $xmlDataWriter = new XmlDataWriter(); // Creating the employe writer $employeeWriter = new EmployeeWriter(); $employeeWriter.setEmployee($employeeToSave); $employeeWritter.setWriter($xmlDataWriter); $employeeWriter.write();
  • 12. Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it LISKOV SUBSTITUTION PRINCIPLE
  • 13. LISKOV SUBSTITUTION PRINCIPLE Function setDimensions (rectangle) { rectangle.setWidth(5); rectangle.setHeight(2); } r = new Square(); setDimensions(r);
  • 14. High level modules should not depend upon low level modules. Both sould depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions. DEPENDENCY INVERSION PRINCIPLE
  • 15. DEPENDENCY INVERSION PRINCIPLE The high level module Copy is depending in the low level modules ReadKeyboard and WritePrinter.
  • 16. DEPENDENCY INVERSION PRINCIPLE Now the Copy module is not depending in the submodules anymore, we can now reuse the copy class with new kinds of readers or writers.
  • 17. Clients should not be forced to depend upon interfaces that they do not use. INTERFACE SEGREGATION PRINCIPLE
  • 18. INTERFACE SEGREGATION PRINCIPLE The Automatic Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible. It may need to be presented on a screen, a braile tablet or spoken out a speech synthesizer.
  • 19. INTERFACE SEGREGATION PRINCIPLE Each transaction that the ATM can perform is encapsulated as a derivative of the class Transaction. Each of these objects issues messages to the UI. Changes to one of the derivatives of Transaction will force corresponding change to the UI affecting all the other derivatives of Transaction and every other class that depends upon the UI interface.
  • 20. INTERFACE SEGREGATION PRINCIPLE Now, there is a specific UI interface for every of the transactions, a change in one of the transactions will only affect the UI implementing this concrete interface. In example, we can have a separate UI only doing deposits and this will implement only the IDepositUI and not any of the other UI interfaces.
  • 21. FURTHER READINGS Robert C. Martin papers about SOLID principles: http://www.objectmentor.com/resources/articles/srp.pdf http://www.objectmentor.com/resources/articles/ocp.pdf http://www.objectmentor.com/resources/articles/lsp.pdf http://www.objectmentor.com/resources/articles/dip.pdf http://www.objectmentor.com/resources/articles/isp.pdf Agile Software Development, Principles, Patterns, and Practices (Robert C. Martin) http://www.amazon.com/exec/obidos/ASIN/0135974445/objec tmentorinc