Establishing basing structural framework of an application - decomposition ( subsystems, modules ), interface specification and communication .
subsystems - independent components/modules of an application
modules - provide one or more services to other modules
Output - Design Document/SDD
Architecture Design Choice
Affects: performance, robustness, distributabilty and maintainability and development costs .
Application Constraints:
Performance
localize critical operations
Security
access control, layered structure
Safety
costly validation, single component for safety-related operations
Availability
include redundant components
Maintainability
self-contained components
Structure Design
Repository Design
Client-Server Design
Layered Design
Control Models
Centralized control
Hierarchic Design
Centralized Design
Event Driven
Broadcast
Interrupt driven
Repository Design Registrar Staff Professor Client Admin Client Student Database Professor Database Schedule Class Database Adv : - share large database - integrate tools w/ same data model Drbk : - performance - evolution difficult - forces the same policy on subsystems - difficult to distribute Student Client
Client/Server Design Registrar Staff Student Database Professor Database Schedule Class Database Payroll HR Adv : - distributed - scalable Drbks : -naming/registry -diff to anticipate prbls w/ add a srvr -independent data mgmt/recovery Student Client Professor Client
Hierarchic Control Design Adv : - call/return - only for sequential tasks
Centralized Design Adv : - parallel tasks - RTS System Controller Input Sensor Program Program/Data
Broadcast Design network Client A Client B Client C Client D
Interrupt Design IH 2 Proc IH 3 Proc IH 5 Proc IH 4 Proc IH 1 Proc Adv : - fast Drbks : -complex to implement/test/validate
Design Entities
Procedural design
Procedures
Modular design
Modules
Object-oriented design
Classes
Multithreded, multiprocessors, multitasking
Threads, tasks, processes
Compiler: Functional view Lexical analysis Syntax analysis Semantic analysis Build symbol table Code generation input program program symbols symbolic program syntax tree symbol table analyzed program Object code
Compiler: Object oriented view Source program Syntax tree Symbol table Analyzed program Object code
entity-relation model - basic entities and relations
structural model - components and interactions
object-oriented model - objects, relationships and interactions, classes/methods
C++/Java C++ Classes, variables, functions class myclass { int myclassvariable; public: int myclass (int); ~myclass(); void function(int i) } Java Classes, variables, methods public class myclass { int myclassvariable; myclass (int){}; void function(int i){}; }
Architecture Chart HTML GUI WML GUI SQL Database Server WAP Terminal Web Terminal JDBC HTML WML Template files ASCII
Design Document Outline
Software program overview
broad terms overview, high level discussion of the design alternatives.
goals for the architecture, problem addressed.
Subprograms and organization chart
major clusters of functionality, communication and dependencies.
Change scenarios
most likely changes in the program and how each change will be addresses.
Reuse analysis and buy vs build decisions
arguments for what will be build, bought or reused.
Approach to Standard Functional Areas
External software interfaces ( APIs )
User interface - prototype
Database organization - content, type of database
Data storage - non database data, file formats, major data structures
Project difficulty Programmer experience HIGH LOW HIGH LOW
Formal Methods
(theory, logic, algebra). Large % of the software developed use formal methods.
Formal specifications
Way of discovering specification errors and presenting the application specification in a unambiguous way -fewer errors.
Specification analysis and proof
Application verification/validation
Critical Software Applications Development
Costs of failure are high -
Properties: safety, reliability, security .
Have high validation costs.
Examples:
Air traffic control system ( Hall 1996 )
Railway signaling systems ( Dehbonei and Mejia, 1995 )
Spacecraft systems ( Easterbrook 1998 )
Medical control systems ( Jackey 1997 )
Software tool specification ( Neil 1998 )
IBM’s CICS system ( Wordsworth 1991 )
UML Overview
UML
Modeling language for specifying, visualizing, constructing and documenting software programs.
Model elements, Notation and Guidelines
Motivation
communication among project teams
tools for automation of software design/validation/production (same as component technology, visual programming)
SW Program
A set of nearly independent set of graphical diagrams
UML Graphical Diagrams
Use Case Diagram
Static Structure Diagrams
Class/Object Diagram
Behavior Diagrams
Interaction Diagrams
Sequence diagram
Statechart Diagrams
Activity Diagrams
Implementation Diagrams
Component Diagram
Deployment Diagram
Use Case Diagram
Display the user interaction with the application
Provide an external view of the application
Basis for testing
Use Case Relationships
Include - to avoid repetition of use cases
Generalization - describe a variation casually
Extend - declare extension points in the base case
Use Case Diagram Check Grade Register Classes Database Query Authorize Student Input Grades Student Professor Registrar Staff Max Credits <<include>> <<include>> <<include>> <<include>> Include Generalization Use Case
Class Diagram
Describes the type of objects and the static relationships ( associations and subtypes )
relations between instances of classes, with multiplicity (*, x, x..y | x, y N)
navigability (unidirectional/bi-directional)
Class Diagram Catalog Entry exam date : Date grade : String passed():Boolean Class subject : String professor : String gradedPNP():String 1 * * 1 If CatalogEntry.Student.isCurrent is “n” then Catalog.Entry.grade must be “N” Multiplicity: mandatory Association Generalization Class Constraint Job 0..1 Multiplicity: optional Attribute Operation Multiplicity: Many-valued Navigability Student name : String address : String ID : Long Integer isCurrent():String Graduate department: String isCurrent():String Undergraduate major: String isCurrent():String
Object/Class Diagrams
Object diagram
objects allocated at a certain point in time
Classification -relation of an object to a type
Single classification - single type, subtypes
Multiple classification - several types
Static classification - separation between types/states
Dynamic classification - change type within the subtyping structure
Object/Class Diagrams Employee name Male Female Developer QA/Test Design Job <<dynamic>> Sex {complete} Discriminator Manager Software: MGMT name = “Name” MGMT * 1 Software PM: MGMT name = “Name” QA Manager: MGMT name = “Name” Software PM: MGMT name = “Name” Engineer: Developer name = “Name” Engineer: Design name = “Name” Engineer: QA/Test name = “Name” Engineer: Developer name = “Name” Object Diagram showing instances of the above class diagram Class Diagram with Multiple and Dynamic Classification Sex: M/F Sex: M/F Sex: M/F Sex: M/F Sex: M/F Sex: M/F Sex: M/F Sex: M/F
Statechart Diagram
All possible states that a particular object can get into
How the object state changes as a result of events that reach the object
Enhancements
Superstates
Concurrent Statechart Diagrams
Statechart Diagram State C State B State A State D -describes the behavior of a model element such as an object or interaction Trigger condition A to B Trigger condition B to D Trigger condition C to A Trigger condition C to B Trigger condition B to C start self-transition transition state
Sequence Diagram
Shows a number of example objects and the messages that are passed between these objects within the use case
Time on the vertical dimension and different objects on the horizontal dimension
Also valuable for concurrent processes
Sequence Diagram Initiate request Init servlet new Gdocument(); Connect to the database servlet.setDomaine(); servletgetConnection(); HTTP request on the server TCP/IP port 80 Database call prepareStatement() executeQuerry() Response to the SQL request Database call return Read data getString(); Generate HTML output doc.p(); HTML return return(); Display WEB page Web Client Web Server Database
Activity Diagram
A state machine of the procedure itself, the states represent the performance of actions or subactivities and the transitions are triggered by the completion of the actions or subactivities
Branch - conditional behavior, a single incoming transition and multiple outgoing transitions
Merge - multiple input transitions and one single output
Fork - parallel activities, one incoming transition and several outgoing transitions
Join - multiple input transitions and one single output
(*) Dynamic concurrency
Swimlanes - for clarity
Recommended for:
analyzing a use case, understanding workflow, describing a complicated sequential algorithm, dealing with multithreaded applications
Activity Diagram Present lecture Prepare slides Turn on the projector Tune the projector [found projector] [no projector] Use blackboard Begin lecture Start Fork Join End
Component Diagram
Structure of the code
Shows various components of the application and their dependencies
Component
a physical module of the code
Dependencies
how changes to one component may cause other components to change
0 comments
Post a comment