Thanks for Coming l WEB. Principles of Good Design SEI, SJTU WEB APPS and SERVICES.

Slides:



Advertisements
Similar presentations
Object-Oriented Software Construction Bertrand Meyer 2nd ed., Prentice Hall, 1997.
Advertisements

Chapter 13 Design Concepts and Principles
Software Design Deriving a solution which satisfies software Speficitaion.
Software Engineering Software Design Slide 1 Software Engineering Software Design.
Software Design Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn.
Software Design Deriving a solution which satisfies software requirements.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:
The Architecture Design Process
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
Architectural Design Principles. Outline  Architectural level of design The design of the system in terms of components and connectors and their arrangements.
Chair of Software Engineering ATOT - Lecture 3, 7 April Advanced Topics in Object Technology Bertrand Meyer.
CS350/550 Software Engineering Lecture 1. Class Work The main part of the class is a practical software engineering project, in teams of 3-5 people There.
1 CS115 Class 7: Architecture Due today –Requirements –Read Architecture paper pages 1-15 Next Tuesday –Read Practical UML.
Chapter 1 Principles of Programming and Software Engineering.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering CSE470: Systems Engineering 35 Computer System Engineering Computer System Engineering is a problem-solving activity. Itemize desired.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
Course Instructor: Aisha Azeem
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
MADALINA CROITORU Software Engineering week 4 Madalina Croitoru IUT Montpellier.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 19 Slide 1 Component-based software engineering 1.
Introduction to Object-oriented programming and software development Lecture 1.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
“Enhancing Reuse with Information Hiding” ITT Proceedings of the Workshop on Reusability in Programming, 1983 Reprinted in Software Reusability, Volume.
CSE 303 – Software Design and Architecture
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
SOFTWARE DESIGN.
CSE 219 Computer Science III Program Design Principles.
Software Design Deriving a solution which satisfies software requirements.
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
CSE 303 – Software Design and Architecture LECTURE 4.
Design Concepts and Principles Instructor: Dr. Jerry Gao.
1 COMP 350: Object Oriented Analysis and Design Lecture 1Introduction References: Craig Larman Chapter 1.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
Software Design Mihaela Dinsoreanu, PhD Contact: room D01, Baritiu Spring 2011 Computer Science Department,
Introduction to Design. What is Design? 2 minutes Pairs.
Abstraction ADTs, Information Hiding and Encapsulation.
Software Architecture Evaluation Methodologies Presented By: Anthony Register.
PRINCIPLES OF GOOD DESIGN 12/7/ Assignment 4 – Deadline 28 Nov.  Read an article placed in generalshare course folder  Point: Design Patterns.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
1 Software Design Lecture What’s Design It’s a representation of something that is to be built. i.e. design  implementation.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
Or how to work smarter when building solutions.  2:30 – 3:30 Mondays – focus on problem solving (with some terminology thrown in upon occasion)  All.
Object-Oriented Design Concepts University of Sunderland.
Design CS 470 – Software Engineering I Sheldon X. Liang, PH.D.
Introduction to Service Orientation MIS 181.9: Service Oriented Architecture 2 nd Semester,
Chapter 10 Software quality. This chapter discusses n Some important properties we want our system to have, specifically correctness and maintainability.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Wrap up. Structures and views Quality attribute scenarios Achieving quality attributes via tactics Architectural pattern and styles.
Principles of Programming & Software Engineering
Software Design.
CompSci 280 S Introduction to Software Development
Lecture 9- Design Concepts and Principles
Lecture 9- Design Concepts and Principles
Principles of Good Design
Principles of Good Design
Software Engineering Software Design.
Presentation transcript:

Thanks for Coming l WEB

Principles of Good Design SEI, SJTU WEB APPS and SERVICES

From Journeyman to Master Pieces, Moves Criteria, Principles, Rules Contextual Solutions What is Good? How to Apply "Good"? How to Play?

Stages of Learning l Learn the Rules! algorithms, data structures and languages of software write programs, although not good ones l Learn the Principles! software design, programming paradigms with pros and cons importance of cohesion, coupling, information hiding, dependency management l Learn the Patterns! study the "design of masters" Understand! Memorize! Apply!

Citing Robert Martin... "... But to truly master software design, one must study the designs of other masters. Deep within those designs are patterns that can be used in other designs. Those patterns must be understood, memorized, and applied repeatedly until they become second nature."

Where Do We Stand ? l We know the Rules 1-2 OO programming language (Java, C++) some experience in writing programs (< 10 KLOC) l We heard about Principles "Open-Closed"; "Liskov Substitution Principle" etc. randomly applied some of them l We dream of becoming "design masters" but... l We believe that writing good software is somehow "magic" exclusively tailored for geniuses, "artists", gurus

A Roadmap l What is Good Design? Goals of Design Key Concepts and Principles Criteria for Good Design Principles and Rules of Good Design l What is Good Object-Oriented Design? Guidelines, Rules, Heuristics l How to Apply Good Design? Design Patterns Architectural Patterns (Styles)

What is Good Design? l The temptation of "correct design" insurance against "design catastrophes" design methods that guarantee the "correct design" there is no such thing! You must decide! l Coad & Yourdon: "A good design is one that balances trade-offs to minimize the total cost of the system over its entire lifetime" "A matter of avoiding those characteristics that lead to bad consequences. l Need of criteria for evaluating a design l Need of principles and rules for creating good designs

Goals of Design l Decompose system into components i.e. identify the software architecture l Determine relationships between components identify component dependencies determine inter-component communication mechanisms l Specify component interfaces Interfaces should be well defined facilitates component testing and team communication l Describe component functionality informally or formally

Key Design Concepts l Main purpose manage software system complexity by improving software quality factors facilitate systematic reuse l Decomposition/Composition Component General Principles l Modularization Definition and Benefits Criteria Principles

Decomposition Motivation: handle complexity by splitting large problems into smaller problems, i.e. "divide and conquer" methodology 1. Select a piece of the problem (initially, the whole problem) 2. Determine the components in this piece using a design paradigm e.g. functional, structured, object-oriented, generic, etc. 3. Describe the components interactions l Repeat steps 1 through 3 until some termination criteria is met e.g., customer is satisfied, run out of money, etc. ;-)

Component Definitions A component is: a software entity encapsulating the representation of an abstraction a vehicle for hiding at least one design decision a "work" assignment for a programmer or group of programmers a unit of code that has one or more names has identifiable boundaries can be (re-)used by other components encapsulates data hides unnecessary details can be separately compiled (if supported)

Component Interface A component interface consists of several sections: l Imports services required from other components l Exports services provided to other components l Access Control e.g. protected/private/public

Schmidt's Decomposition Principles P1. Don't design components to correspond to execution steps Since design decisions usually transcend execution time [Parnas72] P2. Decompose so as to limit the effects of design decisions Anything that permeates the system will be expensive to change P3. Components should be specified by all information needed to use the component and nothing more!

Modularity l A modular system is one that's structured into identifiable abstractions called components Components should possess well-specified abstract interfaces Components should have high cohesion and low coupling l Modularity is important for both design and implementation phases

Benefits of Modularity Modularity facilitates software quality factors, e.g.: Extensibility  well-defined, abstract interfaces Reusability  low-coupling, high-cohesion Portability  hide machine dependencies Modularity is important for good designs since it  Enhances for separation of concerns  Enables developers to reduce overall system complexity via decentralized software architectures  Increases scalability by supporting independent and concurrent development by multiple personnel

Meyer's Five Criteria for Evaluating Modularity l Decomposability Are larger components decomposed into smaller components? l Composability Are larger components composed from smaller components? l Understandability Are components separately understandable? l Continuity Do small changes to the specification affect a localized and limited number of components? l Protection Are the effects of run-time abnormalities confined to a small number of related components?

1. Decomposability l Decompose problem into smaller sub-problems that can be solved separately Example: Top-Down Design Counter-example: Initialisation Module initialize everything for everybody

2. Composability l Freely combine modules to produce new systems in different environments  components Example: Math libraries; UNIX command & pipes Counter-example: pre-processors (incompatibility)

3. Understandability l Individual modules understandable by human reader Counter-example: Sequential Dependencies (A | B | C)

4. Continuity l Small change in specification results in: changes in only a few modules Does not affect the architecture Example: Symbolic Constants Counter-Example: Static Arrays (see Pascal)

5. Protection l Effects of an abnormal run-time condition is confined to a few modules Example: Validating input at source Counter-example: Undisciplined exceptions

Meyer's Five Rules of Modularity l Direct Mapping consistent relation between problem model and solution structure l Few Interfaces Every component should communicate with as few others as possible l Small Interfaces If any two components communicate at all, they should exchange as little information as possible l Explicit Interfaces Whenever two components A and B communicate, this must be obvious from the text of A or B or both l Information Hiding

1. Direct Mapping l Keep the structure of the solution compatible with the structure of the modeled problem domain clear mapping (correspondence) between the two Impact on: l Continuity easier to assess and limit the impact of change l Decomposability decomposition in the problem domain model as a good starting point for the decomposition of the software

2. Few Interfaces l Every module should communicate with as few others as possible rather n-1 than n(n-1)/ 2 affects Continuity, Protection, Composability, Understandability

3. Small Interfaces l If two modules communicate, they should exchange as little information as possible limited "bandwidth" of communication Continuity and Protection 4. Explicit Interfaces  Whenever two modules A and B communicate, this must be obvious from the text of A or B or both.  Decomposability and Composability  Continuity, Understandability

4. Explicit Interfaces l The issue of indirect coupling data sharing Module AModule B Data Item x modifies accesses

5. Information Hiding Motivation: design decisions that are subject to change should be hidden behind abstract interfaces, i.e. components l Components should communicate only through well-defined interfaces l Each component is specified by as little information as possible l If internal details change, client components should be minimally affected not even recompiling or linking l Information hiding is one means to enhance abstraction!

Abstraction vs. Information Hiding

Coming Next... l What is Good Object-Oriented Design? The Object-Oriented... Hype Mapping of Criteria and Rules to OO Design Principles of OO Design (R. Martin) Design Heuristics (A.J. Riel)