ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

24
ICONIX PROCESS FOR SOFTWARE DEVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1

Transcript of ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

Page 1: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

1

ICONIX PROCESS FOR SOFTWARE DEVELOPMENT

Hoang Huu Hanh, Hue Universityhanh-at-hueuni.edu.vn

Page 2: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

2

Architecture Follows ProcessGood organizations know what

their process is◦So that they can repeat their

successesICONIX is a “lite” version of

Rational Unified Process (RUP) and its kin◦The bigger the project, the more

formalism you need

Page 3: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

3

Roadmap

GUI Prototype

Use Cases

RobustnessDiagram

SequenceDiagram

DomainModel

ClassDiagram

Code

Page 4: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

4

How to Get From Uses Cases to Code?

Use Cases

Code

GUI Prototype

?

Page 5: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

5

Work BackwardsWe need a complete set of

classes, with accompanying attributes and methods◦So we need design-level class

diagramsBefore we have methods, we

need to allocate behavior to classes◦So we need sequence diagrams for

the use cases

Page 6: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

6

…Work BackwardsBefore we do sequence

diagrams, we need to know which objects are involved in which use cases◦Get this information from robustness

diagrams◦Which are produced by robustness

analysis◦Which is not part of the UML

standard, but is very useful

Page 7: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

7

…Work BackwardsBefore we can do robustness

analysis, we need a domain model◦Need this anyway so that we can be

sure we understand the customer’s view of the world

So now let’s work forward

Page 8: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

8

Step 1: RequirementsIdentify real-world domain

objects and the relationships between them

Prototype a GUIIdentify use casesMilestone 1: requirements review

Page 9: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

9

Step 2: AnalysisWrite use casesPerform robustness analysis

◦Identify objects used in each use case

◦Update domain modelMilestone 2: preliminary design

review

Page 10: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

10

Step 3: DesignIdentify messages sent between

objectsFinish turning domain model into

class diagram◦Add visibility, member variables, etc.◦Decide relationship types

Milestone 3: detailed design review

Page 11: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

11

Step 4: DeliveryWrite unit testsWrite codePerform integration testingMilestone 4: deployment

Page 12: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

12

Requirements Revisited

Sometimes called the "discovery" phase◦Discover what the

customer wants◦Discover how the

system wants to be built

Goal is to build a coherent vocabulary

GUI Prototype

Use Cases

DomainModel

Page 13: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

13

Grammatical DiscoverySimplest way to get started is

grammatical discovery◦Interview customer (or read email

archive)◦Nouns become objects, verbs

become methodsDon't spend too much time in

this phase◦Even on a large project, a few days is

plenty of time to evolve a problem-specific language that you can use for the rest of the work

Page 14: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

14

What To Look ForDuplicate termsWhich objects interact directly

with whichWhich objects generalize whichWhich objects "own" or "contain"

which◦Worry about multiplicity later◦But make a note if a relationship has

properties

Page 15: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

15

Domain Modeling ErrorsDon't assign multiplicities earlyDont' try to do use cases, domain

modeling, and GUI prototyping independently

Don't worry about using generics, relational database tables, etc., at this stage

Don't try to impose design patterns

Page 16: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

16

Analysis Revisited

Bridge between analysis and design

What does each thing actually do?

Use Cases

RobustnessDiagram

SequenceDiagram

DomainModel

Page 17: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

17

Purpose of Robustness AnalysisSanity check on use casesCompleteness check: are all

alternative cases accounted for?Ongoing discovery of objectsPreliminary design

Page 18: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

18

Three Types of ObjectsBoundary objects are things

that actors (e.g., users) interact with◦Windows, dialogs, etc.

Entity objects are long-lived data◦Typically mapped to database tables

Control objects contain the application's intelligence

Yes, this is Model-View-Controller…

Page 19: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

19

Drawing Robustness Diagrams

Boundary object

Entity object

Control object

Allowed

Not Allowed

Page 20: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

20

Interaction AnalysisRobustness analysis told us

which objects talk to whichInteraction analysis tells us what

they sayTranslate use cases into

sequence diagrams◦Translation can't be done directly if

we don't know what objects we have

Page 21: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

21

Sequence Diagram FormatEach sequence diagram should

contain:◦The text of the use case◦Objects (use the robustness diagram

icons)◦Messages (arrows between lifelines)◦Method names (labels on arrows)

Advanced tools can produce these semi-automatically

Page 22: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

22

How To Tell If It's RightDoes it meet the first lecture's

criteria?◦Single Responsibility Principle◦Liskov Substitution Principle◦Law of Demeter

This is the time to use collaboration diagrams and state diagrams◦If you're going to use them at all…

Page 23: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

23

Classes and CodeAfter all this, the final

design and coding are straightforward

SequenceDiagram

DomainModel

ClassDiagram

Code

Page 24: ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.

24

Thank you!…