Five design principles

Slides:



Advertisements
Similar presentations
Object Oriented Design Principles Arnon Rotem-Gal-Oz Product Line Architect.
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.
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.
17.10 Java Beans Java beans are a framework for creating components in Java. AWT and Swing packages are built within this framework Made to fit in with.
1 Software Maintenance and Evolution CSSE 575: Session 6, Part 1 The “SEAM” Model Steve Chenoweth Office Phone: (812) Cell: (937)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Liskov Substitution Principle
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
CSc 335: Three More OO Design Principles
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.
Ch:10 Component Level Design Unit 4. What is Component? A component is a modular building block for computer software Because components reside within.
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.
CSE 301 Exam Revision Lecture
Introduction to SOLID Principles. Background Dependency Inversion Principle Single Responsibility Principle Open/Closed Principle Liskov Substitution.
S.O.L.I.D. Software Development 12 January 2010 (Martin Verboon, Patrick Kalkman, Stan Verdiesen)
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 12-5 Software Engineering Design Goals.
The Factory Patterns SE-2811 Dr. Mark L. Hornick 1.
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.
Using Mock Objects with Test Driven Development Justin Kohlhepp
 What is SOLID  The S in SOLID  The O in SOLID  The L in SOLID  The I in SOLID  The D in SOLID  Questions.
Software Design Principles
1 Single Responsibility Principle Open Closed Principle Liskov Substitution Principle Law of Demeter CSC 335: Object-Oriented Programming and Design.
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.
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.
Evaluating an Object-Oriented Design ©SoftMoore ConsultingSlide 1.
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.
Session 33 More on SOLID Steve Chenoweth Office: Moench Room F220 Phone: (812) Chandan Rupakheti Office: Moench.
Dependency Inversion By Steve Faurie. Dependency Inversion Described in Agile Principles, Patterns and Practices in C# by Robert C. Martin.
SOLID PHP & Code Smell Wrap-Up
Microsoft Advertising 16:9 Template Light Use the slides below to start the design of your presentation. Additional slides layouts (title slides, tile.
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
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.
object oriented Principles of software design
Agile Software Development
Software Re-engineering - Theoretical and Practical Approaches
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.
15 letters that will change your code
The SOLID Principles.
A (partial) blueprint for dealing with change
Object Oriented Design & Analysis
Dependency Inversion principle
Some principles for object oriented design
Interface Segregation Principle
Chapter 10 – Component-Level Design
Presentation transcript:

Five design principles SOLID design Five design principles SOLID design

SOLID, what is it? Single responsibility principle A class should have only a SINGLE responsibility Change in the specification on that responsibility should only affect this class Open/close principle Each class should be open for extensions (sub-classes), but closed for modifications We should never need to modify an existing class Liskov substitution principle Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program. Named after Barbara Liskov Interface segregation principle Many client-specific interfaces is better than one general purpose interface Dependency inversion principle Depend on abstractions, not on concretions SOLID design

SOLID, what is it used for? The SOLID principles are used as a guideline Designing systems Refactoring systems Detecting “smells” in code Refactor until the code is SOLID SOLID design

Single responsibility principle Based on cohesion A class should do only one thing Separation of concerns SOLID design

Open/close principle Open for extensions Closed for modifications Sub-classes Closed for modifications New functionality should be placed in sub-classes Overriding methods from the base class SOLID design

Interface segregation principle Many client-specific interfaces is better than one general purpose interface Clients should not be forced to depend upon interfaces that they don't use SOLID design

Dependency inversion principle Depend on abstractions, not concretions Abstractions = interfaces Concretions = classes Loose coupling Figure from Robert C. Martin http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf SOLID design

References and further readings Robert C. Martin Design Principles and Design Patterns, 2000 http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf michas The S.O.L.I.D Object Oriented Programming (OOP) Principles, 2010 http://www.codeproject.com/Articles/60845/The-S-O-L-I-D-Object-Oriented-Programming-OOP-Prin Design Principles http://www.oodesign.com/design-principles.html SOLID design