SlideShare a Scribd company logo
Applying UML and Patterns
2017/01/11
Taka Wang
CH1.
Object-Oriented Analysis and Design
Owning a hammer doesn't make one an
architect
Knowing an object-oriented language (such as Java) is a necessary but
insufficient first step to create object systems. Knowing how to "think in
objects" is also critical.
The UML is not OOA/D or a method, it is simply notation.
How should responsibilities be allocated to classes of objects? How should
objects interact? What classes should do what? These are critical questions in
the design of a system.
What Is Analysis and Design
Design emphasizes a conceptual solution that fulfills the requirements, rather
than its implementation. Ultimately, designs can be implemented.
=> Do the thing right.
Analysis emphasizes an investigation of the problem and requirements, rather
than a solution. It is a broad term, best qualified, as in requirements analysis
(an investigation of the requirements) or object analysis (an investigation of the
domain objects).
=> Do the right thing.
What Is Object-Oriented Analysis and Design
OOD: Defining software objects and how they collaborate to fulfill the
requirements.
Ex. Book software object may have a title attribute and a getChapter method.
OOA: Finding and describing the objects - or concepts - in the problem domain.
Ex. Book, Library, Patron. (跟 Software object 無關)
Dice Game
骰子遊戲,一次丟兩個骰子,如果總和是
7則贏,否則就輸。
這不是OO的產出,只是寫故事。
Play a Dice Game: A player picks up and rolls the dice. If the dice face value
total seven, they win; otherwise, they lose.
Define a Domain Model
● Object-oriented analysis is concerned with creating a description of the
domain from the perspective of classification by objects. A decomposition
of the domain involves an identification of the concepts, attributes, and
associations that are considered noteworthy. (分類法,找出概念、屬性跟關
係)
● A domain model is not a description of software objects; it is a
visualization of concepts in the real-world domain. (真實世界的概念)
Partial Domain Model
物件只是從真實世界得到 啟發,而不是直接Model真實世界。
Define Interaction Diagrams
因為 play message 是丟給 DiceGame,所以 DiceGame 需要有 method play
而 Die Class 需要 roll 跟 getFaceValue 兩個方法
描述 Class 而不是真實世界
使用UML的三種角度
1. Conceptual perspective the diagrams are interpreted as describing things
in a situation of the real world or domain of interest.
2. Specification (software) perspective the diagrams (using the same
notation as in the conceptual perspective) describe software abstractions
or components with specifications and interfaces, but no commitment to a
particular implementation (for example, not specifically a class in C# or
Java). <<實務上不常用>>
3. Implementation (software) perspective the diagrams describe software
implementations in a particular technology (such as Java).
三種角度的範例
domain concepts or conceptual classes
design classes
CH6.
USE CASES
Use Cases
Use cases 是文字的故事,不是 Diagrams
Process Sale:
A customer arrives at a checkout with items to purchase. The cashier
uses the POS system to record each purchased item. The system
presents a running total and line-item details. The customer enters
payment information, which the system validates and records. The system
updates inventory. The customer receives a receipt from the system and
then leaves with the items.
什麼故事:Some actor using a system to meet goal.
Definition: Actors, Scenarios and Use Cases
● An actor is something with behavior, such as a person (identified by role),
computer system, or organization; for example, a cashier.
● A scenario is a specific sequence of actions and interactions between
actors and the system; it is also called a use case instance.
● A use case is a collection of related success and failure scenarios that
describe an actor using a system to support a goal.
Scenarios example - Handle Returns (退貨處理)
Main Success Scenario:
A customer arrives at a checkout with items to return. The cashier uses the
POS system to record each returned item ...
Alternate Scenarios:
If the customer paid by credit, and the reimbursement (退款) transaction to
their credit account is rejected, inform the customer and pay them with cash.
If the item identifier is not found in the system, notify the Cashier and
suggest manual entry of the identifier code (perhaps it is corrupted).
If the system detects failure to communicate with the external accounting
system, ...
Use Cases 討論
● Use Cases 是文字故事
● Use Cases 跟物件導向沒有關係,寫下 Uses Cases 並不是在做OOA
● Use Cases are a key requirements input to classic OOA/D
● Use Cases emphasize the user goals and perspective (User-centric)
“Who is using the system, what are their typical scenarios of use, and what
are their goals?” (誰在什麼情境使用此系統,為了完成什麼事情)
三種 Actors
Primary actor: has user goals fulfilled through using services of the system. <
收銀員>
Why: To find user goals, which drive the use cases.
Supporting actor: provides a service (ex. information) to the system. <自動付款
認證服務>
Why: To clarify external interfaces and protocols
Offstage actor: has an interest in the behavior of the use case. <稅務局>
Why: To ensure the all necessary interests are identified and satisfied.
三種常見的UC格式
Brief:通常是 main success scenario (抓個主題與範圍的感覺)
Casual: 前面的退款範例 (多個scenarios)
Fully dresses:所有步驟與變形的完整描述 (通常選10%有價值的UC來寫)
完整陳述的範本
Guidelines
1. Write in an Essential UI-Free Style (Root-goal, keep the user interface out
and focus on actor intent)
2. Write Terse Use Cases (刪掉贅詞)
3. Write Black-Box Use Cases (不考慮內部的運作,只在乎系統的
responsibilities,What 而不是 How)
4. Take an Actor and Actor-Goal Perspective
5. How to Find Use Cases
6. What Tests Can Help Find Useful Use Cases
3. Write Black-Box Use Cases
4. Take an Actor and Actor-Goal Perspective
Write requirements focusing on the users or actors of a system, asking about
their goals and typical situations.
Focus on understanding what the actor considers a valuable result.
5. How to Find Use Cases
1. 選擇 system boundary (大框框)
2. 找出所有的 primary actors
3. 找出每個 primary actor 的 Goal
4. Define User Cases satisfy the goals of the primary actors
Actor-Goal List
5.2 收銀員或顧客才是 Primary Actor?
另一種手法:從 Event 出發
什麼事件,從哪來,為什麼?
5.4 Define Use Cases
● 一個 Goal 寫一個 Use Case <CRUD例外>
● Use Case 的名稱類似 Goal :
○ Goal: process a sale
○ Use Case: Processs Sale
● Use Case 從動詞開始
6. What tests can help find useful use cases
1. The Boss Test
2. Elementary Business Process (EBP) Test: A task performed by one person in
one place at one time, in response to a business event, which adds measurable
business value and leaves the data in a consistent state
3. The Size Test:3~10 steps
Use Case Diagram
UC:畫圖還有畫線是次要的,文字
描述才是重點
畫 Use Case Diagram時,一併寫
下 actor-goal 清單
不要花超過一小時在這張圖上
Use Case Diagram 的繪製建議
CH9. USE-CASE MODEL:
Drawing system sequence
diagrams
System Sequence Diagram
Clarify the input and output system events
related to our system
System Sequence Diagrams:
● 一個特定的scenario,所有
系統都當作黑盒子
● actor generate events
● 重點在抓出從 actor 穿越
system boundary 的 Event
UC已經描述外部的actor怎麼跟系統互動
SSD for a Process Sale scenario
Simple cash-only success
scenario of Process Sale
SSDs and Use Cases
SSD 是從 UC 導出來的 後面有過程
找出 System boundary,找出直接觸發(穿過)系統的 Event
Naming System Events and Operations
● System Event 應該表達出 intent,而不是從什麼媒介 (按
鈕)
● 從動詞出發比較好, 命令導向
加上文字描述 (從 UC 抓過來)
● operations
● parameters
● return data
簡短就好
CH 10. Domain Model
Visualizing Concepts
Domain Model, aka. Conceptual Model
A domain model is a visual representation of real-world
conceptual classes, not of software components in a
domain of interest. It is not a set of diagrams describing
software classes, or software objects with responsibilities.
- domain objects or conceptual classes
- associations between conceptual classes
- attributes of conceptual classes
Class Diagram 只用這些
Domain Model example
Domain model is a visual dictionary of abstractions
Relate to Domain-Driven Design (DDD)
Ubiquitous
Language
Domain Model 不是在 Model Software Component
不要出現這些
● Software artifacts, such as a window or a database, unless the domain
being modeled is of software concepts, such as a model of graphical user
interfaces.
● Responsibilities or methods
Conceptual Class Identification
● The central task is to identify conceptual classes related to the scenarios
under design.
● It is better to overspecify a domain model with lots of fine-grained
conceptual classes than to underspecify it.
1. Use a conceptual class category list
2. Identify noun phrases
3. Analysis patterns [Fowler96] <<Transaction Pattern>>
尋找的策略
Conceptual Class Category List
從 UC 找名詞
Domain Modeling Guidelines
1. List the candidate conceptual classes using the Conceptual Class
Category List and noun phrase identification techniques related to the
current requirements under consideration.
2. Draw them in a domain model.
3. Add the associations necessary to record relationships for which there is a
need to preserve some memory.
4. Add the attributes necessary to fulfill the information requirements.
Common Mistake
Perhaps the most common mistake when creating a domain model is to
represent something as an attribute when it should have been a concept.
If we do not think of some conceptual class X as a number or text
in the real world, X is probably a conceptual class, not an attribute.
如果還是不確定,將它當作 concept,domain model 中很少有attribute
Skip..
Lowering the representational gap
From analysis to design
Use Case SSD
Domain
Model
Design
Model
use case diagram
and descriptions
sequence diagram conceptual class
diagram (state diagram)
class diagram
Thank you

More Related Content

What's hot

software project management Artifact set(spm)
software project management Artifact set(spm)software project management Artifact set(spm)
software project management Artifact set(spm)
REHMAT ULLAH
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UML
Ajit Nayak
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
Puneet Kulyana
 
Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5koolkampus
 
Vision of cloud computing
Vision of cloud computingVision of cloud computing
Vision of cloud computing
gaurav jain
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
Harsh Jegadeesan
 
SE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELSSE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELS
Abrar ali
 
Importance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML DesigningImportance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML Designing
ABHISHEK KUMAR
 
Internet and World Wide Web How To Program (5th Edition)
Internet and World Wide Web How To Program (5th Edition)Internet and World Wide Web How To Program (5th Edition)
Internet and World Wide Web How To Program (5th Edition)
hengoofga
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
mohamed tahoon
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
Manish Kumar
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
Anuja Arosha
 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
Satyamevjayte Haxor
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
Amith Tiwari
 
Data Designs (Software Engg.)
Data Designs (Software Engg.)Data Designs (Software Engg.)
Data Designs (Software Engg.)
Arun Shukla
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared Memory
SHIKHA GAUTAM
 
Ch1 introduction
Ch1 introductionCh1 introduction
Ch1 introduction
software-engineering-book
 

What's hot (20)

Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
software project management Artifact set(spm)
software project management Artifact set(spm)software project management Artifact set(spm)
software project management Artifact set(spm)
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UML
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5
 
4+1 view model
4+1 view model4+1 view model
4+1 view model
 
Vision of cloud computing
Vision of cloud computingVision of cloud computing
Vision of cloud computing
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
 
SE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELSSE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELS
 
Importance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML DesigningImportance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML Designing
 
Internet and World Wide Web How To Program (5th Edition)
Internet and World Wide Web How To Program (5th Edition)Internet and World Wide Web How To Program (5th Edition)
Internet and World Wide Web How To Program (5th Edition)
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
 
Use Case Modeling
Use Case ModelingUse Case Modeling
Use Case Modeling
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 
Data Designs (Software Engg.)
Data Designs (Software Engg.)Data Designs (Software Engg.)
Data Designs (Software Engg.)
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared Memory
 
Ch1 introduction
Ch1 introductionCh1 introduction
Ch1 introduction
 

Similar to Applying UML and Patterns (CH1, 6, 9, 10)

OO Development 5 - Analysis
OO Development 5 - AnalysisOO Development 5 - Analysis
OO Development 5 - Analysis
Randy Connolly
 
Sofwear deasign and need of design pattern
Sofwear deasign and need of design patternSofwear deasign and need of design pattern
Sofwear deasign and need of design patternchetankane
 
unit-1modellingconceptsclassmodeling-140929182538-phpapp01.pdf
unit-1modellingconceptsclassmodeling-140929182538-phpapp01.pdfunit-1modellingconceptsclassmodeling-140929182538-phpapp01.pdf
unit-1modellingconceptsclassmodeling-140929182538-phpapp01.pdf
RojaPogul1
 
Sdlc
SdlcSdlc
Sdlc
SdlcSdlc
Object Oriented Analysis and Design with UML2 part1
Object Oriented Analysis and Design with UML2 part1Object Oriented Analysis and Design with UML2 part1
Object Oriented Analysis and Design with UML2 part1
Haitham Raik
 
Unit IV Software Engineering
Unit IV Software EngineeringUnit IV Software Engineering
Unit IV Software Engineering
Nandhini S
 
OBJECT ORIENTED ANALYSIS FOR EASY UNDERSTANDING .ppt
OBJECT ORIENTED ANALYSIS FOR EASY UNDERSTANDING .pptOBJECT ORIENTED ANALYSIS FOR EASY UNDERSTANDING .ppt
OBJECT ORIENTED ANALYSIS FOR EASY UNDERSTANDING .ppt
AshishSaraswat30
 
05 fse requirementsengineering
05 fse requirementsengineering05 fse requirementsengineering
05 fse requirementsengineeringMohesh Chandran
 
Unit 1( modelling concepts & class modeling)
Unit  1( modelling concepts & class modeling)Unit  1( modelling concepts & class modeling)
Unit 1( modelling concepts & class modeling)
Manoj Reddy
 
1Introduction to OOAD
1Introduction to OOAD1Introduction to OOAD
1Introduction to OOAD
Shahid Riaz
 
Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)
dipenpatelpatel
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
RiazAhmad786
 
Elaboration
ElaborationElaboration
Elaboration
SripriyaP3
 
From use case to software architecture
From use case to software architectureFrom use case to software architecture
From use case to software architecture
Ahmad karawash
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
pkaviya
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
TigistTilahun1
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
DrYogeshDeshmukh1
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
Rishabh Soni
 

Similar to Applying UML and Patterns (CH1, 6, 9, 10) (20)

OO Development 5 - Analysis
OO Development 5 - AnalysisOO Development 5 - Analysis
OO Development 5 - Analysis
 
Sofwear deasign and need of design pattern
Sofwear deasign and need of design patternSofwear deasign and need of design pattern
Sofwear deasign and need of design pattern
 
unit-1modellingconceptsclassmodeling-140929182538-phpapp01.pdf
unit-1modellingconceptsclassmodeling-140929182538-phpapp01.pdfunit-1modellingconceptsclassmodeling-140929182538-phpapp01.pdf
unit-1modellingconceptsclassmodeling-140929182538-phpapp01.pdf
 
Sdlc
SdlcSdlc
Sdlc
 
Sdlc
SdlcSdlc
Sdlc
 
Object Oriented Analysis and Design with UML2 part1
Object Oriented Analysis and Design with UML2 part1Object Oriented Analysis and Design with UML2 part1
Object Oriented Analysis and Design with UML2 part1
 
Unit IV Software Engineering
Unit IV Software EngineeringUnit IV Software Engineering
Unit IV Software Engineering
 
Ooad
OoadOoad
Ooad
 
OBJECT ORIENTED ANALYSIS FOR EASY UNDERSTANDING .ppt
OBJECT ORIENTED ANALYSIS FOR EASY UNDERSTANDING .pptOBJECT ORIENTED ANALYSIS FOR EASY UNDERSTANDING .ppt
OBJECT ORIENTED ANALYSIS FOR EASY UNDERSTANDING .ppt
 
05 fse requirementsengineering
05 fse requirementsengineering05 fse requirementsengineering
05 fse requirementsengineering
 
Unit 1( modelling concepts & class modeling)
Unit  1( modelling concepts & class modeling)Unit  1( modelling concepts & class modeling)
Unit 1( modelling concepts & class modeling)
 
1Introduction to OOAD
1Introduction to OOAD1Introduction to OOAD
1Introduction to OOAD
 
Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
 
Elaboration
ElaborationElaboration
Elaboration
 
From use case to software architecture
From use case to software architectureFrom use case to software architecture
From use case to software architecture
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 

More from Jamie (Taka) Wang

20200727_Insight workstation
20200727_Insight workstation20200727_Insight workstation
20200727_Insight workstationJamie (Taka) Wang
 
20200723_insight_release_plan
20200723_insight_release_plan20200723_insight_release_plan
20200723_insight_release_planJamie (Taka) Wang
 
20200808自營電商平台策略討論
20200808自營電商平台策略討論20200808自營電商平台策略討論
20200808自營電商平台策略討論Jamie (Taka) Wang
 
20200408_gen11_sequence_diagram
20200408_gen11_sequence_diagram20200408_gen11_sequence_diagram
20200408_gen11_sequence_diagramJamie (Taka) Wang
 
20160217 - Overview of Vortex Intelligent Data Sharing Platform
20160217 - Overview of Vortex Intelligent Data Sharing Platform20160217 - Overview of Vortex Intelligent Data Sharing Platform
20160217 - Overview of Vortex Intelligent Data Sharing PlatformJamie (Taka) Wang
 
20141210 - Microservice Container
20141210 - Microservice Container20141210 - Microservice Container
20141210 - Microservice ContainerJamie (Taka) Wang
 

More from Jamie (Taka) Wang (20)

20200606_insight_Ignition
20200606_insight_Ignition20200606_insight_Ignition
20200606_insight_Ignition
 
20200727_Insight workstation
20200727_Insight workstation20200727_Insight workstation
20200727_Insight workstation
 
20200723_insight_release_plan
20200723_insight_release_plan20200723_insight_release_plan
20200723_insight_release_plan
 
20210105_量產技轉
20210105_量產技轉20210105_量產技轉
20210105_量產技轉
 
20200808自營電商平台策略討論
20200808自營電商平台策略討論20200808自營電商平台策略討論
20200808自營電商平台策略討論
 
20200427_hardware
20200427_hardware20200427_hardware
20200427_hardware
 
20200429_ec
20200429_ec20200429_ec
20200429_ec
 
20200607_insight_sync
20200607_insight_sync20200607_insight_sync
20200607_insight_sync
 
20220113_product_day
20220113_product_day20220113_product_day
20220113_product_day
 
20200429_software
20200429_software20200429_software
20200429_software
 
20200602_insight_business
20200602_insight_business20200602_insight_business
20200602_insight_business
 
20200408_gen11_sequence_diagram
20200408_gen11_sequence_diagram20200408_gen11_sequence_diagram
20200408_gen11_sequence_diagram
 
20190827_activity_diagram
20190827_activity_diagram20190827_activity_diagram
20190827_activity_diagram
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
20161220 - microservice
20161220 - microservice20161220 - microservice
20161220 - microservice
 
20160217 - Overview of Vortex Intelligent Data Sharing Platform
20160217 - Overview of Vortex Intelligent Data Sharing Platform20160217 - Overview of Vortex Intelligent Data Sharing Platform
20160217 - Overview of Vortex Intelligent Data Sharing Platform
 
20151111 - IoT Sync Up
20151111 - IoT Sync Up20151111 - IoT Sync Up
20151111 - IoT Sync Up
 
20151207 - iot strategy
20151207 - iot strategy20151207 - iot strategy
20151207 - iot strategy
 
20141210 - Microservice Container
20141210 - Microservice Container20141210 - Microservice Container
20141210 - Microservice Container
 
20161027 - edge part2
20161027 - edge part220161027 - edge part2
20161027 - edge part2
 

Recently uploaded

A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 

Recently uploaded (20)

A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 

Applying UML and Patterns (CH1, 6, 9, 10)

  • 1. Applying UML and Patterns 2017/01/11 Taka Wang
  • 3. Owning a hammer doesn't make one an architect Knowing an object-oriented language (such as Java) is a necessary but insufficient first step to create object systems. Knowing how to "think in objects" is also critical. The UML is not OOA/D or a method, it is simply notation. How should responsibilities be allocated to classes of objects? How should objects interact? What classes should do what? These are critical questions in the design of a system.
  • 4. What Is Analysis and Design Design emphasizes a conceptual solution that fulfills the requirements, rather than its implementation. Ultimately, designs can be implemented. => Do the thing right. Analysis emphasizes an investigation of the problem and requirements, rather than a solution. It is a broad term, best qualified, as in requirements analysis (an investigation of the requirements) or object analysis (an investigation of the domain objects). => Do the right thing.
  • 5. What Is Object-Oriented Analysis and Design OOD: Defining software objects and how they collaborate to fulfill the requirements. Ex. Book software object may have a title attribute and a getChapter method. OOA: Finding and describing the objects - or concepts - in the problem domain. Ex. Book, Library, Patron. (跟 Software object 無關)
  • 7. 這不是OO的產出,只是寫故事。 Play a Dice Game: A player picks up and rolls the dice. If the dice face value total seven, they win; otherwise, they lose.
  • 8. Define a Domain Model ● Object-oriented analysis is concerned with creating a description of the domain from the perspective of classification by objects. A decomposition of the domain involves an identification of the concepts, attributes, and associations that are considered noteworthy. (分類法,找出概念、屬性跟關 係) ● A domain model is not a description of software objects; it is a visualization of concepts in the real-world domain. (真實世界的概念)
  • 12. 因為 play message 是丟給 DiceGame,所以 DiceGame 需要有 method play 而 Die Class 需要 roll 跟 getFaceValue 兩個方法 描述 Class 而不是真實世界
  • 13. 使用UML的三種角度 1. Conceptual perspective the diagrams are interpreted as describing things in a situation of the real world or domain of interest. 2. Specification (software) perspective the diagrams (using the same notation as in the conceptual perspective) describe software abstractions or components with specifications and interfaces, but no commitment to a particular implementation (for example, not specifically a class in C# or Java). <<實務上不常用>> 3. Implementation (software) perspective the diagrams describe software implementations in a particular technology (such as Java).
  • 14. 三種角度的範例 domain concepts or conceptual classes design classes
  • 16. Use Cases Use cases 是文字的故事,不是 Diagrams Process Sale: A customer arrives at a checkout with items to purchase. The cashier uses the POS system to record each purchased item. The system presents a running total and line-item details. The customer enters payment information, which the system validates and records. The system updates inventory. The customer receives a receipt from the system and then leaves with the items. 什麼故事:Some actor using a system to meet goal.
  • 17. Definition: Actors, Scenarios and Use Cases ● An actor is something with behavior, such as a person (identified by role), computer system, or organization; for example, a cashier. ● A scenario is a specific sequence of actions and interactions between actors and the system; it is also called a use case instance. ● A use case is a collection of related success and failure scenarios that describe an actor using a system to support a goal.
  • 18. Scenarios example - Handle Returns (退貨處理) Main Success Scenario: A customer arrives at a checkout with items to return. The cashier uses the POS system to record each returned item ... Alternate Scenarios: If the customer paid by credit, and the reimbursement (退款) transaction to their credit account is rejected, inform the customer and pay them with cash. If the item identifier is not found in the system, notify the Cashier and suggest manual entry of the identifier code (perhaps it is corrupted). If the system detects failure to communicate with the external accounting system, ...
  • 19. Use Cases 討論 ● Use Cases 是文字故事 ● Use Cases 跟物件導向沒有關係,寫下 Uses Cases 並不是在做OOA ● Use Cases are a key requirements input to classic OOA/D ● Use Cases emphasize the user goals and perspective (User-centric) “Who is using the system, what are their typical scenarios of use, and what are their goals?” (誰在什麼情境使用此系統,為了完成什麼事情)
  • 20. 三種 Actors Primary actor: has user goals fulfilled through using services of the system. < 收銀員> Why: To find user goals, which drive the use cases. Supporting actor: provides a service (ex. information) to the system. <自動付款 認證服務> Why: To clarify external interfaces and protocols Offstage actor: has an interest in the behavior of the use case. <稅務局> Why: To ensure the all necessary interests are identified and satisfied.
  • 21. 三種常見的UC格式 Brief:通常是 main success scenario (抓個主題與範圍的感覺) Casual: 前面的退款範例 (多個scenarios) Fully dresses:所有步驟與變形的完整描述 (通常選10%有價值的UC來寫)
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Guidelines 1. Write in an Essential UI-Free Style (Root-goal, keep the user interface out and focus on actor intent) 2. Write Terse Use Cases (刪掉贅詞) 3. Write Black-Box Use Cases (不考慮內部的運作,只在乎系統的 responsibilities,What 而不是 How) 4. Take an Actor and Actor-Goal Perspective 5. How to Find Use Cases 6. What Tests Can Help Find Useful Use Cases
  • 28. 3. Write Black-Box Use Cases
  • 29. 4. Take an Actor and Actor-Goal Perspective Write requirements focusing on the users or actors of a system, asking about their goals and typical situations. Focus on understanding what the actor considers a valuable result.
  • 30. 5. How to Find Use Cases 1. 選擇 system boundary (大框框) 2. 找出所有的 primary actors 3. 找出每個 primary actor 的 Goal 4. Define User Cases satisfy the goals of the primary actors Actor-Goal List
  • 33. 5.4 Define Use Cases ● 一個 Goal 寫一個 Use Case <CRUD例外> ● Use Case 的名稱類似 Goal : ○ Goal: process a sale ○ Use Case: Processs Sale ● Use Case 從動詞開始
  • 34. 6. What tests can help find useful use cases 1. The Boss Test 2. Elementary Business Process (EBP) Test: A task performed by one person in one place at one time, in response to a business event, which adds measurable business value and leaves the data in a consistent state 3. The Size Test:3~10 steps
  • 35. Use Case Diagram UC:畫圖還有畫線是次要的,文字 描述才是重點 畫 Use Case Diagram時,一併寫 下 actor-goal 清單 不要花超過一小時在這張圖上
  • 36. Use Case Diagram 的繪製建議
  • 37. CH9. USE-CASE MODEL: Drawing system sequence diagrams
  • 38. System Sequence Diagram Clarify the input and output system events related to our system System Sequence Diagrams: ● 一個特定的scenario,所有 系統都當作黑盒子 ● actor generate events ● 重點在抓出從 actor 穿越 system boundary 的 Event UC已經描述外部的actor怎麼跟系統互動
  • 39. SSD for a Process Sale scenario Simple cash-only success scenario of Process Sale
  • 40. SSDs and Use Cases SSD 是從 UC 導出來的 後面有過程
  • 42. Naming System Events and Operations ● System Event 應該表達出 intent,而不是從什麼媒介 (按 鈕) ● 從動詞出發比較好, 命令導向
  • 43. 加上文字描述 (從 UC 抓過來) ● operations ● parameters ● return data 簡短就好
  • 44. CH 10. Domain Model Visualizing Concepts
  • 45. Domain Model, aka. Conceptual Model A domain model is a visual representation of real-world conceptual classes, not of software components in a domain of interest. It is not a set of diagrams describing software classes, or software objects with responsibilities. - domain objects or conceptual classes - associations between conceptual classes - attributes of conceptual classes Class Diagram 只用這些
  • 46. Domain Model example Domain model is a visual dictionary of abstractions
  • 47. Relate to Domain-Driven Design (DDD) Ubiquitous Language
  • 48. Domain Model 不是在 Model Software Component 不要出現這些 ● Software artifacts, such as a window or a database, unless the domain being modeled is of software concepts, such as a model of graphical user interfaces. ● Responsibilities or methods
  • 49. Conceptual Class Identification ● The central task is to identify conceptual classes related to the scenarios under design. ● It is better to overspecify a domain model with lots of fine-grained conceptual classes than to underspecify it. 1. Use a conceptual class category list 2. Identify noun phrases 3. Analysis patterns [Fowler96] <<Transaction Pattern>> 尋找的策略
  • 52. Domain Modeling Guidelines 1. List the candidate conceptual classes using the Conceptual Class Category List and noun phrase identification techniques related to the current requirements under consideration. 2. Draw them in a domain model. 3. Add the associations necessary to record relationships for which there is a need to preserve some memory. 4. Add the attributes necessary to fulfill the information requirements.
  • 53. Common Mistake Perhaps the most common mistake when creating a domain model is to represent something as an attribute when it should have been a concept. If we do not think of some conceptual class X as a number or text in the real world, X is probably a conceptual class, not an attribute. 如果還是不確定,將它當作 concept,domain model 中很少有attribute
  • 56. From analysis to design Use Case SSD Domain Model Design Model use case diagram and descriptions sequence diagram conceptual class diagram (state diagram) class diagram