YOMEDIA

ADSENSE
Ngôn ngữ UML - Bài 11
239
lượt xem 124
download
lượt xem 124
download

Tham khảo tài liệu 'ngôn ngữ uml - bài 11', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
AMBIENT/
Chủ đề:
Bình luận(0) Đăng nhập để gửi bình luận!
Nội dung Text: Ngôn ngữ UML - Bài 11
- Phaân tích vaø Thieát keá Höôùng ñoái töôïng duøng UML Module 11: Thieát keá Use-Case PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 1
- Muïc tieâu w Tìm hieåu muïc ñích cuûa böôùc thieát keá Use-Case vaø thôøi ñieåm thöïc hieän coâng ñoaïn naøy w Kieåm ñònh tính nhaát quaùn trong caøi ñaët use- case w Tinh chænh use-case realizations coù ñöôïc töø böôùc phaân tích Use-Case döïa treân caùc phaàn töû thieát keá ñaõ ñöôïc xaây döïng PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 2
- Vò trí cuûa Thieát keá Use-Case Architectural Analysis Architectural Describe Review the Architecture Describe Architecture Reviewer Architect Design Concurrency Distribution Subsystem Design Use-Case Analysis Review the Use-Case Design Design Designer Design Reviewer Class Design PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 3
- Toång quan veà Thieát keá Use-Case Supplementary Design Subsystems and Interfaces Specifications Use-Case Design Use-Case Realization Use-Case Realization Design Classes Use Case PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 4
- Caùc böôùc thieát keá Use-Case w Moâ taû töông taùc giöõa caùc Design Object w Ñôn giaûn hoùa caùc Interaction Diagram nhôø vaøo caùc Subsystem (optional) w Moâ taùc caùc haønh vi lieân quan ñeán tính Persistence w Tinh chænh moâ taû veà caùc Flow of Events w Hôïp nhaát caùc Class vaø caùc Subsystem w Checkpoints PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 5
- Nhaéc laïi: Use-Case Realization Use-Case Model Design Model Use Case Use-Case Realization Sequence Diagrams Collaboration Diagrams Use Case PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Class Diagrams Döông Anh Ñöùc 6
- Caùc böôùc thieát keá Use-Case w Moâ taû töông taùc giöõa caùc Design Object w Ñôn giaûn hoùa caùc Interaction Diagram nhôø vaøo caùc Subsystem (optional) w Moâ taùc caùc haønh vi lieân quan ñeán tính Persistence w Tinh chænh moâ taû veà caùc Flow of Events w Hôïp nhaát caùc Class vaø caùc Subsystem w Checkpoints PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 7
- Tinh chænh Use-Case Realization w Xaùc ñònh caùc object coù tham gia vaøo Use-Case w Phaân coâng traùch nhieäm cho caùc object w Mo hình hoùa caùc thoâng ñieäp giöõa caùc object w Moâ taû caùc keát quaû xöû lyù töø caùc thoâng ñieäp w Moâ hình hoùa quan heä giöõa caùc class lieân quan Sequence Diagrams Class Diagrams PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 8
- Caùc böôùc tinh chænh Use-Case Realization w Thay theá caùc class khaû duïng baèng caùc subsystem interface keát hôïp vôùi chuùng w Töøng böôùc tích hôïp caùc cô cheá kieán truùc khaû duïng w Hieäu chænh use-case realization § Caùc Interaction diagram § View of participating classes (VOPC) class diagram(s) PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 9
- Ví duï: Tích hôïp Subsystem Interfaces Analysis Classes Design Elements BillingSystem BillingSystem // submit bill() IBillingSystem submitBill(forTuition : Double, forStudent : Student) CourseCatalogSystem CourseCatalogSystem // get course offerings() ICourseCatalogSystem getCourseOfferings(forSemester : Semester) : CourseOfferingList Taát caû caùc analysis class khaùc ñöôïc aùnh xaï thaønh caùc design class PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 10
- Ví duï: Tröôùc khi tích hôïp SubSystem Interfaces Phaûi thay baèng subsystem interface : RegisterForCoursesForm : RegistrationController : CourseCatalogSystem : Schedule : Student : Student 1. // create schedule( ) 1.1. // get course offerings( ) Student muoán Taïo môùi 1.1.1. // get course offerings(forSemester) schedule 1.2. // display course offerings( ) Moät ds caùc hoïc phaàn coù theå ñaêng kyù trong HK ñöôïc hieån thò A blank schedule 1.3. // display blank schedule( ) is displayed for the students to select offerings 2. // select 4 primary and 2 alternate offerings( ) 2.1. // create schedule with offerings( ) 2.1.1. // create with offerings( ) 2.1.2. // add schedule(Schedule) Taïi vò trí naøy Submit Schedule subflow ñöôïc thöïc hieän PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 11
- Ví duï: Sau khi tích hôïp Subsystem Interface Ñaõ thay vaøo subsystem interface : RegisterFor : Registration : ICourseCatalog : Schedule : Student : Student CoursesForm Controller System 1: // create schedule( ) 1.1: // get course offerings( ) Student wishes to create a new 1.1.1: getCourseOfferings(Semester) schedule 1.2: // display course offerings( ) A list of the available course offerings for this semester are displayed A blank schedule 1.3: // display blank schedule( ) is displayed for the students to select offerings 2: // select 4 primary and 2 alternate offerings( ) 2.1: // create schedule with offerings( ) 2.1.1: // create with offerings( ) 2.1.2: // add schedule(Schedule) Taïi vò trí naøy Submit Schedule subflow ñöôïc thöïc hieän PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 12
- Ví duï: Tích hôïp Subsystem Interfaces (VOPC) Subsystem interface ICourseCatalogSystem (from External System Interfaces) RegisterForCoursesForm (from Registration) 1 RegistrationController 0..* getCourseOfferings() (from Registration) initialize() // submit schedule() // display course offerings() // display schedule() 1 1 // submit schedule() // save schedule() Schedule // save schedule() currentSchedule (from University Artifacts) // create schedule with offerings() 0..1 // create schedule() // getCourseOfferings() semester // select 4 primary and 2 alternate offerings() // display blank schedule() 0..1 0..1 // submit() registrant // save() 0..1 0..* // any conflicts?() // new() Student. 0..* (from University Artifacts) 0..* - name - address 1 alternateCourses - studentID : int 0..2 primaryCourses // addSchedule() 0..4 CourseOffering // getSchedule() (from University Artifacts) // hasPrerequisites() number // passed() startTime endTime days // addStudent() // removeStudent() // new() // setData() PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 13
- Tích hôïp caùc cô cheá kieán truùc: Security w Baûng aùnh xaï caùc Analysis-Class vôùi caùc cô cheá kieán truùc coù töø böôùc phaân tích Use-Case Analysis Class Caùc cô cheá Student Persistency, Security Schedule Persistency, Security CourseOffering Persistency, Legacy Interface Course Persistency, Legacy Interface RegistrationController Distribution PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 14
- Tích hôïp caùc cô cheá kieán truùc: Distribution w Baûng aùnh xaï caùc Analysis-Class vôùi caùc cô cheá kieán truùc coù töø böôùc phaân tích Use-Case Analysis Class Caùc cô cheá Student Persistency, Security Schedule Persistency, Security CourseOffering Persistency, Legacy Interface Course Persistency, Legacy Interface RegistrationController Distribution PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 15
- Caùc böôùc thieát keá Use-Case w Moâ taû töông taùc giöõa caùc Design Object w Ñôn giaûn hoùa caùc Interaction Diagram nhôø vaøo caùc Subsystem (optional) w Moâ taùc caùc haønh vi lieân quan ñeán tính Persistence w Tinh chænh moâ taû veà caùc Flow of Events w Hôïp nhaát caùc Class vaø caùc Subsystem w Checkpoints PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 16
- Ñoùng goùi caùc Subsystem Interaction w Coù theå moâ taû caùc töông taùc döôùi nhieàu möùc ñoä khaùc nhau w Töông taùc giöõa caùc Subsystem coù theå moâ taû bôûi caùc interaction diagram cuûa chuùng Taêng möùc ñoä tröøu töôïng PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 17
- Khi naøo ñoùng goùi Sub-Flows trong Subsystem w Sub-flow xuaát hieän trong nhieàu use-case realizations w Sub-flow coù tieàm naêng taùi söû duïng w Sub-flow phöùc taïp vaø deã daøng ñoùng goùi w Sub-flow do 1 ngöôøi/ñoäi ñaûm nhieäm w Sub-flow taïo ra moät keát quaû xaùc ñònh toát w Sub-flow ñöôïc goùi goïn trong moät component trong moâ hình caøi ñaët PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 18
- Guidelines: Ñoùng goùi Subsystem Interactions w Caùc Subsystem phaûi ñöôïc bieåu dieãn vôùi caùc interface cuûa chuùng trong interaction diagrams w Caùc thoâng ñieäp ñeán subsystems ñöôïc moâ hình nhö caùc thoâng ñieäp ñeán subsystem interface w Caùc thoâng ñieäp ñeán subsystems töông öùng vôùi caùc operation cuûa subsystem interface w Caùc töông taùc trong subsystems ñöôïc moâ hình trong Subsystem Design :InterfaceA MySubsystem InterfaceA Op1() op1() PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 19
- Lôïi ích cuûa vieäc ñoùng goùi Subsystem Interaction w Use-case realization bôùt hoãn ñoän w Use-case realization coù theå ñöôïc taïo tröôùc khi xaây döïng thieát keá beân trong cuûa subsystems (parallel development) w Use-case realizations generic hôn vaø deã daøng thay ñoåi (subsystems coù theå ñöôïc thay theá) PT & TK Höôùng ñoái töôïng – Thieát keá kieán truùc Döông Anh Ñöùc 20

ADSENSE
CÓ THỂ BẠN MUỐN DOWNLOAD
Thêm tài liệu vào bộ sưu tập có sẵn:

Báo xấu

LAVA
TRỢ GIÚP
HỖ TRỢ KHÁCH HÀNG
Chịu trách nhiệm nội dung:
Nguyễn Công Hà - Giám đốc Công ty TNHH TÀI LIỆU TRỰC TUYẾN VI NA
LIÊN HỆ
Địa chỉ: P402, 54A Nơ Trang Long, Phường 14, Q.Bình Thạnh, TP.HCM
Hotline: 093 303 0098
Email: support@tailieu.vn
