 What is SOLID  The S in SOLID  The O in SOLID  The L in SOLID  The I in SOLID  The D in SOLID  Questions.

Slides:



Advertisements
Similar presentations
Jim McKeeth | Podcast at Delphi.org
Advertisements

Design Principles & Patterns
Since 1995, we’ve been building innovative custom solutions specifically designed to meet the unique needs of America’s most recognized companies. If you.
St Louis Day of.NET 2011 Refactoring to a SOLID Foundation Steve Bohlen Senior Software Engineer SpringSource/VMware Blog:
General OO Concepts and Principles CSE301 University of Sunderland Harry R. Erwin, PhD.
Lecture 9 Improving Software Design CSC301-Winter 2011 – University of Toronto – Department of Computer Science Hesam C. Esfahani
SOLID Object Oriented Design Craig Berntson
Inheritance and object compatibility Object type compatibility An instance of a subclass can be used instead of an instance of the superclass, but not.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
13 Jul 2006CSE403, Summer'06, Lecture10 Lifecycle Architecture Review: Preliminary Feedback Valentin Razmov.
Object-oriented metrics Design decisions: Class Cohesion Open-Closed Single Responsibility Interface Segregation Dependency Inversion Liskov Substitution.
CLASS DESIGN PRINCIPLES Lecture 2. The quality of the architecture What is a good design? It is the design that at least does not have signs of “bad”.
1 OO Design Novosoft, 2001 by V. Mukhortov. 2 OO Design Goals  Flexibility Changes must be localized  Maintainability Modules requiring changes can.
Company Confidential – Do Not Duplicate 2 Copyright 2008 McLane Advanced Technologies, LLC S.O.L.I.D. Software Development Achieving Object Oriented Principles,
© 2004 Capgemini - All rights reserved SOLID - OO DESIGN PRINCIPLES Andreas Enbohm, Capgemini.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Introduction to SOLID Principles. Background Dependency Inversion Principle Single Responsibility Principle Open/Closed Principle Liskov Substitution.
Systems Analysis & Design Methods VII OOD-principles.
CSSE 374: More GRASP’ing for Object Responsibilities
S.O.L.I.D. Software Development 12 January 2010 (Martin Verboon, Patrick Kalkman, Stan Verdiesen)
SOLID Principles in Software Design
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 12-5 Software Engineering Design Goals.
Design Principles iwongu at gmail dot com.
The benefits of SOLID in software development Ruben Agudo Santos (GS-AIS-HR)
Refactoring for Testability (or how I learned to stop worrying and love failing tests) Presented by Aaron Evans.
1 OO Package Design PrinciplesStefan Kluth 4OO Package Design Principles 4.1Packages Introduction 4.2Packages in UML 4.3Three Package Design Principles.
Software Design Principles
Incremental Design Why incremental design? Goal of incremental design Tools for incremental design  UML diagrams  Design principles  Design patterns.
Elements of OO Abstraction Encapsulation Modularity Hierarchy: Inheritance & Aggregation 4 major/essential elements3 minor/helpful elements Typing Concurrency.
OO Design Principles Copyright © Vyacheslav Mukhortov, Nikita Nyanchuk-Tatarskiy, Copyright © INTEKS LLC,
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 11a: Component-Level Design Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Design for testability as a way to good coding Simone Chiaretta Architect, Council of the EU December 9 th,
High Cohesion Low Coupling Old Standards for Object Oriented Programming.
Five design principles
CHAPTER 3 MODELING COMPONENT-LEVEL DESIGN.
Principles of Object Oriented Design
PRINCIPLES OF OBJECT ORIENTED DESIGN S.O.L.I.D. S.O.L.I.D Principles What is SOLID?  Acrostic of 5 Principles:  The Single Responsibility Principle.
Component Design Elaborating the Design Model. Component Design Translation of the architectural design into a detailed (class-based or module- based)
SOLID Design Principles
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Dependency Inversion Principle Jon McBee Principal Software Engineer Ultratech CNT.
Session 33 More on SOLID Steve Chenoweth Office: Moench Room F220 Phone: (812) Chandan Rupakheti Office: Moench.
SOLID PHP & Code Smell Wrap-Up
Liskov Substitution Principle Jon McBee CLA, CLED, CTD, CPI, LabVIEW Champion.
Microsoft Advertising 16:9 Template Light Use the slides below to start the design of your presentation. Additional slides layouts (title slides, tile.
Clean Code and How to Achieve Zero Defects Jason Jolley Director, Application Development Micro Strategies, Inc.
Beginning Software Craftsmanship Brendan Enrick Steve Smith
14 Jul 2005CSE403, Summer'05, Lecture 09 Lecture 09: Fundamental Principles and Best Practices for Software Design Valentin Razmov.
Mantas Radzevičius ifm-2/2
Course information Old exam Resit Report Result and walkthrough
Dependency Inversion Principle
Software Architecture & Difference from Design
CSE687 - Object Oriented Design class notes Survey of the C++ Programming Language Jim Fawcett Spring 2004.
Copyright © by Curt Hill
Software Engineering: A Practitioner’s Approach, 6/e Chapter 11 Component-Level Design copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc.
Factory pattern Unit of Work
Component-Level Design
lecture 08, OO Design Principle
11/29/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Software Design Lecture : 14.
15 letters that will change your code
Questions First On class? On project? On material we’ve discussed?
CS 350 – Software Design Principles and Strategies – Chapter 14
The SOLID Principles.
A (partial) blueprint for dealing with change
Object Oriented Design & Analysis
Dependency Inversion principle
Some principles for object oriented design
Chapter 10 – Component-Level Design
Presentation transcript:

 What is SOLID  The S in SOLID  The O in SOLID  The L in SOLID  The I in SOLID  The D in SOLID  Questions

 A means to avoid technical debt  Decrease Coupling  Increase Cohesion  Maintainable  Extensible  Testable

 Guidelines, NOT LAWS You got to know when to hold’em, know when to fold’em, Know when to walk away and know when to run. -Kenny Rogers

Application Flat File Sender Send GetMessage

Single Responsibility Principle There should never be more than one reason for a class to change -Uncle Bob

VIOLATES THE PRINCIPLEABIDES BY THE PRINCIPLE Application Flat File Sender Send GetMessage Application Flat File FileReader GetMessage Sender Send

Application Flat File FileReader GetMessage Sender Send XML File

Open-Close Principle Software entities (classes, modules, functions, etc…) should be open for extension, but closed for modification -Uncle Bob

VIOLATES THE PRINCIPLEABIDES BY THE PRINCIPLE Application Flat File FileReader GetMessage Sender Send XML File Application Flat File BaseFileTypeReader CanRead ReadFile Sender Send XML File FlatFileReader CanRead ReadFile XmlFileReader CanRead ReadFile FileReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader

Application Flat File BaseFileTypeReader CanRead ReadFile Sender Send XML File FlatFileReader CanRead ReadFile XmlFileReader CanRead ReadFile FileReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader DB File DbFileReader CanRead ReadFile Database

Liskov Substitution Principle Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it -Uncle Bob

VIOLATES THE PRINCIPLEABIDES BY THE PRINCIPLE Application Flat File BaseFileTypeReader CanRead ReadFile Sender Send XML File FlatFileReader CanRead ReadFile XmlFileReader CanRead ReadFile FileReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader DB File DbFileReader CanRead ReadFile Database Application Flat File BaseFileTypeReader CanRead ReadFile Sender Send XML File FlatFileReader CanRead ReadFile XmlFileReader CanRead ReadFile FileReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader DbReader GetMessage Database

Application Flat File BaseFileTypeReader CanRead ReadFile Sender Send XML File FlatFileReader CanRead ReadFile XmlFileReader CanRead ReadFile FileReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader Database IReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader DbReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader

Interface Segregation Principle Clients should not be forced to depend upon interfaces that they do not use -Uncle Bob

ABIDES BY THE PRINCIPLE Application Flat File BaseFileTypeReader CanRead ReadFile Sender Send XML File FlatFileReader CanRead ReadFile XmlFileReader CanRead ReadFile FileReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader Database IReader GetMessage DbReader GetMessage IFileTypeReaderRegisterable RegisterDefaultFileTypeReader RegisterFileTypeReader

Dependency Inversion Principle High level modules should not depend upon low level modules. Both should depend upon abstractions Abstractions should not depend upon details. Details should depend upon abstractions -Uncle Bob

ABIDES BY THE PRINCIPLE Application Flat File BaseFileTypeReader CanRead ReadFile I Sender Send XML File FlatFileReader CanRead ReadFile XmlFileReader CanRead ReadFile FileReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader Database IReader GetMessage DbReader GetMessage IFileTypeReaderRegisterable RegisterDefaultFileTypeReader RegisterFileTypeReader Sender Send

Application Flat File Sender Send GetMessage Xml File Database

Application Flat File BaseFileTypeReader CanRead ReadFile I Sender Send XML File FlatFileReader CanRead ReadFile XmlFileReader CanRead ReadFile FileReader GetMessage RegisterDefaultFileTypeReader RegisterFileTypeReader Database IReader GetMessage DbReader GetMessage IFileTypeReaderRegisterable RegisterDefaultFileTypeReader RegisterFileTypeReader Sender Send

 Martin Folwer – Technical Debt   Wikipedia – Coupling   Wikipedia – Cohesion   Robert Martin – The Principles of OOD   Derick Bailey – SOLID Principles – Step by step code  training/tree/master/SOLID%20Principles%20- %20Step%20By%20Step%20Code training/tree/master/SOLID%20Principles%20- %20Step%20By%20Step%20Code

 –  Twitter  LinkedIn –