JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Software Engineering » UML  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 sequence diagram 中如何表達 alternative flow [精華]
worookie

Small Ship

版主

發文: 2092
積分: 21
於 2003-09-13 06:29 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
(此問題乃延續 iteration 討論 的後續討論)

通常一個 Use Case 會有一分文件檔來描述其細節
範例如下:

===============================

Use Case Sample: 過中秋

Basic Flow
天氣好的話去參加社團烤肉活動

Alternative Flow
天氣不好的話找同學去打保齡球

===============================

通常一個 Use Case 我們會給他畫一個相對應的 sequence diagram 來表達其內容. 如果單一個 Flow 的話, 畫 seq diag 當然是沒問題. 如果有多種 flow 的話, 我就不清楚怎樣畫才是正確的方式. 上面的例子就有兩個 flows (basic 和 alternative).

底下是我在我有限的 UML 能力下畫的畫出來給大家看, 不知道對不對, 請大家多給點指教. 謝謝.


worookie edited on 2003-09-13 06:49
reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
Biologic

生物學下的產物



發文: 524
積分: 4
於 2003-09-13 08:59 user profilesend a private message to usersend email to Biologicreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
worookie wrote:
(此問題乃延續 iteration 討論 的後續討論)

通常一個 Use Case 會有一分文件檔來描述其細節
範例如下:

===============================

Use Case Sample: 過中秋

Basic Flow
天氣好的話去參加社團烤肉活動

Alternative Flow
天氣不好的話找同學去打保齡球

===============================

通常一個 Use Case 我們會給他畫一個相對應的 sequence diagram 來表達其內容. 如果單一個 Flow 的話, 畫 seq diag 當然是沒問題. 如果有多種 flow 的話, 我就不清楚怎樣畫才是正確的方式. 上面的例子就有兩個 flows (basic 和 alternative).

底下是我在我有限的 UML 能力下畫的畫出來給大家看, 不知道對不對, 請大家多給點指教. 謝謝.


你用錯箭頭, 你這是叫別人去烤肉跟打保齡球.... 你自己還是在家沒有出門...


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:Biologic]
Biologic

生物學下的產物



發文: 524
積分: 4
於 2003-09-13 09:10 user profilesend a private message to usersend email to Biologicreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Biologic wrote:
你用錯箭頭, 你這是叫別人去烤肉跟打保齡球.... 你自己還是在家沒有出門...


再想想 實心的也不太對... 那變成命令別人去做事情... 然後自己等別人做完... 自己也沒有去....


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
worookie

Small Ship

版主

發文: 2092
積分: 21
於 2003-09-13 09:41 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
那如果先不管我自己有沒有去
上面的圖有表達到 alternative flow 的意思嗎?
謝謝


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
Biologic

生物學下的產物



發文: 524
積分: 4
於 2003-09-13 09:59 user profilesend a private message to usersend email to Biologicreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
worookie wrote:
那如果先不管我自己有沒有去
上面的圖有表達到 alternative flow 的意思嗎?
謝謝


對不起 我不清楚 alternative flow 的意思...
如果你指 (conditional) branching, 那答案是 是的


reply to postreply to post
作者 时序图,小case [Re:worookie]
Akilover



發文: 0
積分: 0
於 2003-09-15 10:04 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
没事情我拿Jude画图玩,虽然有的自己都不大知道是什么意思
该怎么表示,有高手画的我照着描描:)


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
popcorny

Jakarta 2%

版主

發文: 752
積分: 20
於 2003-09-15 10:53 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
這是spec中
Figure 3-56


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
Akilover



發文: 0
積分: 0
於 2003-09-15 11:11 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
ob4:C4 上面分开的时序段表示该时间段可能进行不同的操作吗?
看上去蛮怪的。By the way, 这个图是用什么画的,我用Jude好象画不出来的


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
Yves





發文: 43
積分: 0
於 2003-09-15 11:24 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
worookie wrote:
那如果先不管我自己有沒有去
上面的圖有表達到 alternative flow 的意思嗎?


我从其他一些文章里(包括您上面说的文章)中看到关于Alternative Flow的说法,在UML SPEC上面找不到这样的说法,SPEC上的说法是Biologic说的那样“Branching”.

上面文章中提到的:

Generic sequence diagrams make use of conditional logic, which can be useful for describing the alternative flow of events over the course of an interaction.

Spec中说:

A branch is shown by multiple arrows leaving a single point, each possibly labeled by a condition. Depending on whether the conditions are mutually exclusive, the construct may represent conditionality or concurrency.

两者都是表示Conditional logic, 我想可以看出: Alternative flow = branching.

还有就是可以看出您的图跟Spec上说的一致,所以您画的就是branching(Alternative flow)


Yves edited on 2003-09-15 11:26
reply to postreply to post
Hey Jude, don't let me down.
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
Yves





發文: 43
積分: 0
於 2003-09-15 12:01 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不知您上面那个图这样字画会不会好一点?!

(縮略圖,點擊圖片鏈接看原圖)


reply to postreply to post
Hey Jude, don't let me down.
作者 Re:sequence diagram 中如何表達 alternative flow [Re:Yves]
worookie

Small Ship

版主

發文: 2092
積分: 21
於 2003-09-15 13:33 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Yves wrote:
不知您上面那个图这样字画会不会好一点?!


Yves 太强了!!!


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
anthonycs



版主

發文: 1195
積分: 6
於 2003-09-15 13:38 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
worookie wrote:
Yves 太强了!!!


Thumbs up

他思考物件的角度
值得學習~


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:Yves]
Biologic

生物學下的產物



發文: 524
積分: 4
於 2003-09-15 13:40 user profilesend a private message to usersend email to Biologicreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Yves wrote:
不知您上面那个图这样字画会不会好一点?!


I feel the person is the god, because once he joined the group, the group starts the activity... he must be the very special person.


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
Akilover



發文: 0
積分: 0
於 2003-09-15 13:45 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
呵呵,我刚到论坛,就发现wo大老是说别人强强:)
斑竹大人是做哪行的,或者还是学生呢


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:Biologic]
anthonycs



版主

發文: 1195
積分: 6
於 2003-09-15 13:49 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Biologic wrote:
I feel the person is the god, because once he joined the group, the group starts the activity... he must be the very special person.


唔.... 我想到一個問題

如果是 社團還有同學在等待這個人的回答

不管這個人加入哪邊, 兩邊活動都要照常舉行

那麼這個圖中的method有哪些是實心箭頭 ?


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:anthonycs]
Biologic

生物學下的產物



發文: 524
積分: 4
於 2003-09-15 13:55 user profilesend a private message to usersend email to Biologicreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
anthonycs wrote:
唔.... 我想到一個問題

如果是 社團還有同學在等待這個人的回答

不管這個人加入哪邊, 兩邊活動都要照常舉行

那麼這個圖中的method有哪些是實心箭頭 ?


我覺得應該都是訊息 只有 time out 會是實心. 且 timeout 只會強迫 group 去通知所有打算加入的人出發. 但是還是會有 cancel 的可能性.... 反正情況太多了... 我們應該只考慮自己跟 group 的關係就好了.


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:Akilover]
popcorny

Jakarta 2%

版主

發文: 752
積分: 20
於 2003-09-17 13:42 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Akilover wrote:
呵呵,我刚到论坛,就发现wo大老是说别人强强:)
斑竹大人是做哪行的,或者还是学生呢

sorry...忘了回答你...
我现在还是学生...
还在学习当中..^^
要跟Akilover大大跟Yves大大多加学习


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
Akilover



發文: 0
積分: 0
於 2003-09-17 14:23 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
你的课程里面有UML的吗?
我读书的时候老师都不知道再教什么,哎


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:Akilover]
popcorny

Jakarta 2%

版主

發文: 752
積分: 20
於 2003-09-17 21:29 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Akilover wrote:
你的课程里面有UML的吗?
我读书的时候老师都不知道再教什么,哎

有阿 不過那是研究所選修課程
課名是Object-Oriented Software Engineering
內容是教UML跟RUP


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
Akilover



發文: 0
積分: 0
於 2003-09-18 11:04 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不知道我们这里研究生学不学这个的,什么时候碰到我同学我问问他们
计算机系的课程早就应该改进了


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
xiatao97





發文: 2
積分: 0
於 2003-09-19 16:17 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
呵呵,我们就没有学.所以现在开始学了.

reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:worookie]
Akilover



發文: 0
積分: 0
於 2003-09-19 16:26 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不学UML也就算了,多少开个design pattern的课来
真是败给我们学校了


reply to postreply to post
作者 Re:sequence diagram 中如何表達 alternative flow [Re:Akilover]
popcorny

Jakarta 2%

版主

發文: 752
積分: 20
於 2003-09-19 16:41 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Akilover wrote:
不学UML也就算了,多少开个design pattern的课来
真是败给我们学校了

design patterns的课好像本来就很少学校开
之前我们也没有开过这门课
直到上个学期我们系上才有开
授课的是叶秉哲大师...
我有去听...受益不少... ^^~


reply to postreply to post
» JWorld@TW »  Software Engineering » UML

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8