• Mindscape ๐Ÿ”ฅ
    • Playlist ๐ŸŽง
  • ๐Ÿค– Artifical Intelligence

    • 1. Basics; Linear Algebra
    • 2. Basics; Linear Algebra (2), Search (1)
    • 3. Search (2)
    • 4. Knowledge and Logic (1)
    • 5. Knowledge and Logic (2)
    • 6. Probability
    • 7. Information Theory
    • 8. Probabilitc Reasoning (2)
    • 9. Probabilitc Reasoning (3)
    • 10. Machine Learning (1)
    • 11. Machine Learning (2)
    • 12. Machine Learning (3)
    • 13. Linear Models
    • 14. Other Classic ML Models (1)
    • 15. Other Classic ML Models (2)
  • ๐Ÿ”’ Computer Security

    • 01. Overview
    • 02. ์ •๋ณด๋ณด์•ˆ์ •์ฑ… ๋ฐ ๋ฒ•๊ทœ
    • 03. Cryptographic Tools
    • 04. User Authentication
    • 05. Access Control
    • 06. Database Security
    • 07. Malicious Software
    • 08. Firmware Analysis
  • ๐Ÿ—„๏ธ Database System

    • 1. Introduction
    • 2. Relational Model
    • 3. SQL
    • 6. E-R Model
    • 7. Relational Database Design (1)
    • 7. Relational Database Design (2)
    • 13. Data Storage Structures
    • 14. Indexing
    • 15. Query Processing
  • ๐Ÿ“ Software Engineering

    • 2. Introduction to Software Engineering
    • 3. Process
    • 4. Process Models
    • 5. Agile
    • 6. Requirements
    • 7. Requirements Elicitation and Documentation
    • 8. Architecture
    • 9. Unified Modelling Language
    • 10. Object-Oriented Analysis
    • Object-Oriented Design
  • ๐Ÿง  Algorithm

    • Python ์‹œ๊ฐ„ ์ดˆ๊ณผ ๋ฐฉ์ง€๋ฅผ ์œ„ํ•œ ํŒ
    • C++ std::vector ์‚ฌ์šฉ๋ฒ• ์ •๋ฆฌ
    • Vim ์‚ฌ์šฉ ๋งค๋‰ด์–ผ
    • 1018๋ฒˆ: ์ฒด์ŠคํŒ ๋‹ค์‹œ ์น ํ•˜๊ธฐ
    • 1966๋ฒˆ: ํ”„๋ฆฐํ„ฐ ํ

10. Object-Oriented Analysis

ํ•™์Šต ๋ชฉํ‘œ

  • Domain์˜ ํ•ต์‹ฌ ์ถ”์ƒํ™”๋ฅผ ์‹๋ณ„ํ•˜๊ณ  domain model๋กœ ๋ชจ๋ธ๋ง
  • System ๋‚ด ํ•ต์‹ฌ ์ƒํ˜ธ์ž‘์šฉ ์‹๋ณ„ ๋ฐ system sequence diagram์œผ๋กœ ๋ชจ๋ธ๋ง
  • Low representational gap ์„ค๊ณ„ ์›์น™์˜ ์žฅ์  ๋ฐ ํ•œ๊ณ„ ๋…ผ์˜

From Requirements to Code

alt text

From Problem to Solution

  • Problem Space (Domain Model)
    • ์‹ค์ œ ์„ธ๊ณ„์˜ ๊ฐœ๋…
    • ์š”๊ตฌ์‚ฌํ•ญ, ๊ฐœ๋…
    • ๊ฐœ๋… ๊ฐ„์˜ ๊ด€๊ณ„
    • ๋ฌธ์ œ ํ•ด๊ฒฐ
    • ์–ดํœ˜ ๊ตฌ์ถ•
  • Solution Space (Object Model)
    • System ๊ตฌํ˜„
    • Classes, objects
    • Objects ๊ฐ„์˜ ์ฐธ์กฐ ๋ฐ ์ƒ์† ๊ณ„์ธต
    • ๊ฒฐ๊ณผ ๊ณ„์‚ฐ
    • ํ•ด๊ฒฐ์ฑ… ์ฐพ๊ธฐ

An Object-Oriented Design Process

  • ๋ฌธ์ œ model / diagram, ๊ฐœ๋… ์ •์˜
    • Domain model (a.k.a. conceptual model), ์šฉ์–ด์ง‘
  • System ๋™์ž‘ ์ •์˜
    • System sequence diagram
    • System behavioral contracts
  • Object ์ฑ…์ž„ ํ• ๋‹น, ์ƒํ˜ธ์ž‘์šฉ ์ •์˜
    • Object interaction diagrams
  • ์ž ์žฌ์  ํ•ด๊ฒฐ์ฑ… model / diagram
    • Object model
  • (ํ๋ฆ„: OO Analysis: ๋ฌธ์ œ ์ดํ•ด -> OO Design: ํ•ด๊ฒฐ์ฑ… ์ •์˜)

A Design Process

  • Object-Oriented Analysis
    • ๋ฌธ์ œ ์ดํ•ด
    • ํ•ต์‹ฌ ๊ฐœ๋…๊ณผ ๊ทธ ๊ด€๊ณ„ ์‹๋ณ„
    • (์‹œ๊ฐ์ ) ์–ดํœ˜ ๊ตฌ์ถ•
    • Domain model (aka conceptual model) ์ƒ์„ฑ
  • Object-Oriented Design
    • Software classes์™€ ๊ทธ ๊ด€๊ณ„๋ฅผ class diagrams๋กœ ์‹๋ณ„
    • ์ฑ…์ž„ (attributes, methods) ํ• ๋‹น
    • Interaction diagrams๋ฅผ ํ†ตํ•œ ๋™์ž‘ ํƒ์ƒ‰
    • ์„ค๊ณ„ ๋Œ€์•ˆ ํƒ์ƒ‰
    • Object model (aka design model) ๋ฐ interaction models ์ƒ์„ฑ
  • Implementation
    • ์„ค๊ณ„๋ฅผ code๋กœ mapping, classes ๋ฐ methods ๊ตฌํ˜„

A High-level Software Design Process

  • Project ์‹œ์ž‘
  • ์š”๊ตฌ์‚ฌํ•ญ ์ˆ˜์ง‘
  • Actors ๋ฐ use cases ์ •์˜
  • ๋ฌธ์ œ model / diagram, objects ์ •์˜
  • System ๋™์ž‘ ์ •์˜
  • Object ์ฑ…์ž„ ํ• ๋‹น
  • Object ์ƒํ˜ธ์ž‘์šฉ ์ •์˜
  • ์ž ์žฌ์  ํ•ด๊ฒฐ์ฑ… model / diagram
  • ํ•ด๊ฒฐ์ฑ… ๊ตฌํ˜„ ๋ฐ test
  • ์œ ์ง€๋ณด์ˆ˜, ๋ฐœ์ „ ๋“ฑ

Domain Models ๋„๋ฉ”์ธ ๋ชจ๋ธ

Object-Oriented Analysis

  • ์š”๊ตฌ์‚ฌํ•ญ์— ๋‚˜์˜ค๋Š” ๋ช…์‚ฌ๋“ค, ์ž์—ฐ์–ด ์šฉ์–ด์ง‘
  • Problem domain์˜ ๊ฐœ๋… ์ฐพ๊ธฐ
    • Real-world abstractions, ๋ฐ˜๋“œ์‹œ software objects๋Š” ์•„๋‹˜
  • ๋ฌธ์ œ ์ดํ•ด
  • ๊ณตํ†ต ์–ดํœ˜ ํ™•๋ฆฝ
  • ๊ณตํ†ต ๋ฌธ์„œํ™”, ํฐ ๊ทธ๋ฆผ
  • Communication์„ ์œ„ํ•จ
  • (๋น„๊ณต์‹์ ์ธ) ํ‘œ๊ธฐ๋ฒ•์œผ๋กœ UML class diagrams๋ฅผ ์ž์ฃผ ์‚ฌ์šฉ
  • ์ถ”ํ›„ classes๋ฅผ ์ฐพ๊ธฐ ์œ„ํ•œ ์ถœ๋ฐœ์  (low representational gap)

Input to the Analysis Process: Requirements and Use Cases

๊ณต๊ณต ๋„์„œ๊ด€์€ ์ผ๋ฐ˜์ ์œผ๋กœ ์ง€์—ญ ์‚ฌํšŒ ์ฃผ๋ฏผ๋“ค์ด ๋Œ€์ถœํ•  ์ˆ˜ ์žˆ๋Š” ๋„์„œ, ์˜ํ™” ๋˜๋Š” ๊ธฐํƒ€ ๋„์„œ๊ด€ ์ž๋ฃŒ๋ฅผ ์†Œ์žฅํ•ฉ๋‹ˆ๋‹ค. ๊ฐ ํšŒ์›์—๊ฒŒ๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ๋„์„œ๊ด€ ๊ณ„์ •๊ณผ ๊ณ„์ • ID ๋ฒˆํ˜ธ๊ฐ€ ๊ธฐ์žฌ๋œ ๋„์„œ๊ด€ ์นด๋“œ๊ฐ€ ๋ฐœ๊ธ‰๋˜๋ฉฐ, ์ด๋ฅผ ํ†ตํ•ด ๋„์„œ๊ด€์—์„œ ๋ณธ์ธ ํ™•์ธ์„ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํšŒ์›์˜ ๋„์„œ๊ด€ ๊ณ„์ •์—๋Š” ํ•ด๋‹น ํšŒ์›์ด ๋Œ€์ถœํ•œ ์ž๋ฃŒ์™€ ๊ฐ ๋Œ€์ถœ ์ž๋ฃŒ์˜ ๋ฐ˜๋‚ฉ ๊ธฐํ•œ์ด ๊ธฐ๋ก๋ฉ๋‹ˆ๋‹ค. ๊ฐ ์ž๋ฃŒ ์œ ํ˜•์—๋Š” ๊ธฐ๋ณธ ๋Œ€์—ฌ ๊ธฐ๊ฐ„์ด ์„ค์ •๋˜์–ด ์žˆ์œผ๋ฉฐ, ์ด๋Š” ์ž๋ฃŒ๊ฐ€ ๋Œ€์ถœ๋  ๋•Œ ๋ฐ˜๋‚ฉ์ผ์„ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค. ํšŒ์›์ด ๋ฐ˜๋‚ฉ์ผ ์ดํ›„์— ์ž๋ฃŒ๋ฅผ ๋ฐ˜๋‚ฉํ•  ๊ฒฝ์šฐ, ํ•ด๋‹น ์ž๋ฃŒ์— ์ง€์ •๋œ ์—ฐ์ฒด๋ฃŒ๋ฅผ ์ง€๋ถˆํ•ด์•ผ ํ•˜๋ฉฐ, ์ด ๊ธˆ์•ก์€ ํšŒ์›์˜ ๋„์„œ๊ด€ ๊ณ„์ •์— ๊ธฐ๋ก๋ฉ๋‹ˆ๋‹ค.

์‚ฌ์šฉ ์‚ฌ๋ก€ ์‹œ๋‚˜๋ฆฌ์˜ค: ๋„์„œ๊ด€ ํšŒ์›์€ ๋„์„œ๊ด€ ์‹œ์Šคํ…œ ํ‚ค์˜ค์Šคํฌ์—์„œ ๋„์„œ๊ด€ ์นด๋“œ๋กœ ๋กœ๊ทธ์ธํ•˜์—ฌ ์ฑ…์„ ๋Œ€์ถœํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํšŒ์›์˜ ๋ฏธ๋‚ฉ ์—ฐ์ฒด๋ฃŒ๊ฐ€ ์—†์Œ์„ ํ™•์ธํ•œ ํ›„, ๋„์„œ๊ด€ ์‹œ์Šคํ…œ์€ ํ•ด๋‹น ๋„์„œ์˜ ๋Œ€์—ฌ ๊ธฐ๊ฐ„์„ ํ˜„์žฌ ๋‚ ์งœ์— ๋”ํ•˜์—ฌ ๋ฐ˜๋‚ฉ ๊ธฐํ•œ์„ ๊ฒฐ์ •ํ•˜๊ณ , ํ•ด๋‹น ๋„์„œ์™€ ๋ฐ˜๋‚ฉ ๊ธฐํ•œ์„ ํšŒ์›์˜ ๋„์„œ๊ด€ ๊ณ„์ •์— ๋Œ€์ถœ ์ž๋ฃŒ๋กœ ๊ธฐ๋กํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Modeling a Problem Domain

  • Domain ์„ค๋ช…์˜ ํ•ต์‹ฌ ๊ฐœ๋… ์‹๋ณ„
    • ๋ช…์‚ฌ, ๋™์‚ฌ, ๊ฐœ๋… ๊ฐ„ ๊ด€๊ณ„ ์‹๋ณ„
    • "System"๊ณผ ๊ฐ™์€ non-specificํ•œ ์–ดํœ˜ ์ง€์–‘
    • Operations์™€ concepts ๊ตฌ๋ถ„
    • Domain ์ „๋ฌธ๊ฐ€์™€ brainstorming

Glossary ์šฉ์–ด์ง‘

  • ํ•ต์‹ฌ ๊ฐœ๋… ์‹๋ณ„ ๋ฐ ์ •์˜
  • ๊ฐœ๋ฐœ์ž์™€ ๊ณ ๊ฐ ๊ฐ„์˜ ๊ณต์œ ๋œ ์ดํ•ด ๋ณด์žฅ

alt text

Visual Notation: UML

  • (UML ํ‘œ๊ธฐ๋ฒ• ์˜ˆ์‹œ ์ด๋ฏธ์ง€)

Reading Associations

  • (์—ฐ๊ด€ ๊ด€๊ณ„(Associations) ์ฝ๊ธฐ ์˜ˆ์‹œ ์ด๋ฏธ์ง€)

Attributes vs. Concepts

  • "์‹ค์ œ ์„ธ๊ณ„์—์„œ ์–ด๋–ค ๊ฐœ๋…์  class X๋ฅผ text๋‚˜ ์ˆซ์ž๋กœ ์ƒ๊ฐํ•˜์ง€ ์•Š๋Š”๋‹ค๋ฉด, ๊ทธ๊ฒƒ์€ attribute๊ฐ€ ์•„๋‹ˆ๋ผ concept์ผ ๊ฐ€๋Šฅ์„ฑ์ด ๋†’์Œ"
  • Type annotations ํšŒํ”ผ

Modeling a Problem Domain

  • Domain model์€ ์‚ด์•„์žˆ๋Š” ๋ฌธ์„œ
  • Communication์„ ์œ„ํ•ด ์‚ฌ์šฉ
  • ์‹ค์ œ ์„ธ๊ณ„ ๊ฐœ๋…์— ์ง‘์ค‘
    • (์˜ˆ: Database ๊ฐ™์€ ์ถ”์ƒ์  ๊ตฌํ˜„ ๊ด€์‹ฌ์‚ฌ ์•„๋‹˜)
  • Methods/operations ์—†์Œ
  • ๊ด€๊ณ„(relationships)์™€ ๋‹ค์ค‘์„ฑ(cardinalities) ํ‘œ์‹œ

Identifying Concepts

  • (๋„์„œ๊ด€ ์‹œ์Šคํ…œ ์˜ˆ์‹œ ํ…์ŠคํŠธ์—์„œ ๊ฐœ๋… ์‹๋ณ„ ์˜ˆ์‹œ - 1์ฐจ)
  • A public library ... collection of books, movies, or other library items ... people living in a community. Each library member ... library account ... library card ... accountโ€™s ID number ... the library. A memberโ€™s library account ... items ... member ... due date ... borrowed item. Each type of item ... default rental period ... itemโ€™s due date ... item. If a member ... item ... itemโ€™s due date, the member ... late fee ... item, an amount of money ... memberโ€™s library account
  • (๋„์„œ๊ด€ ์‹œ์Šคํ…œ ์˜ˆ์‹œ ํ…์ŠคํŠธ์—์„œ ๊ฐœ๋… ์‹๋ณ„ ์˜ˆ์‹œ - 2์ฐจ ์ •์ œ)
  • A public library ... collection of books, movies, or other library items ... Each library member ... library account ... library card ... ID number ... A memberโ€™s library account ... items ... member ... due date ... borrowed item. Each type of item ... default rental period ... itemโ€™s due date ... item. If a member ... item ... itemโ€™s due date, the member ... late fee ... item, an amount of money ... memberโ€™s library account

Hints for Identifying Concepts

  • ์š”๊ตฌ์‚ฌํ•ญ ๋ช…์„ธ ์ฝ๊ธฐ, ๋ช…์‚ฌ ์ฐพ๊ธฐ
  • ๊ธฐ์กด models ์žฌ์‚ฌ์šฉ
  • ๋ฒ”์ฃผ list ์‚ฌ์šฉ
    • ์œ ํ˜•์˜ ์‚ฌ๋ฌผ: cars, telemetry data, terminals ๋“ฑ
    • ์—ญํ• : mother, teacher, researcher
    • ์ด๋ฒคํŠธ: landing, purchase, request
    • ์ƒํ˜ธ์ž‘์šฉ: loan, meeting, intersection ๋“ฑ
    • ๊ตฌ์กฐ, ์žฅ์น˜, ์กฐ์ง ๋‹จ์œ„ ๋“ฑ
  • ์ผ๋ฐ˜์ ์ธ use scenarios ๋ถ„์„, ๋™์ž‘ ๋ถ„์„
  • Brainstorming
  • ๋จผ์ € ์ˆ˜์ง‘; ๋‚˜์ค‘์— ์กฐ์ง, ํ•„ํ„ฐ๋ง, ์ˆ˜์ •

One Domain Model for the Library System

alt text

Notes on the Library Domain Model

  • ๋ชจ๋“  ๊ฐœ๋…์€ ํ”„๋กœ๊ทธ๋ž˜๋จธ๊ฐ€ ์•„๋‹ˆ์–ด๋„ ์ ‘๊ทผ ๊ฐ€๋Šฅ
  • UML ํ‘œ๊ธฐ๋ฒ•์€ ๋‹ค์†Œ ๋น„๊ณต์‹์ . ๊ด€๊ณ„๋Š” ์ข…์ข… ๋‹จ์–ด๋กœ ์„ค๋ช…๋จ
  • ์‹ค์ œ ์„ธ๊ณ„์˜ "is-a" ๊ด€๊ณ„๋Š” domain model์— ์ ํ•ฉ
  • ์‹ค์ œ ์„ธ๊ณ„์˜ ์ถ”์ƒํ™”๋Š” domain model์— ์ ํ•ฉ
  • ๋ฐ˜๋ณต์ด ์ค‘์š”: ์ด ์˜ˆ์‹œ๋Š” ์ดˆ์•ˆ์ž„. ์‹ค์ œ ์„ค๊ณ„์—์„œ๋Š” ์ผ๋ถ€ ์šฉ์–ด ์ˆ˜์ • ๊ฐ€๋Šฅ์„ฑ
    • ์˜ˆ: Item vs. LibraryItem, Account vs. LibraryAccount
  • ์ง‘ํ•ฉ ํƒ€์ž…(Aggregate types)์€ ๋ณดํ†ต ๋ณ„๋„ ๊ฐœ๋…์œผ๋กœ ๋ชจ๋ธ๋ง
  • ๊ธฐ๋ณธ attributes (์ˆซ์ž, ๋ฌธ์ž์—ด)๋Š” ๋ณดํ†ต attributes๋กœ ๋ชจ๋ธ๋ง

Why Domain Modeling?

  • Domain ์ดํ•ด
    • ์„ธ๋ถ€์‚ฌํ•ญ์ด ์ค‘์š”! (์˜ˆ: System์—๊ฒŒ ์ฑ…๊ณผ ๋น„๋””์˜ค๋Š” ๋‹ค๋ฅธ๊ฐ€?)
  • ์™„์ „์„ฑ ๋ณด์žฅ
    • (์˜ˆ: ์—ฐ์ฒด๋ฃŒ๊ฐ€ ๊ณ ๋ ค๋˜์—ˆ๋Š”๊ฐ€?)
  • ๊ณตํ†ต ์šฉ์–ด ์ง‘ํ•ฉ์— ๋™์˜
    • ์˜ˆ: library item vs collection entry vs book
  • ์„ค๊ณ„ ์ค€๋น„
    • Domain concepts๋Š” OO classes์˜ ์ข‹์€ ํ›„๋ณด (-> low representational gap)

Hints for Object-Oriented Analysis (1)

  • Domain model์€ ์–ดํœ˜ ์ œ๊ณต
    • ๊ฐœ๋ฐœ์ž, ํ…Œ์Šคํ„ฐ, ๊ณ ๊ฐ, domain ์ „๋ฌธ๊ฐ€ ๊ฐ„ communication์„ ์œ„ํ•จ
    • ๋‹จ์ผ ์–ดํœ˜์— ๋™์˜ํ•˜๊ณ  ์‹œ๊ฐํ™”
  • Software classes๋‚˜ data๊ฐ€ ์•„๋‹Œ, concepts์— ์ง‘์ค‘
    • ์•„์ด๋””์–ด, ์‚ฌ๋ฌผ, objects
    • ์ด๋ฆ„ ๋ถ€์—ฌ, ์ •์˜ ๋ฐ ์˜ˆ์‹œ ์ œ๊ณต (symbol, intension, extension)
  • ์šฉ์–ด์ง‘(Glossary) ์ถ”๊ฐ€
  • ์ผ๋ถ€๋Š” classes๋กœ ๊ตฌํ˜„๋  ์ˆ˜๋„, ์•„๋‹ ์ˆ˜๋„ ์žˆ์Œ

Hints for Object-Oriented Analysis (2)

  • ๋งŽ์€ ์„ ํƒ์ง€๊ฐ€ ์กด์žฌ
  • Model์ด ์™„๋ฒฝํ•˜๊ฒŒ ์ •ํ™•ํ•˜์ง€ ์•Š์„ ๊ฒƒ์ž„
    • ๊ดœ์ฐฎ์Œ
    • ๋ถ€๋ถ„์ ์ธ model๋กœ ์‹œ์ž‘, ํ•„์š”ํ•œ ๊ฒƒ๋งŒ ๋ชจ๋ธ๋ง
    • ๋‚˜์ค‘์— ์ถ”๊ฐ€ ์ •๋ณด๋กœ ํ™•์žฅ
    • ๋ณ€๊ฒฝ ์‚ฌํ•ญ ๋ช…ํ™•ํžˆ communicate
    • ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด "analysis paralysis(๋ถ„์„ ๋งˆ๋น„)" ์œ„ํ—˜

Domain Model Distinctions

  • VS. data model (solution space)
    • ๋ฐ˜๋“œ์‹œ ์ €์žฅ๋  data๋Š” ์•„๋‹˜
  • VS. object model ๋ฐ Java classes (solution space)
    • ์‹ค์ œ domain concepts๋งŒ ํฌํ•จ (์‹ค์ œ objects ๋˜๋Š” ์‹ค์ œ ์„ธ๊ณ„์˜ ์ถ”์ƒํ™”)
    • "UI frame", database ๋“ฑ ๋ฏธํฌํ•จ

System Sequence Diagram

Understanding System Behavior

  • System sequence diagram: ํ•˜๋‚˜์˜ use scenario์— ๋Œ€ํ•ด, system์˜ ๊ฒฝ๊ณ„(boundary)์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์ด๋ฒคํŠธ ์ˆœ์„œ๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” model
  • ์„ค๊ณ„ ๋ชฉํ‘œ: System์˜ interface ์‹๋ณ„ ๋ฐ ์ •์˜
    • System ์ˆ˜์ค€์˜ ๊ตฌ์„ฑ์š”์†Œ๋งŒ (์˜ˆ: ์‚ฌ์šฉ์ž์™€ ์ „์ฒด system)

One Example for the Library System

  • Use case ์‹œ๋‚˜๋ฆฌ์˜ค: Library member๊ฐ€ library card๋กœ kiosk ๋กœ๊ทธ์ธ ํ›„ ์ฑ… ๋Œ€์ถœ. ์—ฐ์ฒด๋ฃŒ ๋ฏธ๋‚ฉ ํ™•์ธ ํ›„, rental period๋ฅผ ๋”ํ•ด ๋ฐ˜๋‚ฉ ๊ธฐํ•œ ๊ฒฐ์ •. ์ฑ…๊ณผ ๋ฐ˜๋‚ฉ ๊ธฐํ•œ์„ member์˜ account์— ๊ธฐ๋ก alt text

Behavioral Contracts

Formalize System at Boundary

  • System behavioral contract
    • System sequence diagrams์—์„œ ์‹๋ณ„๋œ ํŠน์ • operation์— ๋Œ€ํ•œ pre-conditions์™€ post-conditions ๊ธฐ์ˆ 
    • System ์ˆ˜์ค€์˜ ํ…์ŠคํŠธ ๋ช…์„ธ, software specifications์™€ ์œ ์‚ฌ

System Behavioral Contract Example

  • Operation: borrow(item)
  • Pre-conditions:
    • Library member๊ฐ€ system์— ์ด๋ฏธ ๋กœ๊ทธ์ธํ•จ
    • Item์ด ํ˜„์žฌ ๋‹ค๋ฅธ member์—๊ฒŒ ๋Œ€์ถœ๋˜์ง€ ์•Š์Œ
  • Post-conditions:
    • ๋กœ๊ทธ์ธ๋œ member์˜ account์— ์ƒˆ๋กœ ๋Œ€์ถœ๋œ item ๊ธฐ๋ก, ๋˜๋Š” member์—๊ฒŒ ๋ฏธ๋‚ฉ ์—ฐ์ฒด๋ฃŒ ๊ฒฝ๊ณ 
    • ์ƒˆ๋กœ ๋Œ€์ถœ๋œ item์€ item์˜ rental period + ํ˜„์žฌ ๋‚ ์งœ๋กœ ๊ณ„์‚ฐ๋œ ๋ฏธ๋ž˜์˜ ๋ฐ˜๋‚ฉ ๊ธฐํ•œ ํฌํ•จ

Distinguishing Domain vs. Implementation Concepts

  • Domain-level concepts:
    • ์‹ค์ œ ์„ธ๊ณ„์˜ ์œ ์‚ฌ๋ฌผ(analogue)์„ ๊ฐ€์ง„ ๊ฑฐ์˜ ๋ชจ๋“  ๊ฒƒ
  • Implementation-level concepts:
    • ๊ตฌํ˜„๊ณผ ์œ ์‚ฌํ•œ method ์ด๋ฆ„
    • Programming types
    • Visibility modifiers
    • Helper methods ๋˜๋Š” classes
    • Design patterns์˜ ์‚ฐ์ถœ๋ฌผ

Summary: Understanding the Problem Domain

  • Domain ์ˆ˜์ค€์˜ ํ‘œํ˜„์„ ๊ตฌ์ถ•ํ•˜๋Š” tools ํŒŒ์•…
    • Domain models
    • System sequence diagrams
    • System behavioral contracts
  • ์‹ ์†ํ•˜๊ณ  (๋•Œ๋กœ๋Š”) ์œ ์—ฐํ•˜๊ฒŒ
    • ๋ช…๋ฐฑํ•œ(?) ์„ธ๋ถ€ ์‚ฌํ•ญ ์ƒ๋žต
    • ๋ฐ˜๋ณต, ๋ฐ˜๋ณต, ๋˜ ๋ฐ˜๋ณต...
  • Domain ์ „๋ฌธ๊ฐ€๋กœ๋ถ€ํ„ฐ feedback ๋ฐ›๊ธฐ
    • Domain ์ˆ˜์ค€์˜ concepts๋งŒ ์‚ฌ์šฉ
์ตœ๊ทผ ์ˆ˜์ •: 25. 11. 6. ์˜คํ›„ 12:07
Contributors: kmbzn
Prev
9. Unified Modelling Language
Next
Object-Oriented Design

BUILT WITH

CloudflareNode.jsGitHubGitVue.jsJavaScriptVSCodenpm

All trademarks and logos are property of their respective owners.
ยฉ 2025 kmbzn ยท MIT License