79
1 UML requirement Activity diagram- overview Use case diagram structure analysis Class diagram Behavior analysis 5.1 sequence diagram 5.2 communication diagram 5.3 statechart diagram 5.4 activity diagram Implement 5.5 component diagram 5.6 deployment diagram Acitity diagram -business flow Acitity diagram -complex use case Acitity diagram -method

structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

Embed Size (px)

Citation preview

Page 1: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

1

UMLrequirement Activity diagram- overview

Use case diagram structure analysis

Class diagramBehavior analysis

5.1 sequence diagram5.2 communication diagram5.3 statechart diagram5.4 activity diagram

Implement5.5 component diagram5.6 deployment diagram

Acitity diagram-business flow

Acitity diagram-complex use case

Acitity diagram-method

Page 2: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

2

5.4 activity diagramActivity diagrams show behavior with control structure.

Activity diagram can be used to show behaviors over many use case, model business workflows, or describe complicated method.

activity diagram มจีดุเร ิม่ตน้จดุสิน้สดุ

กจิกรรมของระบบงานactivity1

activity2

จุดเร่ิมต้น

จุดส้ินสุด

สญัลกัษณ

Page 3: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

3

เชน activity diagram แสดงเกีย่วกบัการเขียน&สงจดหมาย

Write letter

Address letter Activity state

Start state

Stop state

post letter

transition

สีฟ้าเป็นคาํอธิบาย

Page 4: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

4

ใน activity diagram มลีกัษณะ

-Swimlanes

-Decision

-Forks and joins

-Object flow

-signal

Page 5: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

5

Swimlanes : Partition

เปนการแบงกลุม activity เปนเลน เหมอืนสระวายน้าํ

แบงเปนชองในแนวดิ่ง และกาํหนดแตละชองดวยชือ่ object ไวดานบน

การแบงเปน Swimlanes ชวยใหแยกแยะผูรบัผดิชอบ แตละงานไดวา ใครควรจะเปนคนทาํงานในหมวดหมูใด

ตวัอยางเชน

Page 6: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

6

Swimlanes : Partition เพิ่ม

Page 7: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

7

Customer Sales Stockroom

pay

deliver order

collect order

request service

take order fill order

Page 8: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

8

Decisionมีทางเลอืกใหตัดสนิใจ

สญัลกัษณเชน

wakeUp

Eat Breakfast Go to Work

[hungry] [not hungry]

Real world

Page 9: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

9

get mail

open mail bin mail

else [is junk]

ตวัอยาง

Page 10: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

10

calculate total cost

get authorization

charge customer’s account

[cost < $50]

[cost >= $50]

ตวัอยาง

Page 11: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

11

get campaign bonus level

average bonus level

get next campaign

[campaign found][no more campaign]

ตวัอยาง

next

Page 12: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

12

Activity diagram for calculateBonus() operation ตย Simon p220

Find oldest campaign worked on

[no campaign]

Get campaign bonus level

Get next campaign

Average campaign bonus level

Set bonus to grad minimum

[campaign found]

[no more campaign]

[campaign found]

Page 13: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

13

Forks and joinsงานหลายงานที่มกีารทาํงานไปพรอมๆ กนัสญัลกัษณ ใชเสนตรงแนวนอนเสนหนาตวัอยาง

Work out

relaxshopping

fork

join

Page 14: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

14

ตวัอยาง activity diagram making a cup of tea

Find tea bag

[milk required]

Fill cupFill kettle with water

Place tea bag in cup

Boil water in kettle

Add water to cup

Add milk

[no milk required]real world

Page 15: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

15

Activity diagram for the manage course information use case

Page 16: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

16

ตวัอยาง

Design new product

Make product

Manufacture product

Sell product

Deliver product

Page 17: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

17Source: Fowler & Scott,UML Distilled

Receive Order

Assign Goods to item

Authorize Payment

Reorder Goods

Dispatch order

Cancel Order

*[for each line item]

[need to reorder]

[stock assigned to all items and payment authorized]

[failed][suceeded]

Page 18: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

18

ตวัอยาง activity diagram for a company assembly companymarketing manufacturing delivery

market product

sell product

deliver product

design new product

manufacture product

:Overall System

Page 19: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

19

ตัวอยาง activity diagram for กระบวนการสัง่ซือ้สินคา :Overall System

Customer Sales Warehouse

Continue work

Request product

Process order

o : Order [in progress]Pull materials

Ship order

o : Order [filled]

Received product

Receive order

close order

b : Bill [unpaid]

Bill Customer

b : Bill [paid]

Object flow -:input/output สามารถ modify สถานะของobject Object in state

Page 20: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

20

Object flowใน activity diagram -: input/output สามารถ modify สถานะของobject ตวัอยาง activity diagram ทีม่ลีกัษณะ object flow

Page 21: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

21

ตวัอยาง marketing

manufacturing delivery

Market product

Sell product

Deliver product

Design new product

Manufacture product

:ProductSpec

:Order[delivered]

:Order [paid]

object

Object flow

Object in state

มี 2 object คือ :productSpec ซึง่เปน output จาก design new product subactivity state และเปน input เขาสู manufacture product subactivity state :order ซึง่ capture payment deliver detail เพื่อ audit for selling process

Page 22: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

22

Signalแสดงการสงสญัญาณเพือ่แสดง information communicate asynchronous ระหวาง 2 objectsignal event จะเกดิเมือ่ object ไดรบั signal

Event ที่เกดิ อาจเปนไปไดวาไดรับจาก object เปน trigger state transition

สัญลักษณEvent ทีเ่ปน input

Event ที่เปน output

Signal Receipt notation also called the Accept event action in a UML Activity Diagram is an action that waits for a specific event to occur.

Signal Sending in UML Activity Diagram is an action that creates a signal instance from its inputs, and transmits it to the target object,

Create order fill order request Create invoice

Cancel request

Cancel order

Page 23: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

23

ตวัอยาง activity diagram แสดงการสงสญัญาณ เมือ่กด remote control เพื่อเปลีย่นชอง

Press channel number

Change channel

watch

watch

Change channel

Television

Signal : event input

Signal : event output

Page 24: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

24

sendSignal : create a signal instance from its inputs, and transmits it to the target object

An AcceptEventAction is an action that waits for the occurrence of an event meeting specified conditions.

Page 25: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

25

events like user input or a model event that leads to an UI update

Page 26: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

26

Activity diagram : mailOrderCompany

ตวัอยา่ง UML red p. 241

Select products from catalog

order

Goods delivered

Fill in order form

Mail order

:mailOrderCompany

Select products from catalog

Check Goods

External flow of control

Receive a signal

Send a signal called order Object flow

Page 27: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

27

ตวัอย่าง

Page 28: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

28

Activity diagram Person: Prepare beverage Real world

Find beverage

Put coffee in filter

Add water to reservoir Get cups

Put filter in machine

Turn on machine

Brew coffee

Pour coffee

Get cups

drink

[no coffee] [no cola]

[found cola][found coffee]

/coffeePot.turnOn

Light goes out

Page 29: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

29

Receive order

Authorize Payment

Check line item

Activity diagram : Order

Assign to orders

Reorder item

Dispatch Order

*For each line item on order

[in stock][succeeded]

[need to reorder]

[stock assigned to all line items and payment authorized]

Cancel Order

[failed]

taseap p 41

Page 30: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

30Simon p223

Activity diagram : running a campaignCampaign Manager Campaign team

pay

Request campaign

Accept payment

Campaign [Commissioned]

client

Authorize Campaign [Active]

Run CampaignCampaign

[Complete]

Campaign [Paid]

Page 31: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

31

Activity diagram :Order processing Fulfillment

Pay

Order product

customer

Validate order

Larman p608

:Order [placed]

Correct Payment

:Order [prepaid]

Get Product

Deliver rush

Deliverregular

:Order [fulfilled]Give visa to

shippers

Add customer to satisfied list Send receipt

[rush]

Page 32: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

32

Establish E-mail connection

Send e-mail Receive response

Activity diagram : email

[private content]

taseap p 41

Encrypted e-mail

Regular e-mail

Communication established

[valid reply] [no reply] or [error]

Page 33: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

33same

Page 34: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

34

create newstaffGrade

link to creativeStaff

link to previousStaffGrade

set prevoiusSatffGrade

gradeFinishDate

activity diagram showing the main step for operation CreativeStaff.changeGrade()

เล่มsimon p.262-265

Page 35: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

35

check approval forgrade change

print approvalrequest

link to creativeStaff

set prevoiusStaffGrade

gradeFinishDate

create newStaffGrade

[not approval byDirector]

[approval byDirector]

more complex activity diagram for CreativeStaff.changeGrade()

Page 36: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

36

calculate bonus

create warning letter add to 'star' list

formal list

add to list

[bonus > 250][bonus < 25]

[bonus >= 25 and bonus

<=250]

[more staffMembers]

[no more staffMembers]

activity diagram for prepareBonusList()

Page 37: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

37

find oldestcampaign worked

on

average campaignbonus

set bonus to grademinimum

get next campaign

get campaign bonuslevel

[campaign found]

[no more campaigns][campaign found]

[no campaign]

activity diagram for creativeSatff.calculateBonus()

Page 38: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

38

Activity diagram for the use case checkCampaignBudget

get client

calculate overheads

get advert cost

show campaign

[incorrect campaign][correct campaign]

[more adverts][no more adverts]

Page 39: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

39

{{ while more adversts:

next advert;cumcost = cumcost + advertcost;

endwhile;}{ campaigncost = cumcost x ohrate;

get campaignbudget;case campaigncost >= campaignbudget:

return warningflag;endcase

}}

pseudo code for check campaign budget

get client

calculate overheads

get advert cost

show campaign

[incorrect campaign]

[correct campaign]

[more adverts][no more adverts]

Page 40: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

อยา่ลืมวา่

• Activity diagram สามารถ นาํมาใชอ้ธิบาย

– overall business flow– Use case ท่ีซบัซอ้น

– Method

เม่ือเห็น Activity diagram ตอ้งตอบตวัเองวา่ Activity diagramน้ีกาํลงัอธิบายอะไร

และเม่ือเราตอ้งเขียน diagram เราตอ้งระบุใหช้ดัเจนวา่

Activity diagram for…….

40

Page 41: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

41

แบบฝึกหดั

จงเขียน actitity diagram :methodและ pseudo code for calculateGPA()

ID CourseNo Unit Grade5305100007 204219 3 A5305100007 204315 3 B 5305100007 204362 3 B5405100009 …..

Page 42: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

42

UML for objected-analysis and designUse case diagram-requirementClass diagram-structure analysis

Behavior analysis5.1 sequence diagram5.2 collaboration diagram 5.3 statechart diagram แสดงสถานะของ object 5.4 activity diagram :business flow, use case, method

Implement ***now5.5 component diagram5.6 deployment diagram

Page 43: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

43

Implementation diagram

show aspect of physical implementation , including the structure of component and the run-time deployment system

เปน diagram ทีใ่ชในกระบวนการ implement งาน ม ี2 diagram

-Component diagram

-Deployment diagram

Page 44: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

44

5.5 Component diagramเปน diagram ที่แสดงใหเหน็ถึง สวนประกอบทาง software (Software component) และความสมัพนัธระหวาง component และยงัแสดงถงึลกัษณะ dependence ระหวาง software component โดย Component อาจประกอบไปดว้ย Source Code และ Runtime หรอื Executable Component

ประโยชนทีส่าํคญัของ component diagram คือสามารถแบง system ขนาดใหญ เปน subsystem การแบงเปน subsystem ทาํใหการพัฒนาระบบมปีระสทิธภิาพ สนบัสนนุการแบงงานกนัทาํเปนทีม แยกความรบัผดิชอบได สนบัสนนุหลกัการ reuse

Component diagram - Show the structure of software in term of software components and their relationship to executable component - need not be used at this low level , but can be used to show dependencies between large-scale component .

Page 45: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

45

สญัลักษณ

component

ความสมัพนัธในลกัษณะ Dependency โดยจะแสดงในรปูของเสนปะทีม่หีวัลกูศร ดานหวัลกูศร --Component ลกู ดานปลาย --Component หลกั

Executation programเช่น Program1.exe

1 component เกดิจากการ implement class >= 1

หลกั

tools::Calculator.java

Component นีอ้ยูใ่น package tools

Page 46: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

46

การแบงยอยsystem

subsystem

component

Page 47: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

47

GardeningSystemPlanner

GardeningSystemController

GardeningSystemPlanDatabase

GardeningSystemDevices

ตวัอยาง hydroponics gardening system ม ี4 subsystem

Page 48: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

48

GardeningControl

EnvironmentControllers

PlanningConstants

NutrientControllers

GreenhouseSensors GreenhouseActuators

Hydroponics gardening system

component diagram : Gardening System Controller

Page 49: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

49

ตวัอยาง Servlet 2.2 API

Billboard service Reporting tool JDBC API

Show 4 component mean that the Reporting tool is dependent on those three component

Page 50: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

50

ตวัอยาง Scheduler

Planer

GUI

GUI update PlanerPlaner reservation Scheduler

Page 51: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

51

ตวัอยาง

ShoppingSesion

ShoppingCart

Catalog

Page 52: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

52

Dependency ระหวาง Component

Partner

Inventory management

Treasure

Page 53: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

53

ตวัอยาง

<<page>> home.html

<<file>> anlmlogo.java

<<file>> anlmator.java

<<document>> anlmlogo.java

<< document >> anlmator.java

Page 54: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

54

Page or file เชน่page1.htmlApplet.java

Component ทีเ่ป็นฝ่ายใหบ้รกิาร

Component ทีเ่ป็นฝ่ายขอใชบ้รกิาร

แสดงการใชอ้นิเตอรเ์ฟส

Three types of icon that can represent software component

Generic icon

Represent source file Represent file that contains executable (or object) code

เพิ่มเติม

Page 55: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

55

Billing.exe

Course.dll People.dll

Registar.exe

Billing system

Course user

Course registration system

dll dynamic link library เป็นprog.เลก็ๆ ทํางานเฉพาะอย่างถูก loadเข้ามาเมื่อต้องใช้งาน

Page 56: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

56

ตวัอยาง

อา้งอิงจาก http://www.math.unipd.it/~cignoni/uml/diagram.htm

สีฟ้าเป็นคาํอธิบาย

Page 57: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

57

Calculator.html

Calculator.jar

CalcApplet.class CalcGUI.class CalcModule.class

ตวัอยาง

Page 58: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

58

Page 59: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

59

<<JavaClassFile>> BookReviewApplication

“JavaApplication” BookReviewApplication

<<JavaClassFile>> BookReviewPanel

BookReviewPanel

<<JavaClassFile>> BookReviewData

<<JavaClassFile>> BookReviewMySQLDAO

BookReviewMySQLDAO

<<JavaClassFile>> BookReviewVO

BookReviewVO

Page 60: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

60

<<JAR>> BookReviewApplicationCilentJAR

<<JAR>> BookReviewMySQLDAOJAR

<<JavaClassFile>>BookReviewMySQLDAO

<<JavaClassFile>> BookReviewApplication <<JavaClassFile>>

BookReviewPanel

<<JAR>> BookReviewBusinessJAR

<<JavaClassFile>> BookReviewVO

<<JavaClassFile>> BookReviewData

Page 61: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

61

The diagram demonstrates some components and their inter-relationships. Assembly connectors "link" the provided interfaces supplied by "Product" and "Customer" to the required interfaces specified by "Order". A dependency relationship maps a customer's associated account details to the required interface; "Payment", indicated by Order".Components are similar in practice to package diagrams, as they define boundaries and are used to group elements into logical structures. The difference betweenpackage diagrams and component diagramsis that Component Diagrams offer a more semantically rich grouping mechanism. With component diagrams all of the model elementsare private, whereas package diagrams only display public items.

Sheet p.1

Page 62: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

62

Server ComponentsThis diagram illustrates the layout ofthe main server side components thatWill require building for an on-line book store. These components are a mixture of custom built and purchased items which willbe assembled to provide the required functionality.

Page 63: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

63

Security ComponentsThe security components diagram shows how security software such As the Certificate Authority, Browser, Web server and other model elements work together to assure security provisions in the proposed system.

Page 64: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

64

Catalog Home Strub

Catalog Business Delegate

CatalogRemote Strub

Catalog EJB Home

Catalog EJB objectb

Catalog Bean

Catalog.jsp Catalog homeCatalog home

Catalog remote Catalog remote

Catalog remote

Remote method calls across a network using HOP

สีฟ้าคาํอธิบาย

Page 65: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

65

5.6 Deployment diagram

show how a system will be physical deployed in the hardware environment

Its purpose is to show where the different component of the system will physically run

and how they will be physical with each other

Show how software is mapped onto hardware devices.

สถาปตยกรรมแบบ physical เปนการมองภาพรวมทัง้ระบบ ในลกัษณะที ่hardware เชือ่มตอกนั

Page 66: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

66

สญัลกัษณ

เปนการเชือ่มระหวาง node

Node เปน object ที่แทนอปุกรณฮารดแวรที่ใชในการทาํงานของระบบ

ปกต ิจะม ีอยางนอย 1 หนวยความจาํ 1 processor

node สีเ่หลีย่มลกูบาศก 3 มติ ิภายในบรรจปุระเภทของ node เชน PC หรอื Hostmachine

ลกูศรเสนปะ เชือ่มระหวาง node

อาจมกีารเชือ่มตอระหวาง node ที่แสดงวาอปุกรณมกีารตดิตอสื่อสารกนัดวยวธิใีด

Page 67: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

67

ตวัอยาง

AdminServer:HostMachine

:Schedule <<database>>meetingDB

Joe’sMAchine:PC

:Planner

Page 68: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

68

ตวัอยาง การเชือ่มตอกนัของโหนดโดยกาํหนดประเภทการสือ่สาร

ClientA:PC

ClientB:PC

Database Server:VAX

Application Server:Silicon Graphics:O2

<<TCP/IP>>

<<TCP/IP>>

DecNet

Page 69: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

69

Page 70: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

70

Page 71: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

71

Page 72: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

72

Page 73: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

73

Page 74: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

74

Page 75: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

75

อธบิาย Deployment diagram ไดอะแกรมนีแ้สดงใหเ้ห็นถงึสถาปตัยกรรมแบบ client-server โดยมีserver 2 ตวั คอื bank server กบั Real Estate server และ client คอื aPC ในการทาํงานของระบบเป็นการเชือ่มตอ่การทาํงานผา่นเครือ่ขา่ย TCP/IP ซึง่เป็น protocol ในการเชือ่มตอ่ในการทํางาน aPC คอื BuyerInterface ทาํงานกบั server ท ัง้ 2 ตวั เพือ่นําขอ้มลูมาแสดงที ่BuyerInterface

ในการทํางาน ที ่bank server รบัขอ้มลูผา่นทาง IMorgageAppcationผา่นเครือ่ขา่ยและประมวลผลที ่Morgage Application โดยดงึขอ้มลูจาก CustomerDB

สว่น การทาํงานที ่Real Estate server เมือ่รบัขอ้มลูผา่นILsting ทางเครือ่ขา่ยก็นําไปประมวลผลที ่Listing โดยตรวจสอบ/ดงึขอ้มลูจาก MultipleListings

Page 76: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

76

Page 77: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

77

Page 78: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

78

OnBoardComputer

RoutingSubsystem

WebServer

PlanningSubsystem

Figure 6-31 Allocation of MyTrip sunbsystem to hardware (UML development diagram).RoutingSubsystem runs on the OnBoardComputer while PlanningSubsystem runs on a WebServer.

Page 79: structure analysis Class diagram ... - cs.science.cmu.ac.th เพื่อแสดง information communicate asynchronous ระหว าง 2 object ... form. Mail order:mailOrder

79