Course information Old exam Resit Report Result and walkthrough

Slides:



Advertisements
Similar presentations
Object Oriented Design Principles Arnon Rotem-Gal-Oz Product Line Architect.
Advertisements

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
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Inheritance and object compatibility Object type compatibility An instance of a subclass can be used instead of an instance of the superclass, but not.
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.
Chapter 25 GRASP: More Objects with Responsibilities 1CS6359 Fall 2011 John Cole.
NJIT More GRASP Patterns Chapter 22 Applying UML and Patterns Craig Larman Prepared By: Krishnendu Banerjee.
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
CSc 335: Three More OO Design Principles
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,
OODP Prudent OO Design. OODP-2 The Pillars of the Paradigm Abstraction Encapsulation Hierarchy –Association, Aggregation –Inheritance Polymorphism.
© 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.
CSSE 374: More GRASP’ing for Object Responsibilities
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.
Design Principles iwongu at gmail dot com.
The benefits of SOLID in software development Ruben Agudo Santos (GS-AIS-HR)
 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.
OO Design Principles Copyright © Vyacheslav Mukhortov, Nikita Nyanchuk-Tatarskiy, Copyright © INTEKS LLC,
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
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.
SOLID PHP & Code Smell Wrap-Up
Mantas Radzevičius ifm-2/2
What is Agile Design? SRP OCP LSP DIP ISP
OCP and Liskov Principles
Object-Oriented Programming Concepts
Software Design Principles
Software Architecture & Difference from Design
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 Practices
Component-Level Design
Software Design Principles
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.
Subtype Polymorphism, Subtyping vs
15 letters that will change your code
The SOLID Principles.
A (partial) blueprint for dealing with change
Principles of Object-Oriented Design
European conference.
Software Development An overview of careers in Business Application Development Sources: Dice.com, money.CNN.com, InfoWorld.com, money.USNews.com,
Object Oriented Design & Analysis
Some principles for object oriented design
Liskov Substitution Principle (LSP)
Chapter 10 – Component-Level Design
Presentation transcript:

Course information Old exam Resit Report Result and walkthrough 30 november, 8.15-10.00 Report Should be under way‏

Helt irrelevant för kursen First Lego League 5 studenter sökes som domare Programmering av legorobotar 10-15-åringar 7 november 09.00-15.00 Molkoms högstadium (Nyed) 100:-/h www.hjernekraft.org

W7 – Processes and Principles TDD, Pair Programming, Stand-ups SRP, OCP, LSP, DIP, ISP

TDD – Uncle Bob’s 3 laws

TDD - FIRST

TDD – Red-Green-Refactor

Pair Programming Always code in pairs Switch driver/co-driver Switch pairs Knowledge spread

Stand-up meetings Short and time-boxed What have I done What will I do Problems

SRP (Single Responsibility Principle)‏ A class should only have one reason to change Cohesion How focused a class is

Example - RBS Who should know the price of a room/catering item/piece of equipment? Domain vs storage

OCP (Open-Closed Principle)‏ Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification Existing clients should not have to care about future improvements Future improvements should be possible Abstration is the key Refactoring

OCP (cont'd)‏ "Open For Extension" - It is possible to extend the behavior of the module as the requirements of the application change (i.e. change the behavior of the module). "Closed For Modification" - Extending the behavior of the module does not result in the changing of the source code or binary code of the module itself.

OCP - example

OCP - Bertrand Meyer “A module will be said to be open if is still available for extension For example, it should be possible to add fields to the data structures it contains, or new elements to the set of functions it performs” “A module will be said to be closed if is available for use by other modules This assumes that the module has been given a well-defined, stable description (the interface...)”

LSP (Liskov Substitution Principle)‏ “What is wanted is something like the following substitution property: If for each object o1 of type S there is an object o2 of type T such that for all programs P defined in terms of T, the behavior of P is unchanged when o1 is substituted for o2, then S is a subtype of T. [Liskov88]“ Subtypes must be substitutable for their base types [Uncle Bob]

LSP - example public class Rectangle { protected int _width; protected int _height; public int Width get { return _width; } } public int Height get { return _height; } public virtual void SetWidth(int width)‏ _width = width; public virtual void SetHeight(int height)‏ _height = height; public class Square: Rectangle { public override void SetWidth(int width)‏ _width = width; _height = width; } public override void SetHeight(int height)‏ _height = height; _width = _height;

LSP – example (cont'd)‏ r.Width = 5; r.Height = 2; [TestFixture] public class RectangleTests { [Test] public void AreaOfRectangle()‏ Rectangle r = new Square(); r.Width = 5; r.Height = 2; // Will Fail - r is a square and sets // width and height equal to each other. Assert.IsEqual(r.Width * r.Height,10); }

DIP (Dependency-Inversion Principle)‏ Making your applications loosely coupled by not depending on concrete classes when appropriate, but abstractions High-level modules should not depend on low- level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions.

DIP - Good, bad, ugly

DIP – good for reuse Low-level modules are already being reused Buttons and other graphical objects Lists and other containers High-level modules are harder to reuse DIP helps reusing higher modules Decoupling from details

ISP (Interface Segregation Principle)‏ Clients should not be forced to depend on methods that they do not use Related to cohesion

ISP - Example ATM Deposit Withdraw Transfer 3 different uses of the system 3 different interfaces You don't want to see stuff with no relevance

ISP – Example 2 Name Personal number Income IRS Name Pnr Grades Kau Artist