Tải bản đầy đủ (.ppt) (60 trang)

3-Analysis and Design Overview

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (532.36 KB, 60 trang )

<span class='text_page_counter'>(1)</span><div class='page_container' data-page=1></div>
<span class='text_page_counter'>(2)</span><div class='page_container' data-page=2>

<b>Objectives</b>



 <b>Review the key Analysis and Design terms and </b>


<b>concepts</b>


 <b>Introduce the Analysis and Design process, </b>


<b>including roles, artifacts and workflow</b>


 <b>Explain the difference between Analysis and </b>


<b>Design</b>


</div>
<span class='text_page_counter'>(3)</span><div class='page_container' data-page=3>

<b>Analysis and Design in Context </b>



<b>The purposes of Analysis and </b>
<b>Design are to:</b>


 <b><sub>Transform the requirements </sub></b>


<b>into a design of the </b>
<b>system-to-be. </b>


 <b><sub>Evolve a robust architecture </sub></b>


<b>for the system. </b>


 <b><sub>Adapt the design to match </sub></b>


<b>the implementation </b>



<b>environment, designing it for </b>
<b>performance.</b>


<b>The purposes of Analysis and </b>
<b>Design are to:</b>


 <b><sub>Transform the requirements </sub></b>


<b>into a design of the </b>
<b>system-to-be. </b>


 <b><sub>Evolve a robust architecture </sub></b>


<b>for the system. </b>


 <b><sub>Adapt the design to match </sub></b>


<b>the implementation </b>


</div>
<span class='text_page_counter'>(4)</span><div class='page_container' data-page=4>

<b>Analysis and Design Overview</b>



4


Supplementary
Specification


Use-Case Model Design Model


Data Model



Architecture
Document


<i>Analysis and </i>
<i>Design</i>


</div>
<span class='text_page_counter'>(5)</span><div class='page_container' data-page=5>

<b>Analysis Versus Design</b>



<b>Analysis</b> <b>Design</b>


 Focus on understanding


the problem


 Idealized design
 Behavior


 System structure


 Functional requirements
 A small model


 Focus on understanding


the solution


 Operations and


attributes



 Performance


 Close to real code
 Object lifecycles
 Nonfunctional


requirements


 A large model


WHAT?



</div>
<span class='text_page_counter'>(6)</span><div class='page_container' data-page=6>

<b>Analysis and Design Are Not Top-Down </b>


<b>or Bottom-Up</b>



6


<b>Bottom</b>
<b>Up</b>
<b>Top</b>
<b>Down</b>


Design Classes
Subsystems


Use Cases Analysis Classes


(Define a
middle level)



</div>
<span class='text_page_counter'>(7)</span><div class='page_container' data-page=7>

<b>What Is Architecture?</b>



 <b>Software architecture encompasses a set of </b>


<b>significant decisions about the organization of </b>
<b>a software system.</b>


 Selection of the structural elements and their


interfaces by which a system is composed


 Behavior as specified in collaborations among those


elements


 Composition of these structural and behavioral


elements into larger subsystems


 Architectural style that guides this organization


<i><b>Grady Booch, Philippe Kruchten, Rich Reitman, Kurt Bittner;</b></i>


</div>
<span class='text_page_counter'>(8)</span><div class='page_container' data-page=8>

<b>Architecture Constrains Design and </b>


<b>Implementation </b>



 <b>Architecture involves a set of strategic design </b>


<b>decisions, rules or patterns that constrain </b>


<b>design and construction. </b>


8


<i><b>Architecture decisions are the most fundamental decisions, </b></i>
<i><b>and changing them will have significant effects. </b></i>


<b>Architecture</b>
<b>Design</b>


</div>
<span class='text_page_counter'>(9)</span><div class='page_container' data-page=9>

<b>Software Architecture: </b>


<b>The “4+1 View” Model</b>



<b>Process View</b> <b>Deployment View</b>


<b>Logical View</b>


<b>Use-Case View</b>


<b>Implementation View</b>


<b>End-user</b>
<i><b>Functionality</b></i>


<b>Programmers</b>
<i><b>Software management</b></i>


<i><b>Performance, scalability, throughput</b></i>


<b>System integrators</b> <i><b><sub>System topology, delivery, </sub></b></i>


<i><b>installation, communication</b></i>
<b>System engineering</b>


<b>Analysts/Designers</b>


</div>
<span class='text_page_counter'>(10)</span><div class='page_container' data-page=10>

<b>Analysis and Design Workflow</b>



10


<b>Analysis</b>


<b>Design</b>


[Early Elaboration
Iteration]


[Inception Iteration
(Optional)]


Define a Candidate


Architecture ArchitecturalPerform
Synthesis


Analyze Behavior


Refine the
Architecture


Design



</div>
<span class='text_page_counter'>(11)</span><div class='page_container' data-page=11>

<b>Analysis and Design Activity Overview</b>



<i><b>Architect</b></i>


</div>
<span class='text_page_counter'>(12)</span><div class='page_container' data-page=12>

<b>Software Architect’s Responsibilities</b>



 <b>The Software </b>


</div>
<span class='text_page_counter'>(13)</span><div class='page_container' data-page=13>

<b>Designer’s Responsibilities</b>



 <b>The designer must </b>


<b>know use-case </b>
<b>modeling </b>


<b>techniques, system </b>
<b>requirements, and </b>
<b>software design </b>


<b>techniques.</b>


<b>Designer</b> <sub>Realization</sub>Use-Case


</div>
<span class='text_page_counter'>(14)</span><div class='page_container' data-page=14>

<b>Analysis and Design Is Use-Case Driven</b>



 <b>Use cases defined for a system are the basis </b>


<b>for the entire development process.</b>



 <b>Benefits of use cases:</b>


 Concise, simple, and understandable by a wide range


of stakeholders.


 Help synchronize the content of different models.


14


<b>Withdraw </b>
<b>Money</b>
<b>Check </b>
<b>Balance</b>


</div>
<span class='text_page_counter'>(15)</span><div class='page_container' data-page=15>

<b>What Is a Use-Case Realization?</b>



<b>Use-Case Model</b> <b>Design Model</b>


Use Case Use-Case Realization


Class Diagrams
Use Case


Communication
Diagrams
Sequence


</div>
<span class='text_page_counter'>(16)</span><div class='page_container' data-page=16>

<b>Analysis and Design </b>




<b>in an Iterative Process</b>



16


Iteration n Iteration n + 1


Use Case A
Scenarios 1 & 2


Use-Case
Realization A
Start of iteration


End of iteration


Use Case B
Scenario 1


Use-Case
Realization A


Use Case A
Scenario 3


</div>
<span class='text_page_counter'>(17)</span><div class='page_container' data-page=17>

<b>Review</b>



 <b>What is the purpose of the Analysis and </b>


<b>Design Discipline?</b>



 <b>What are the input and output artifacts?</b>


 <b>Name and briefly describe the 4+1 Views of </b>


<b>Architecture.</b>


 <b>What is the difference between Analysis and </b>


<b>Design?</b>


</div>
<span class='text_page_counter'>(18)</span><div class='page_container' data-page=18>

<b>Architectural Analysis</b>



</div>
<span class='text_page_counter'>(19)</span><div class='page_container' data-page=19>

<b>Objectives: Architectural Analysis</b>



 <b>Explain the purpose of Architectural Analysis </b>


<b>and where it is performed in the lifecycle.</b>


 <b>Describe a representative architectural </b>


<b>pattern and set of analysis mechanisms, and </b>
<b>how they affect the architecture.</b>


 <b>Describe the rationale and considerations </b>


<b>that support the architectural decisions.</b>


 <b>Show how to read and interpret the results of </b>


<b>Architectural Analysis:</b>



 Architectural layers and their relationships
 Key abstractions


</div>
<span class='text_page_counter'>(20)</span><div class='page_container' data-page=20>

<b>Architectural Analysis in Context</b>



20


[Early
Elaboration


Iteration] Iteration (Optional)][Inception


Define a Candidate


Architecture ArchitecturalPerform
Synthesis


Analyze Behavior


Refine the
Architecture


Design


Components Design theDatabase
(Optional)


Architecture
Analysis



</div>
<span class='text_page_counter'>(21)</span><div class='page_container' data-page=21>

<b>Architectural Analysis Overview</b>



Supplementary
Specification


Glossary


Use-Case Model


<b>Architectural</b>
<b>Analysis</b>


Design Model
Reference


Architecture


Deployment Model


Vision
Document
Software


Architecture Doc


</div>
<span class='text_page_counter'>(22)</span><div class='page_container' data-page=22>

<b>Architectural Analysis Steps</b>



 <b>Key Concepts</b>



 <b>Define the High-Level Organization of the </b>


<b>model</b>


 <b>Identify Analysis mechanisms</b>
 <b>Identify Key Abstractions</b>


 <b>Create Use-Case Realizations</b>
 <b>Checkpoints</b>


</div>
<span class='text_page_counter'>(23)</span><div class='page_container' data-page=23>

<b>The “4+1 View” Model</b>



<b>Process View</b> <b>Deployment View</b>


<b>Logical View</b>


<b>Use-Case View</b>


<b>Implementation View</b>


<b>End-user</b>
<i><b>Functionality</b></i>


<b>Programmers</b>
<i><b>Software management</b></i>


<i><b>Performance, scalability, throughput</b></i>


<b>System integrators</b> <i><b><sub>System topology, delivery, </sub></b></i>
<i><b>installation, communication</b></i>



<b>System engineering</b>


<b>Analysts/Designers</b>


</div>
<span class='text_page_counter'>(24)</span><div class='page_container' data-page=24>

<b>Review: What Is a Package?</b>



 <b>A package is a general-purpose </b>


<b>mechanism for organizing </b>
<b>elements into groups.</b>


 <b>It is a model element that can </b>


<b>contain other model elements.</b>


 <b>A package can be used</b>


 To organize the model under


development.


 As a unit of configuration


management.


24


</div>
<span class='text_page_counter'>(25)</span><div class='page_container' data-page=25>

<b>Package Relationships: Dependency</b>




 <b>Packages can be related to one another using a </b>


<b>dependency relationship.</b>


 <b>Dependency Implications</b>


 Changes to the Supplier package may affect the Client


package.


 The Client package cannot be reused independently


because it depends on the Supplier package.


Client Package Supplier


Package


</div>
<span class='text_page_counter'>(26)</span><div class='page_container' data-page=26>

<i><b>Hierarchy </b></i>
<i><b>should be </b></i>
<i><b>acyclic</b></i>


Circular dependencies make it impossible
to reuse one package


without the other.


<b>Avoiding Circular Dependencies</b>


A



B


C


A'
C


A


B


A


</div>
<span class='text_page_counter'>(27)</span><div class='page_container' data-page=27>

<b>Architectural Analysis Steps</b>



 <b>Key Concepts</b>


 <b>Define the High-Level Organization of the </b>


<b>model</b>


 <b>Identify Analysis mechanisms</b>
 <b>Identify Key Abstractions</b>


</div>
<span class='text_page_counter'>(28)</span><div class='page_container' data-page=28>

<b>Patterns and Frameworks</b>



 <b>Pattern</b>


 Provides a common solution to a common problem in



a context


 <b>Analysis/Design pattern</b>


 Provides a solution to a narrowly-scoped technical


problem


 Provides a fragment of a solution, or a piece of the


puzzle


 <b>Framework</b>


 Defines the general approach to solving the problem
 Provides a skeletal solution, whose


details may be Analysis/Design patterns


</div>
<span class='text_page_counter'>(29)</span><div class='page_container' data-page=29>

<b>What Is a Design Pattern?</b>



 <b>A design pattern is a solution to a common design </b>


<b>problem.</b>


 Describes a common design problem
 Describes the solution to the problem


 Discusses the results and trade-offs of applying the



pattern


 <b>Design patterns provide the capability to reuse </b>


<b>successful designs. </b>


<i>Structural Aspect</i> <i>Behavioral Aspect</i>


<i>Parameterized</i>
<i>Collaboration</i>


Pattern Name


</div>
<span class='text_page_counter'>(30)</span><div class='page_container' data-page=30>

<b>What Is an Architectural Pattern?</b>



 <b>An architectural pattern expresses a </b>


<b>fundamental structural organization schema for </b>
<b>software systems. It provides a set of predefined </b>
<b>subsystems, specifies their responsibilities, and </b>
<b>includes rules and guidelines for organizing the </b>
<b>relationships between them – Buschman et al, </b>
<b>“</b><i><b>Pattern-Oriented Software Architecture — A </b></i>
<i><b>System of Patterns</b></i><b>”</b>


 Layers


 Model-view-controller (M-V-C)
 Pipes and filters



 Blackboard


</div>
<span class='text_page_counter'>(31)</span><div class='page_container' data-page=31>

<b>Typical Layering Approach</b>



<b>General </b>
<b>functionality</b>


<b>Specific </b>


<b>functionality</b> <sub>Distinct application subsystems that make up </sub>


an application — contains the value adding
software developed by the organization.


Business specific — contains a number of
reusable subsystems specific to the type of
business.


Middleware — offers subsystems for utility
classes and platform-independent services for
distributed object computing in heterogeneous
environments and so on.


System software — contains the software for
the actual infrastructure such as operating
systems, interfaces to specific hardware,
device drivers, and so on.


</div>
<span class='text_page_counter'>(32)</span><div class='page_container' data-page=32>

<b>Example: Layers</b>


32

<b>Application</b>
<b>Presentation</b>
<b>Session</b>
<b>Transport</b>
<b>Network</b>
<b>Data Link</b>
<b>Physical</b>
<b>Layer 7</b>
<b>Layer 6</b>
<b>Layer 5</b>
<b>Layer 4</b>
<b>Layer 3</b>
<b>Layer 2</b>
<b>Layer 1</b>


<b>Provides miscellaneous protocols for common activities</b>
<b>Structure information and attaches semantics</b>


<b>Provides dialog control and synchronization facilities</b>
<b>Breaks messages into packets and guarantees delivery</b>
<b>Selects a route from send to receiver</b>


<b>Detects and corrects errors in bit sequences</b>


</div>
<span class='text_page_counter'>(33)</span><div class='page_container' data-page=33>

<b>Layering Considerations</b>



 <b>Level of abstraction</b>


 Group elements at the same level of abstraction



 <b>Separation of concerns</b>


 Group like things together
 Separate disparate things


 Application vs. domain model elements


 <b>Resiliency </b>


 Loose coupling


 Concentrate on encapsulating change


 User interface, business rules, and retained data tend to have


</div>
<span class='text_page_counter'>(34)</span><div class='page_container' data-page=34>

<b>Modeling Architectural Layers</b>



 <b>Architectural layers can be modeled using </b>


<b>stereotyped packages.</b>


 <b><<layer>> stereotype</b>


34


Package Name


</div>
<span class='text_page_counter'>(35)</span><div class='page_container' data-page=35>

<b>What Are Stereotypes?</b>



 <b>Stereotypes define a new model element </b>



<b>in terms of another model element.</b>


 <b>Sometimes you need to introduce new </b>


<b>things that speak the language of your </b>
<b>domain and look like primitive building </b>
<b>blocks.</b>


Class


</div>
<span class='text_page_counter'>(36)</span><div class='page_container' data-page=36>

<b>High-Level Organization of the Model</b>



36


Application


<<layer>>


Business Services


</div>
<span class='text_page_counter'>(37)</span><div class='page_container' data-page=37>

<b>Architectural Analysis Steps</b>



 <b>Key Concepts</b>


 <b>Define the High-Level Organization of the </b>


<b>model</b>


 <b>Identify Analysis mechanisms</b>



 <b>Identify Key Abstractions</b>


</div>
<span class='text_page_counter'>(38)</span><div class='page_container' data-page=38>

<b>What Are Architectural Mechanisms?</b>



38


<b>Required </b>
<b>Functionality</b>


<b>Implementation </b>
<b>Environment</b>


<b>Architect</b>
Supplementary


Specification


Use-Case Model


<i><b>Mechanisms</b></i> <b>COTS ProductsDatabases</b>


<b>IPC Technology, etc.</b>


“realized by client
classes using”


“responsible for”


</div>
<span class='text_page_counter'>(39)</span><div class='page_container' data-page=39>

<b>Architectural Mechanisms: Three Categories</b>



 <b>Architectural Mechanism Categories</b>


 Analysis mechanisms (conceptual)
 Design mechanisms (concrete)


</div>
<span class='text_page_counter'>(40)</span><div class='page_container' data-page=40>

<b>Why Use Analysis Mechanisms?</b>



40


Oh no! I found a group of classes that
has persistent data. How am I


supposed to design these things if I
don’t even know what database we are
going to be using?


That is why we have a persistence
analysis mechanism. We don’t
know enough yet, so we can
bookmark it and come back to it
later.


Analysis mechanisms are used during analysis to reduce the


</div>
<span class='text_page_counter'>(41)</span><div class='page_container' data-page=41>

<b>Sample Analysis Mechanisms</b>



 <b>Persistency</b>


 <b>Communication (IPC and RPC)</b>


 <b>Message routing </b>


 <b>Distribution</b>


 <b>Transaction management </b>


 <b>Process control and synchronization (resource </b>


<b>contention)</b>


 <b>Information exchange, format conversion</b>
 <b>Security </b>


 <b>Error detection / handling / reporting</b>
 <b>Redundancy </b>


</div>
<span class='text_page_counter'>(42)</span><div class='page_container' data-page=42>

<b>Examples of Analysis Mechanism Characteristics</b>


 <b>Persistency mechanism</b>


 Granularity
 Volume


 Duration


 Access mechanism


 Access frequency (creation/deletion, update, read)
 Reliability



 <b>Inter-process Communication mechanism</b>


 Latency


 Synchronicity
 Message size
 Protocol


</div>
<span class='text_page_counter'>(43)</span><div class='page_container' data-page=43>

<b>Example: Analysis Mechanism Characteristics</b>


 <b>Legacy interface mechanism</b>


 Latency
 Duration


 Access mechanism
 Access frequency


 <b>Security mechanism</b>


 Data granularity
 User granularity
 Security rules
 Privilege types


</div>
<span class='text_page_counter'>(44)</span><div class='page_container' data-page=44>

<b>Describing Analysis Mechanisms</b>



 <b>Collect all analysis </b>


<b>mechanisms in a list</b>



 <b>Draw a map of classes to </b>


<b>analysis mechanisms</b>


 <b>Identify characteristics </b>


<b>of analysis mechanisms</b>


 <b>Model using </b>


</div>
<span class='text_page_counter'>(45)</span><div class='page_container' data-page=45>

<b>Example: Course Registration Analysis </b>


<b>Mechanisms</b>



<b>Security</b> <b>Legacy Interface</b>


</div>
<span class='text_page_counter'>(46)</span><div class='page_container' data-page=46>

<b>Architectural Analysis Steps</b>



 <b>Key Concepts</b>


 <b>Define the High-Level Organization of the </b>


<b>model</b>


 <b>Identify Analysis mechanisms</b>


 <b>Identify Key Abstractions</b>


 <b>Create Use-Case Realizations</b>
 <b>Checkpoints</b>



</div>
<span class='text_page_counter'>(47)</span><div class='page_container' data-page=47>

<b>What Are Key Abstractions?</b>



 <b>A key abstraction is a concept, normally </b>


<b>uncovered in Requirements, that the system </b>
<b>must be able to handle</b>


 <b>Sources for key abstractions </b>


 Domain knowledge
 Requirements


 Glossary


</div>
<span class='text_page_counter'>(48)</span><div class='page_container' data-page=48>

<b>Defining Key Abstractions</b>



 <b>Define analysis classes</b>


 <b>Model analysis classes and relationships on </b>


<b>class diagrams</b>


 Include a brief description of


an analysis class


 <b>Map analysis classes to </b>


<b>necessary analysis </b>


<b>mechanisms</b>


</div>
<span class='text_page_counter'>(49)</span><div class='page_container' data-page=49>

<b>Example: Key Abstractions</b>


Student
Professor


Schedule


</div>
<span class='text_page_counter'>(50)</span><div class='page_container' data-page=50>

<b>Architectural Analysis Steps</b>



 <b>Key Concepts</b>


 <b>Define the High-Level Organization of the </b>


<b>model</b>


 <b>Identify Analysis mechanisms</b>
 <b>Identify Key Abstractions</b>


 <b>Create Use-Case Realizations</b>


 <b>Checkpoints</b>


</div>
<span class='text_page_counter'>(51)</span><div class='page_container' data-page=51>

<b>What Is a Use-Case Realization?</b>



<i>Use-Case Model</i> <i>Design Model</i>


Use Case Use-Case Realization


Class Diagrams


Use Case


Communication
Diagrams
Sequence


</div>
<span class='text_page_counter'>(52)</span><div class='page_container' data-page=52>

<b>The Value of Use-Case Realizations</b>



 <b>Provides traceability from Analysis and Design </b>


<b>back to Requirements</b>


 <b>The Architect creates the Use-Case </b>


<b>Realization</b>


52


Use Case


<i>Analysis & Design</i>
<i>(Design Model)</i>
<i>Requirements</i>


<i>(Use-Case Model)</i>


</div>
<span class='text_page_counter'>(53)</span><div class='page_container' data-page=53>

<b>Architectural Analysis Steps</b>



 <b>Key Concepts</b>



 <b>Define the High-Level Organization of the </b>


<b>model</b>


 <b>Identify Analysis mechanisms</b>
 <b>Identify Key Abstractions</b>


 <b>Create Use-Case Realizations</b>


</div>
<span class='text_page_counter'>(54)</span><div class='page_container' data-page=54>

<b>Checkpoints</b>



 <b>General</b>


 Is the package partitioning and layering


done in a logically consistent way?


 Have the necessary analysis mechanisms


been identified?


 <b>Packages</b>


 Have we provided a comprehensive


picture of the services of the packages in
upper-level layers?


</div>
<span class='text_page_counter'>(55)</span><div class='page_container' data-page=55>

<b>Checkpoints (continued)</b>




 <b>Classes</b>


 Have the key entity classes and their


relationships been identified and
accurately modeled?


 Does the name of each class clearly


reflect the role it plays?


 Are the key abstractions/classes and


their relationships consistent with the
Business Model, Domain Model,


</div>
<span class='text_page_counter'>(56)</span><div class='page_container' data-page=56>

<b>Review: Architectural Analysis</b>



 <b>What is the purpose of Architectural Analysis?</b>


 <b>What is a package? </b>


 <b>What is a layered architecture? Give examples of </b>


<b>typical layers.</b>


 <b>What are analysis mechanisms? Give examples.</b>


 <b>What key abstractions are identified during </b>



<b>Architectural Analysis? Why are they identified </b>
<b>here?</b>


</div>
<span class='text_page_counter'>(57)</span><div class='page_container' data-page=57>

<b>Exercise: Architectural Analysis</b>



 <b>Given the following:</b>


 Some results from the Requirements


discipline: (Exercise Workbook: Payroll
Requirements)


 Problem statement


 Use-Case Model main diagram


 Glossary


 Some architectural decisions: (Exercise


Workbook: Payroll Architecture


Handbook, Logical View, Architectural
Analysis)


 (textually) The upper-level architectural


</div>
<span class='text_page_counter'>(58)</span><div class='page_container' data-page=58>

<b>Exercise: Architectural Analysis </b>


<b>(continued)</b>




 <b>Identify the following:</b>


 The key abstractions


</div>
<span class='text_page_counter'>(59)</span><div class='page_container' data-page=59>

<b>Exercise: Architectural Analysis </b>


<b>(continued)</b>



 <b>Produce the following:</b>


 Class diagram containing the key abstractions
 Class diagram containing the upper-level


</div>
<span class='text_page_counter'>(60)</span><div class='page_container' data-page=60>

<b>Exercise: Review</b>



 <b>Compare your key abstractions </b>


<b>with the rest of the class</b>


 Have the key concepts been


identified?


 Does the name of each class reflect


the role it plays?


 <b>Compare your class diagram </b>


<b>showing the upper-level layers</b>



 Do the package relationships support


the Payroll System architecture?


</div>

<!--links-->

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×