310 likes | 471 Views
Software Design. Definition of Design. “the process of defining the architecture, components, interfaces, and other characteristics of a system component” and “the result of [that] process.” IEEE610.12-90. Overview of Area. Design Goal.
E N D
Definition of Design “the process of defining the architecture, components, interfaces, and other characteristics of a system component” and “the result of [that] process.” IEEE610.12-90
Design Goal “There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are obviously no deficiencies. The first method is far more difficult.” C.A.R. Hoare
Three Characteristics of Good Design • Must implement all explicit and implicit requirements determined by analysis phase • Must be readable and understandable by those who code, test, and support the software • Must provide a complete picture: data, functional, and behavioral domains from an implementation perspective • McGlaughlin [MCG91]
Key Issues • Concurrency • Control/Event Handling • Component Distribution • Error/Exception Handling and Fault Tolerance • Interaction and Presentation • Data Persistence
Two Major Design Activities • Software architecture design • Software detailed component design
Architectural Design The software architecture of a program or computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships among them. Bass, Clements, and Kazman
Enabling Techniques • Abstraction • Coupling and cohesion • Decomposition and modularization • Encapsulation/Information hiding • Separation of interface and implementation • Sufficiency, completeness and primitiveness
Architectural View Points • Shows specific properties of an architecture that pertain to distinct issues of the software system • Examples of artifacts that makeup different views?
Architectural Styles • Styles are high-level organization • Distributed • Client-server, 3-tier, broker • Interactive • MVC, Presentation-Abstraction-Control • Adaptable • Reflection, micro-kernel
Low-level Architecture • Creational – builder, factory, singleton… • Structural – adapter, bridge, decorator… • Behavioral – Command, interpreter, observer…
Families and Frameworks • Family - Components common to the members of the software family are built to be reused and customized for each member • Frameworks – partially complete subsystem that can be extended by implementing specific “plug-ins”
Design Quality • Attributes of Quality • Techniques • Review • Static Analysis • Simulation and prototyping
Choosing an Architecture Marry your architecture in haste, repent at your leisure. - Barry Boehm
Choosing an Architecture A doctor can bury his mistakes, but an architect can only advise his client to plant vines. - Frank Lloyd Wright
Choosing an Architecture • Common design styles • ESB/EAI • ETL • Peer-to-peer • Object-oriented • Client-server • Central-control • Event-driven • Blackboard
Design Strategies • General strategies • Function oriented • Object-oriented • Data-structure-centered • Component-based • Other methods
Component-Level Design • What is it? • Who does it? • Why is it important? • What are the steps? • What is the work product? • How do I ensure that I’ve done it right?
Definition of Component “a modular, deployable, and replaceable part of a system that encapsulates implementation and exposes a set of interfaces.” - OMG Unified Modeling Language Specification
Component-Level Design Example Print Job Management system Read print job data Select job management function Develop job cost Build work order Send job to production Compute page cost Compute paper cost Computer production cost Check priority Pass job to production
Description • I own a car rental business and want to extend my rental business to the Internet • Currently all business is handled in face-to-face customer interactions • I would eventually like the customers to be able to do everything necessary to rent a car online and only have to pick up the keys at the rental counter
User Stories – As a customer… • I want to check for availability of a vehicle during a certain time frame to see if renting a car is an option • I want to create an account so that I can make a reservation and not have to re-enter my information on subsequent uses of the site • I want to view the cost of renting a selected vehicle for a specified duration so that I can shop around for the best price before I buy • I want to enter payment information as a deposit for the rental so I don’t have to deal with it later • I want to select from various types of vehicles so that I can make sure to get the kind of car I want or need
User Stories – As a CSR • I want to be able to search for a customers account by first and last name so that I can see view their current and historical rental information • I want to be able to edit a customer rental plans so that I can give them an upgrade, discount, or change their rental duration for them
User Stories – As the owner… • I want to see a list of the cars that are rented out and cars that are available at any given time • I want to see a report on which makes/models get rented the most so I can offer customers what they like • I want to see a report on maintenance of the vehicles so that I can know which cars breakdown the most and/or cost the most in maintenance • I want to see how much money I’m making on rentals so that I can determine my revenue