1 Dpintroduction and Uml
1 Dpintroduction and Uml
Session objectives
Language
21/05/2012
Can be built by one person Requires Minimal modeling Simple process Simple tools
Architecting a house
Built most efficiently and timely by a team Requires Modeling Well-defined process Power tools
4
21/05/2012
Differences
o
Scale
o
o o o o
Process
Cost Schedule Skills and development teams Materials and technologies
o
o
Stakeholders
Risks
Software architecture is the fundamental organization of a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolution.
21/05/2012
Architecture defined
Another Go
Software architecture encompasses the set of significant decisions about the organization of a software system
o
o
o
Architecture defined
Few More
A collection of software and system components, connections, and constraints A collection of system stakeholders' need statements A rationale which de monstrate s that the co mponents, connections, and constraints define a sy ste m that, if i mp le mented, would sa tisfy the co llection o f sy ste m stakeholders' need statements
or structures of the system, which comprise software components, the externally visible properties of those components, and the rela tionships among them.
8
21/05/2012
the structure
Architecture definitions do not define what a component is Arc hi tec ture is not a single struc ture -- no single struc ture is the
architecture
21/05/2012
architecture
design
11
Availability
Usability
Security
Time To Market Cost and Benefits Projected life time Targeted Market Integration with Legacy System Roll back Schedule
A list of quality attributes exists in ISO/IEC 9126 -2001 Information Technology Software Product Quality
21/05/2012
13
Specific to technology and the use of this technology to structure the technical points (Tec hnology Mapping) of an
architecture
o o o
14
21/05/2012
Specific to a particular business area (or projec t) but still reliant on being a technical focal point for communica tions
between
the
domain
archi tect,
business
interests
and
development.
15
The organizing logic for a firms core business processes and IT capabilities captured in a set of principles, policies and
Concerned
with
cross
projec t/solution
and
16
21/05/2012
Evolutionary
Product line archi tec ture and components evol ve with the requirements posed by new product line members.
o
Revolutionary
Product line archi tecture and components developed to ma tch requirements of all expec ted produc t-line members
17
Stakeholders
18
21/05/2012
19
20
10
21/05/2012
Design pa tterns gained popula rity in compu ter science af ter the book Design Pa tterns: Elemen ts of Reusa ble O bjec t-Orien ted Sof tware was published in 1994 by the so-called "Gang of Four" (Gamma et al.).
In 2009 over 30 con tribu tors colla bora ted with Tho mas Erl on his book,
SOA Design Pattern s.The goal of this book was to esta blish a de facto
21
The term con tex t refers to the set of con ditions/si tua tions in which a
The term sy stem of forces refers to the set of constraints tha t occur in
11
21/05/2012
The pr imary goal is to: sof twar e i n ter ms of the softw are
Fr amew ork s ar e more physic al in nature, as they ex i st in the form of some software. Patter n descripti ons are usually independent of Bec ause framew ork s exist i n the f or m of some pr ogr ammi ng language or implementation details. sof tw are, they are implementation-specic. Patter ns are mor e generic in natur e and c an b e used Fr amew orks provide domai n-specic functionality. i n al most any kind of application. A desi gn pattern does not exi st in the f or m of a Fr amew ork s are not c omplete applic ati ons on their softw are c omponent on its ow n. It needs to b e own. Complete applicati ons c an b e built by either i mpl emented explicitly each time it is used. i nheriting the c omponents c onst directly. Patter ns pr ovi de a way to do good desi gn and ar e Desi gn patter ns may be used in the desi gn and used to hel p design frameworks. i mpl ementati on of a framew ork . In other w or ds, fr amew ork s typically emb ody sever al design 24 patterns.
12
21/05/2012
25
UML Introduction
"The Unified Modeling Language (UML) is a language for specifying, visualizing, construc ting, and documenting the
26
13
21/05/2012
UML offers 12 diagra ms towards representing an applications requirements analysis and solution design. Structure diagrams Behav ior diagrams Model m anagement diagram s
1. 2. 3. 4.
1. 2. 3. 4. 5.
Use Case diagrams 1. Packages Sequence diagrams 2. Subsy stems Activity diagrams 3. Models Collaboration diagrams Statechart diagram
27
Use Case diagrams show the various acti vi ties the users can perform on the system. (System is somet hing that performs a
function.)
28
14
21/05/2012
Inclusion: enables to reuse one use case's steps inside another use case.
29
Open account
A
Request Catalog
<< ex tend >>
C
30
15
21/05/2012
31
Class
o
o o
Attributes
Operations Relationships
Associ ati ons Generali zati on Dependency Reali zati on
Window
size: Size v isibility: boolean display() h ide()
16
21/05/2012
Class Diagram
The + symbol is used for public modifier The - symbol is used for private modifier
33
Class Diagram
Multiplicity in Relationships
Connectors have different kinds of ends such as a diamond, an arrow, and others.
The line ends depict the nature of the relationships.
o
o
o o
17
21/05/2012
Association defines the rela tionship between two or more classes in the System. These generally rela tes to the one objec t
Association
Directed Association
Reflexive Association
35
Class Diagram
Dependency relationship
36
18
21/05/2012
Generalization
In generalization rela tionship, one objec t or subtype is based on another object or super type.
Generalization
rela tionships
can
be added
to
reuse
the
attributes, opera tions, and relationships present in the super type with one or more subtypes.
38
19
21/05/2012
Class Diagram
Realization
Realization rela tionship is between two objec ts, in which one object realized the behavior that the other object specifies.
name.
39
Class Diagram
Realization
40
20
21/05/2012
Class Diagram
Aggregation
Is a rela tionship in which one objec t ac ts as a container of the other object or objects.
Basic: there is a rela tionship between objec ts but the lifecycle of both the superset and subset i s not dependent on
one another.
o
Composition: both the superset objec t and subset objec t do not have independent existence. They cannot exist without one
Class Diagram
Aggregation
42
21
21/05/2012
Class Diagram
Customer
id: long { v alue > 0 }
Order
m ay be canceled
Constraint
UML Class Diagrams
Note
43
UML Packages
Can be used to group any UML element (e.g. use case, actors, classes, components and other packages.
into a
44
22
21/05/2012
a
a.A
b.b
b.b.E b.b.D a.B
b.a.G a.C
45
UML
Exercises
46
23
21/05/2012
Sequence diagra ms are used to depic t interac tions a mong collaborating objects in terms of messages exchanged over ti me
47
Sequence Diagrams
Terminologies
48
24
21/05/2012
Sequence Diagrams
Example 1
X-Axis (objects)
m em ber: LibraryMember
borrow(book)
book:Book
:Book Copy
Object
Life Line
Sequence Diagrams
Example 2
Client
print(doc,client) enqueue(job)
Y-Axis (time)
setTaken(member)
Activation box
49
Active object
:PrintServer
:Queue
:Printer Proxy
[job] done(status)
50
25
21/05/2012
Other Diagrams
51
Summary
52
26