Design (1) Design involves decisions on how to deliver the agreed functionality to the users. Design involves development of a clear, unambiguous and consistent.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Quality of a Class Abstraction: Coupling & Cohesion Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Design Concepts and Principles
1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
Tailoring Needs Chapter 3. Contents This presentation covers the following: – Design considerations for tailored data-entry screens – Design considerations.
What is Software Design?  Introduction  Software design consists of two components, modular design and packaging.  Modular design is the decomposition.
API Design CPSC 315 – Programming Studio Fall 2008 Follows Kernighan and Pike, The Practice of Programming and Joshua Bloch’s Library-Centric Software.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Software Evolution Managing the processes of software system change
Module: Definition ● A logical collection of related program entities ● Not necessarily a physical concept, e.g., file, function, class, package ● Often.
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
Object-Orientated Design Unit 3: Objects and Classes Jin Sa.
PVK-Ht051 Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance Maintenance.
Systems Design. Analysis involves understanding and documenting user requirements in a clear and unambiguous way. It focuses on the business side and.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 2 Slide 1 Systems engineering 1.
Design, goal of design, design process in SE context, Process of design – Quality guidelines and attributes Evolution of software design process – Procedural,
Software Reengineering 2003 년 12 월 2 일 최창익, 고광 원.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Problems with reuse – Increased maintenance costs; lack of tool support; not-invented- here syndrome; creating, maintaining, and using a component library.
Chapter 9: Coupling & Cohesion Omar Meqdadi SE 273 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
1 Chapter 2 Socio-technical Systems (Computer-based System Engineering)
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
CSE 303 – Software Design and Architecture
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
Coupling and Cohesion Source:
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
1 Software Design Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13, 5 th edition and Ch. 10, 6 th edition.
SOFTWARE DESIGN Design Concepts Design is a meaningful engineering representation of something that is to be built It can be traced to a customer’s requirements.
1 Software Design Overview Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13.
Cohesion and Coupling CS 4311
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 05. Review Software design methods Design Paradigms Typical Design Trade-offs.
Programming Logic and Design Using Methods. 2 Objectives Review how to use a simple method with local variables and constants Create a method that requires.
GRASP: Designing Objects with Responsibilities
Computing and SE II Chapter 9: Design Methods and Design Models Er-Yu Ding Software Institute, NJU.
Configuration Management and Change Control Change is inevitable! So it has to be planned for and managed.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
1 OO Analysis & Design - Introduction to main ideas in OO Analysis & design - Practical experience in applying ideas.
Dr D. Greer, Queens University Belfast )Chapter Six 1 Software Engineering Chapter Six Software Design Quality Learning Outcomes.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
TK2023 Object-Oriented Software Engineering CHAPTER 8 LOGICAL ARCHITECTURE.
Chapter 5:User Interface Design Concepts Of UI Interface Model Internal an External Design Evaluation Interaction Information Display Software.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
1 Here are some quotations to get an overview of the kinds of issues of interest.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Week 6: Software Design HNDIT Software Engineering Software Design Learning Outcomes  Understand the activities involved in the Design process.
Design CS 470 – Software Engineering I Sheldon X. Liang, PH.D.
Chapter 9: Coupling & Cohesion Omar Meqdadi SE 273 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Slide 7B.31 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Programming Logic and Design Fifth Edition, Comprehensive Chapter 7 Using Methods.
SOFTWARE DESIGN & SOFTWARE ENGINEERING Software design is a process in which data, program structure, interface and their details are represented by well.
Coupling and Cohesion Schach, S, R. Object-Oriented and Classical Software Engineering. McGraw-Hill, 2002.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
1 Week 7 Software Engineering Spring Term 2016 Marymount University School of Business Administration Professor Suydam.
Why is Design so Difficult? Analysis: Focuses on the application domain Design: Focuses on the solution domain –The solution domain is changing very rapidly.
Design Engineering 1. Analysis  Design 2 Characteristics of good design 3 The design must implement all of the explicit requirements contained in the.
7. Modular and structured design
CompSci 280 S Introduction to Software Development
Coupling and Cohesion Rajni Bhalla.
Coupling and Cohesion 1.
Improving the Design “Can the design be better?”
Programming Logic and Design Fourth Edition, Comprehensive
Software Design Lecture : 9.
Cohesion and Coupling.
Logical Architecture & UML Package Diagrams
DESIGN CONCEPTS AND PRINCIPLES
Presentation transcript:

Design (1) Design involves decisions on how to deliver the agreed functionality to the users. Design involves development of a clear, unambiguous and consistent user-interface. (Remember that users are already likely to have been involved in user-interface design where prototyping or some form of iterative development has been used - such as in the Agile approach) System design should be done in the context of the McCall factors, in particular - Will the software be maintainable? Will software be usable? Will software be testable? Design involves decisions on how to “package” the units of code.

Design (2)  Large systems are always made up of smaller sub-systems.  A system architecture shows how a system is organised and how the component parts inter-operate.  Thus, the system architecture is the basic structural framework and it provides the foundation for essential communication & control between the system components.  Each sub-system or component part provides some related set of services to the user  A similar architecture is often suitable for different systems from within the same domain area – as a result of this a good architecture can support large-scale reuse.  Architecture affects performance, robustness (reliability), and maintainability of a a system  Different kinds of systems may require different architectures, e.g. transaction-processing systems, real-time systems, web-based systems

Design (3) I will look briefly at 3 key aspects of design:  Different alternative architectures  Component-level design considerations  User interface

Design (4) The Concept of Architecture Get A, B Let C = A*B Output C Get A, B Let C = A*B A, B C C Get A, B Let C = A*B Output C A, B C 132

Design (5) The “call-return” architecture: A module can call one of several other modules. Control is passed to the called module From Sommerville, “Software Engineering”

Design (6) Example of architecture for a real-time system: From Sommerville, “Software Engineering”

Design (7) Architecture for a multi-processor traffic control system: From Sommerville, “Software Engineering”

Design (8) Weather Mapping system – an OO approach 1: Overall architecture From Sommerville, “Software Engineering”

Design (9) Weather Mapping system – an OO approach 2: Subsystems Weather station The architecture of each collection of objects can be modelled in turn From Sommerville, “Software Engineering”

Design (10) Weather Mapping system – an OO approach 3: The Weather Station architecture From Sommerville, “Software Engineering”

Design (11) Weather Mapping system – an OO approach 4: Some object classes in the weather station system WeatherStation object class provides basic interface of weather station with its environment This object class encapsulates all operations involving collection & sumarising of data These object classes are concerned with controlling hardware instruments From Sommerville, “Software Engineering”

Design (12) Weather Mapping system – an OO approach 5: From the abstract to the physical – packaging components: From Sommerville, “Software Engineering”

Design (13) Weather Mapping system – an OO approach 6: OO allows a consistent & seamless progression from analysis through to design: Example From Sommerville, “Software Engineering”

Design (14) Architectural Design for Web-based Applications 1 From Pressman, “Software Engineering”

Design (15) Architectural Design for Web-based Applications 2 From Pressman, “Software Engineering” There may be a trad-off between ease of navigation and risk of confusion to unfamiliar users There may be a trade-off between ease of navigation and risk of confusion to unfamiliar users

Component-level design considerations Design (16) Whether the analysis & design approach is OO or not, every effort should be made to ensure that:  all code within a module is concerned with a single discrete function  the minimum interaction between modules, i.e. we should avoid modules passing unnecessary data to one another or having read/write access to the same data Functional cohesion within modules Minimum coupling between modules

Component-level design considerations Module Cohesion Design (17) Modified from Schach, “OO & Classical Software Engineering” Repetition of same task Two tasks that occur at the same time Two tasks packaged together just because they are both “editing” tasks Single specific task Temporal Two unrelated tasks

Component-level design considerations Module Cohesion Design (18) the aim is to produce software modules where all the code elements within a particular module are concerned with the execution of a single discrete task So - Code elements should not be bundled into the same module simply because they relate to operations that  happen at the same time  are the same kind of task, e.g. editing, verifying etc  “convenient” to put into one module Temporal cohesion Logical cohesion Coincidental cohesion Functional cohesion Avoid these last 3 forms of cohesion as they have a serious negative effect on both testability and maintainability – modules should only have functional cohesion

Component-level design considerations Module Coupling Design (19) “ Coupling ” is the degree of interaction between two modules The type and extent of module coupling can have a very significant impact on -  potential for re-use of modules in future products  testing & debugging  reliability  maintainability (future modification) Good software systems have the least interaction between modules That is, we aim for the least possible (loosest) coupling

Component-level design considerations Module Coupling Design (20) Module B Module A Module B Module A X Y Here Module A calls Module B. Control is passed back to A after B executes. No data is exchanged NO COUPLING Module A calls Module B and passes data “X” to it. When B returns control to A, it passes back the data “Y” to A MODULES ARE COUPLED

Component-level design considerations Module Coupling Design (21)  Data coupling  Content coupling  Common coupling  Control coupling  Stamp coupling Types of coupling Good – often necessary Very bad

Component-level design considerations Module Coupling Design (22) Data Coupling Two modules are data coupled if all of the elements of the data passed between these modules is used by the called module. The data passed between modules may be a simple argument i.e. a simple variable, or it may be a data structure. Data coupling means that a change made to one module is less likely to cause a knock-on fault in another module All parts of a data structure must be used

Component-level design considerations Data Coupling Design (23) Stamp Coupling Two modules are stamp coupled if a data structure is passed as an argument but the called module operates on only some of the individual components of that data structure. In other words, the called module doesn’t need all the data that is being passed to it Stamp coupling slightly increases the chances of knock-on errors when changes are made to modules and it makes debugging more difficult

Component-level design considerations Data Coupling Design (24) Control Coupling Two modules are control coupled if one passes an element of control to the other module; that is, one module explicitly controls the logic of the other If module P calls module Q and Q passes a flag back to P that says: “I am unable to complete my task” then Q is passing data (i.e. data coupled). But – if the flag means: “I am unable to complete my task and, therefore, display error message # 43” then P and Q are control coupled. Module Q Module P flag The problem here is that Module Q has to be aware of the internal structure and logic of Module P

Component-level design considerations Data Coupling Common Coupling Two modules arecommon coupled if both have access to the same global data area Design (25) Module B Module A global_variable The most common situation in which this arises is when both Module A and Module B have access to the same database and both can read and write to the database. Both modules have read-write access to global_variable

Component-level design considerations Data Coupling The Problems with Common Coupling - Design (26) As a consequence of common coupling, modules may be exposed to more data than they need. Control of data access may be more difficult and this can increase the risk of computer crime. The introduction of new modules which can alter a global variable can result in an exponential increase in the instances of common coupling. Module re-use becomes difficult because an identical list of global variables has to be supplied each time the module is re-used If a maintenance change is made in one module to the declaration of a global variable then every module that can access that global variable has to be changed also. If a run-time failure occurs it may be difficult to reconstruct what happened because any one of a number of modules could have changed the value of a variable

Component-level design considerations Data Coupling Design (27) Content Coupling Two modules are content coupled if a calling module directly references the code of the called module.... Get p If p = 1 then r= 1, call B (r) else if p = 2 then r = 2, call B (r) else r = 3, call B (r) endif ModuleB ModuleA r... If r = 1 then do routine_1 else if r = 2 then do routine_2 else do routine_3 endif goto end Routine_1... goto end Routine_2... goto end Routine_3... goto end... end Module A decides which part of Module B will execute. Content coupling is also known as pathological coupling and is the worst possible type.

Component-level design considerations Data Coupling – Diagrammatic View Design (28)

Component-level design considerations Data Coupling Content Coupling & Coincidental Cohesion Software which exhibits content coupling between modules and coincidental cohesion within modules has no proper design structure. Such software frequently arises as a result of ongoing maintenance of legacy systems. Design (29) Testing, debugging and maintenance becomes increasingly more difficult and expensive. Component re-use becomes impossible Software becomes less stable and less reliable

User interface Design A poorly designed user interface means that the potential benefits of the system are unlikely to be achieved. Four key principles: Place the user in control Reduce the user’s memory load Make the interface consistent Control the use of colours e.g. design user interaction to be Interruptible & reversible Hide technical details from user Design for direct interaction with objects that appear on screen The system should “remember” details of interaction scenarios rather than forcing the user to recall details. Use appropriate default values Design an interface with a consistent look, “feel” and behaviour across the whole system Use colours to highlight & emphasise Excessive use of colour can cause fatigue and irritation Design (30)