Supplementary Information on Analysis Modeling Taken from: Use Case Driven Object Modeling with UML...

25
Supplementary Supplementary Information on Information on Analysis Modeling Analysis Modeling Taken from: Taken from: Use Case Driven Object Modeling Use Case Driven Object Modeling with UML – A Practical Approach with UML – A Practical Approach by by Doug Rosenberg Doug Rosenberg Much of these materials is taken Much of these materials is taken word by word or paraphrased. This word by word or paraphrased. This is a good book to have in your is a good book to have in your library on OOSE! library on OOSE!
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of Supplementary Information on Analysis Modeling Taken from: Use Case Driven Object Modeling with UML...

Supplementary Information Supplementary Information on Analysis Modelingon Analysis Modeling

Taken from:Taken from:Use Case Driven Object Modeling with UML – A Use Case Driven Object Modeling with UML – A

Practical ApproachPractical Approach by Doug Rosenberg by Doug RosenbergMuch of these materials is taken word by word or Much of these materials is taken word by word or paraphrased. This is a good book to have in your paraphrased. This is a good book to have in your

library on OOSE!library on OOSE!

NotesNotes

Please note that the contents of this set of Please note that the contents of this set of slides has essentially been covered already.slides has essentially been covered already.

HOWEVER, some of the material is presented HOWEVER, some of the material is presented a bit differently.a bit differently.

This is CERTAINLY worthwhile to read and This is CERTAINLY worthwhile to read and study these slides, as in a few cases, they study these slides, as in a few cases, they present material that may be clearer than present material that may be clearer than previous slides.previous slides.

1. Introduction to Robust Analysis1. Introduction to Robust Analysis

Comes from analyzing the narrative text of each use Comes from analyzing the narrative text of each use case and identifying a first-guess set of objects that case and identifying a first-guess set of objects that participate in the Use Cases, and then classifying participate in the Use Cases, and then classifying them as one of three types of objects:them as one of three types of objects: Boundary Objects – which actors use in communicating Boundary Objects – which actors use in communicating

with the systemwith the system Entity Objects – which are usually objects from the domain Entity Objects – which are usually objects from the domain

modelmodel Control Objects – which serve as the glue between Control Objects – which serve as the glue between

boundary objects and control objects.boundary objects and control objects.

Introduction – continuedIntroduction – continued

Used to call boundary objects – interface objects, Used to call boundary objects – interface objects, but conflicts with Java and COM…but conflicts with Java and COM…

Analysis modeling is Analysis modeling is critical linkcritical link between the between the what (use cases) and the how (interaction diagrams)what (use cases) and the how (interaction diagrams) Not considered a part of UML – properNot considered a part of UML – proper Will use stereotypes to define these objects – as they Will use stereotypes to define these objects – as they

behave in ways that UML doesn’t formally define.behave in ways that UML doesn’t formally define. Many do not use this type of (what some call) Many do not use this type of (what some call)

Preliminary Design. But it is so critical.Preliminary Design. But it is so critical.

2. Key Roles in Robust Analysis2. Key Roles in Robust Analysis

Sanity CheckSanity Check – helps to ensure your use case text is – helps to ensure your use case text is correct and that you have not specified behavior that correct and that you have not specified behavior that are unreasonable or impossible.are unreasonable or impossible.

Completeness CheckCompleteness Check – helps to ensure that your use – helps to ensure that your use cases address ALL the necessary alternate courses of cases address ALL the necessary alternate courses of action.action.

Ongoing Discovery of ObjectsOngoing Discovery of Objects – You may have – You may have missed some during domain modeling.missed some during domain modeling.

Preliminary DesignPreliminary Design – first step in bridging gap – first step in bridging gap between analysis and design.between analysis and design.

2A. Sanity Check2A. Sanity Check

Replace generic nouns in use case text with Replace generic nouns in use case text with proper names of objects that appear in your proper names of objects that appear in your analysis diagram.analysis diagram.

Can be done in parallel with writing Use Case Can be done in parallel with writing Use Case text.text.

2B. Completeness Check2B. Completeness Check Iterating through your use cases helps produce use case Iterating through your use cases helps produce use case

text that adheres to well-defined guidelines, such as text that adheres to well-defined guidelines, such as that actors should be connected ONLY to boundary that actors should be connected ONLY to boundary objects.objects.

Can refer to GUI objects (common form of boundary Can refer to GUI objects (common form of boundary objects) by name and describe how the actors use each objects) by name and describe how the actors use each element.element. Can lead to identification of various windows or screens Can lead to identification of various windows or screens

‘by name’ – useful for later activities.‘by name’ – useful for later activities. Will greatly assist in creation of Sequence DiagramsWill greatly assist in creation of Sequence Diagrams!!!! Skipping this step makes you run the risk of not Skipping this step makes you run the risk of not

discovering all the objects you may need!discovering all the objects you may need!

2B. Completeness Check2B. Completeness Check

Control objects occasionally end up as objects in the Control objects occasionally end up as objects in the static model, but more often, you may end up static model, but more often, you may end up converting them into converting them into operationsoperations on entity objects on entity objects and/or boundary objects. and/or boundary objects.

This means that you can use your sequence diagrams This means that you can use your sequence diagrams to get the designers to get the designers focused on doing a very clean focused on doing a very clean allocation of behaviorallocation of behavior (deciding which methods (deciding which methods belong to which objects). belong to which objects).

Key here is to Key here is to identifyidentify these behaviors as part of this these behaviors as part of this analysis. (use case analysis, robust analysis, analysis. (use case analysis, robust analysis, preliminary design, or whatever you wish to term it). preliminary design, or whatever you wish to term it).

2C. Object Identification 2C. Object Identification Identify the correct ‘names’ for objects.Identify the correct ‘names’ for objects. Heuristic: use the names from domain model for Heuristic: use the names from domain model for

your entity objects.your entity objects. Build an ‘object glossary’Build an ‘object glossary’

First look in the domain modelFirst look in the domain model May identify missing objects in our domain model.May identify missing objects in our domain model. Continuous refinement of Domain Model!Continuous refinement of Domain Model!

Very helpful to have a near complete set of entity Very helpful to have a near complete set of entity objects (domain classes) before the first sequence objects (domain classes) before the first sequence diagram is developed, because allocating behaviors diagram is developed, because allocating behaviors across an incomplete set of objects is likely to be across an incomplete set of objects is likely to be messy (that is, more rework and more rework …messy (that is, more rework and more rework …translates into missed schedules….)translates into missed schedules….)

2D. Preliminary Design2D. Preliminary Design Sequence Diagrams Sequence Diagrams capturecapture the the dynamicsdynamics of of

communicating objects (with responsibilities) that communicating objects (with responsibilities) that shows the ‘how’ (implementation) of your application shows the ‘how’ (implementation) of your application – just above the coding activity.– just above the coding activity.

Spending time on these analysis diagrams is a useful Spending time on these analysis diagrams is a useful investment of time – but not too much time...investment of time – but not too much time...

“ “Looking down the road at partitioning, the Looking down the road at partitioning, the Boundary-Entity-ControlBoundary-Entity-Control trio maps well to the trio maps well to the Model-View-ControllerModel-View-Controller construct that comes from construct that comes from Smalltalk, and it also lends itself handsomely to Smalltalk, and it also lends itself handsomely to traditional client/server implementation in the form of traditional client/server implementation in the form of GUI-Repository-LogicGUI-Repository-Logic.”.”

WarningWarning

It is likely that some of the work products of this It is likely that some of the work products of this analysis will be thrown away later…analysis will be thrown away later…

This concept of a This concept of a throwawaythrowaway artifact is useful in artifact is useful in connection with preliminary design; not useful when connection with preliminary design; not useful when it comes to detail design.it comes to detail design.

Sequence Diagrams (and collaboration diagrams) are Sequence Diagrams (and collaboration diagrams) are examples of detail design). examples of detail design).

Don’tDon’t try to do detail design on these analysis model try to do detail design on these analysis model diagrams. Merely identify objects, attributes, and diagrams. Merely identify objects, attributes, and general responsibilities…. Detail design will address general responsibilities…. Detail design will address details such as parameters….loops, etc.details such as parameters….loops, etc.

3. Most About Analysis Object Types3. Most About Analysis Object Types

Boundary ObjectsBoundary Objects – objects in the new system – objects in the new system with which the actors (users) will be interacting.with which the actors (users) will be interacting. Usually screens, windows, dialogs, and menusUsually screens, windows, dialogs, and menus

The PROTOTYPE will provide many of your The PROTOTYPE will provide many of your primary boundary objects…primary boundary objects…

Validation with boundary objects – includes any Validation with boundary objects – includes any kind of initial checking….kind of initial checking….

For NOW, these should take the form of Control For NOW, these should take the form of Control Objects associated with the Boundary Objects.Objects associated with the Boundary Objects.

3. Most About Analysis Object Types3. Most About Analysis Object Types

Some boundary objects are needed in addressing Some boundary objects are needed in addressing alternate courses of actions within use cases, such as alternate courses of actions within use cases, such as warnings or error dialog boxes that might appear warnings or error dialog boxes that might appear separate from entry window…separate from entry window…

Initially, start with a single boundary class that Initially, start with a single boundary class that serves as a serves as a placeholder for the interfaceplaceholder for the interface. You may . You may likely have more boundary classes constituting the likely have more boundary classes constituting the interface or reverse engineer some existing GUI. For interface or reverse engineer some existing GUI. For now, a now, a single boundary classsingle boundary class is a placeholder… is a placeholder…

CHECK AGAIN: DO YOU HAVE all the required CHECK AGAIN: DO YOU HAVE all the required behaviors identified? behaviors identified?

3. Most About Analysis Object Types3. Most About Analysis Object Types

Entity ObjectsEntity Objects – often map to database tables – often map to database tables and files that outlive the use case execution.and files that outlive the use case execution.

Many entity objects first come from Domain Many entity objects first come from Domain Model.Model.

Kind of like ‘dumb servers’ – store, fetch, and Kind of like ‘dumb servers’ – store, fetch, and perform fundamental kinds of computations. perform fundamental kinds of computations. Then, after ensuring persistency, they go Then, after ensuring persistency, they go away.away.

3. Most About Analysis Object Types3. Most About Analysis Object Types

Control ObjectsControl Objects – ‘controllers’ embody much of the – ‘controllers’ embody much of the application’s ‘logic.’.application’s ‘logic.’.

Serve to connect the users and stored data.Serve to connect the users and stored data. Here is where we capture business rules and policies.Here is where we capture business rules and policies. Can thus localize change w/o changing the user interface or Can thus localize change w/o changing the user interface or

database schema down the line.database schema down the line. Unlike boundary and entity objects, Unlike boundary and entity objects, control objects are not meant control objects are not meant

to ‘endure’ as stand alone classes.to ‘endure’ as stand alone classes. Likely that control classes will convert into Likely that control classes will convert into methodsmethods associated associated

with interface objects or entity objects.with interface objects or entity objects. Control objects serve as placeholders to ensure you don’t Control objects serve as placeholders to ensure you don’t

missmiss any functionality and system behavior required by the any functionality and system behavior required by the user cases.user cases.

4. Developing the Analysis4. Developing the Analysis

Should normally have between two and five Should normally have between two and five controllers per average use case.controllers per average use case. If you have one controller, you likely have too many small If you have one controller, you likely have too many small

use cases; too many? Split up.use cases; too many? Split up. NOTE: Arrows connecting these analysis objects do NOTE: Arrows connecting these analysis objects do

NOT represent software messages; rather, they imply NOT represent software messages; rather, they imply logical associations.logical associations.

Note also, we will NOT code from these. So Note also, we will NOT code from these. So focus is on logical flow of the use case. focus is on logical flow of the use case.

Sequence diagrams will address the dynamics…Sequence diagrams will address the dynamics…

4. Developing the Analysis4. Developing the Analysis Capturing the Essence of Analysis Modeling:Capturing the Essence of Analysis Modeling:

Actors can talk only to boundary objectsActors can talk only to boundary objects Boundary objects can talk only to controllers and actorsBoundary objects can talk only to controllers and actors Entity objects can also talk only to controllers (and other Entity objects can also talk only to controllers (and other

entity objects)entity objects) Controllers can talk to both boundary objects and Controllers can talk to both boundary objects and

controllers, but not to actors.controllers, but not to actors. Recognize that Use Cases (and prototypes) are our Recognize that Use Cases (and prototypes) are our

best source for boundary objectsbest source for boundary objects. The text is a rich . The text is a rich source of Entity objects, which we will associate with source of Entity objects, which we will associate with our Domain Model (and update it too).our Domain Model (and update it too).

We will also be able to identify some controllers…We will also be able to identify some controllers…

4. Developing the Analysis Model4. Developing the Analysis Model

Very LikelyVery Likely that in going through the Use Case that in going through the Use Case text, you will identify other boundary objects and text, you will identify other boundary objects and some additional controls needed. May also very some additional controls needed. May also very likely identify additional entity objects, such as lists, likely identify additional entity objects, such as lists, tables, etc. tables, etc.

Very LikelyVery Likely may become may become attributesattributes later and later and control objects identified here for expediency may control objects identified here for expediency may become become methodsmethods later…. later….

Very EssentialVery Essential that you that you rewriterewrite the Use Case the Use Case afterafter identifying these additional entity objects!!! identifying these additional entity objects!!!

4. Developing the Analysis Model4. Developing the Analysis Model Strongly urgeStrongly urge a robust Peer Review take place to a robust Peer Review take place to

review ALL your Use Cases and the analysis review ALL your Use Cases and the analysis diagrams. Each reviewer should be able to do the diagrams. Each reviewer should be able to do the following for each use case:following for each use case: 1. Read the Course of Action1. Read the Course of Action 2. Trace his/her finger along the associations on the 2. Trace his/her finger along the associations on the

analysis modelanalysis model 3. See the clear match between text and diagram!3. See the clear match between text and diagram!

We are NOT DONE with writing a Use Case until We are NOT DONE with writing a Use Case until you can pass this simple test!!!!you can pass this simple test!!!!

When we have reached this point for the entire set When we have reached this point for the entire set of use cases, the next step – developing the Sequence of use cases, the next step – developing the Sequence Diagrams – will be much easier than if you started Diagrams – will be much easier than if you started from Use Cases alone!from Use Cases alone!

5. Updating the Domain (Static) Model5. Updating the Domain (Static) Model

MUST update the Domain Model prior to MUST update the Domain Model prior to moving onto detail design.moving onto detail design.

Recall: We are continuously refining the static Recall: We are continuously refining the static model (domain model).model (domain model).

New objects were likely discovered while New objects were likely discovered while developing the analysis class diagrams. developing the analysis class diagrams. Add these to the domain model Add these to the domain model NOWNOW not later. not later.

Also, you may add some key attributes to the Also, you may add some key attributes to the more significant classes in this model too.more significant classes in this model too.

5. Updating the Domain (Static) Model5. Updating the Domain (Static) Model

We have usually found more entity objectsWe have usually found more entity objects Add to Domain Model.Add to Domain Model.

As we introduce windows and screens – in the form As we introduce windows and screens – in the form of boundary objects – we begin to of boundary objects – we begin to trace datatrace data associated with those objects back to the entity associated with those objects back to the entity objects from which the data comes/goes.objects from which the data comes/goes.

Result: additional attributes added to classes in Result: additional attributes added to classes in domain model.domain model.

We have now itemized all the required behaviors of We have now itemized all the required behaviors of the use cases in the form of Control Objects.the use cases in the form of Control Objects. Have identified all logical functions that must occurHave identified all logical functions that must occur

Last Thoughts (1 of 2)Last Thoughts (1 of 2)

Analysis Modeling is a tool that helps us Analysis Modeling is a tool that helps us discover objects, allocate attributes, and check discover objects, allocate attributes, and check the use case text for completeness and the use case text for completeness and correctness.correctness.

It is not an ‘end’ product. It is used to GET to It is not an ‘end’ product. It is used to GET to the end. So:the end. So:

Don’t waste a lot of time perfecting the Don’t waste a lot of time perfecting the analysis diagrams….analysis diagrams….

Last Thoughts (2 of 2)Last Thoughts (2 of 2)

So, we have performed our robustness analysis. For So, we have performed our robustness analysis. For each use case we have identified a first cut of objects each use case we have identified a first cut of objects that accomplish the stated scenario. We have used that accomplish the stated scenario. We have used the stereotypes to model.the stereotypes to model.

We have updated the Domain Model class diagram to We have updated the Domain Model class diagram to reflect new objects and additional attributes as reflect new objects and additional attributes as discovered.discovered.

We are done with the Analysis Phase of the Project. We are done with the Analysis Phase of the Project. Milestone: Preliminary Design Review.Milestone: Preliminary Design Review.

Top 10 Benefits of Robustness Top 10 Benefits of Robustness Analysis (Preliminary Design)Analysis (Preliminary Design)

10. forces you to write use cases using a consistent 10. forces you to write use cases using a consistent stylestyle

9. forces you to write your use cases in correct voice9. forces you to write your use cases in correct voice 8. provides sanity and completeness checks for use 8. provides sanity and completeness checks for use

casescases 7. allows you to apply syntax rules – actors only talk 7. allows you to apply syntax rules – actors only talk

to boundary objects, ….to boundary objects, …. 6. These diagrams are quicker to draw and easier to 6. These diagrams are quicker to draw and easier to

read than sequence diagramsread than sequence diagrams Serve to ‘bridge the gap’ between Use Cases and design Serve to ‘bridge the gap’ between Use Cases and design

(Use Case Realizations) (Use Case Realizations)

Top 10 Benefits of Robustness Top 10 Benefits of Robustness AnalysisAnalysis

5. Helps to partition objects within the Model-View-5. Helps to partition objects within the Model-View-Controller paradigmController paradigm

4. helps to 4. helps to layerlayer objects in a GUI-Logic-Repository objects in a GUI-Logic-Repository framework for client/server systems.framework for client/server systems.

3. Allows a reuse pass across all your use cases 3. Allows a reuse pass across all your use cases before you begin designbefore you begin design

2. provides traceability between what the system 2. provides traceability between what the system does (use case) and how the system works (sequence does (use case) and how the system works (sequence diagrams) using a conceptual object view.diagrams) using a conceptual object view.

1. Plugs the semantic gap between analysis (use 1. Plugs the semantic gap between analysis (use cases) and design (sequence diagrams). cases) and design (sequence diagrams).