Associate Architecture - jjin-choi/study_note GitHub Wiki

[1] OOP, PPAD, UML - Object-Oriented Programming

Β§ Object-Oriented

  • Object : An object represents an entity with a well-defined boundary and identity that encapsulates state and behavior.

    • state : object 의 μƒνƒœ.
      • represented by attributes and relationship.
      • normally changes over time
    • behavior : object 의 ν–‰μœ„.
      • represented by operation, method, and state machine.
      • modeled by the set of messages which it can respond to.
    • Objects need to collaborate
      • each object is responsible for its own behavior and status.
      • No one object can carry out every responsibility on its own.
      • λͺ¨λ“  object λŠ” 자기 μžμ‹ μ˜ behavior κ³Ό status μ—λ§Œ μ ‘κ·Όν•  수 있기 λ•Œλ¬Έμ— object κ°„ μ†Œν†΅ν•˜κΈ° μœ„ν•΄μ„œλŠ” collaboration, 즉 message passing 이 ν•„μš”ν•˜λ‹€.
  • Class : A class is a description of a set of objects that share the same state and behavior.

    • An object is an instance of a class.
    • Attribute : A named property of a class that describes a range of values which instances of the property may hold.
    • Operation : the implementation of a service which can be requested from any object of the class to affect behavior.
  • Relationship between class and object : A class is an abstract definition of an object.

    • Objects are grouped into classes

    • An object is an instance of a class

    • Link: Object_Oriented

    • object-oriented

  • Message : A specification of a communication between objects.

    • Conveying information with the expectation that activity will ensue.
    • One object asks another object to perform an operation.
  • Quiz 01. Object 에 λŒ€ν•œ λ‹€μŒμ˜ μ„€λͺ… 쀑 μ˜¬λ°”λ₯Έ 것은?

    • object λŠ” state 와 behavior 쀑 ν•˜λ‚˜λ₯Ό 가진닀.
    • object 의 state λŠ” μ‹œκ°„μ΄ 지남에 따라 λ³€ν•˜μ§€ μ•ŠλŠ” μƒνƒœλ₯Ό μ˜λ―Έν•œλ‹€.
    • object 의 behavior λŠ” μ •ν™•ν•˜κ²Œ ν•˜λ‚˜μ˜ operation 에 μ˜ν•΄μ„œ ν‘œν˜„λœλ‹€.
    • state 정보가 λͺ¨λ‘ 같더라도 두 objects λŠ” λ‹€λ₯Έ objects 이닀.
  • Quiz 02. Class 에 λŒ€ν•œ λ‹€μŒμ˜ μ„€λͺ… 쀑 μ˜¬λ°”λ₯΄μ§€ μ•Šμ€ 것은?

    • Class λŠ” λ‹€μ–‘ν•œ 속성 (Properties) 을 κ°–λŠ” a set of objects 을 ν•˜λ‚˜λ‘œ λ¬Άμ–΄μ£ΌλŠ” description 이닀.
      • λ‹€μ–‘ν•œ 속성이 μ•„λ‹ˆλΌ λ™μΌν•œ 속성을 κ°–λŠ”λ‹€.
    • Class λŠ” object 에 λŒ€ν•œ abstract definition 이닀.
    • Object λŠ” class 의 ν•œ instance 이닀.
    • Class λŠ” objects 을 생성 (creation) ν•˜λŠ”λ° μ‚¬μš©ν•˜λŠ” μΌμ’…μ˜ ν‹€ (template) 이닀.

Β§ Object-Oriented Principles

  • Abstraction

    • "Any model that includes the most important, essential or distinguishing aspects of something while suppressing or ignoring less important, immaterial, or diversionary details. The result of removing distinctions emphasize commonalities." - Dictionary of Object Technology
    • Emphasizes relevant characteristics, but suppresses other characteristics.
  • Encapsulation

    • "Design, produce and describe software so that it can be easily used without knowing the details of how it works"
    • A.k.a. information hiding
  • Inheritance

    • "is a kind of", "is a" relationship
    • A way of organizing classes
    • Also known as generalization
    • Classes with properties in common can be grouped so that their common properties are only defined once.
  • Polymorphism

    • The ability to hide many different implementation behind a single interface.
    • The same word or phrase can mean different things in different contexts
    • Example) In English, a bank can mean side of a river or a place to put money. λ¬Έλ§₯ 상 λ‹€λ₯Έ 의미둜 해석
  • Composition

    • Object composition : "has a" relationship between objects
    • Defined dynamically at runtime by acquiring references to other objects.
    • Does not break encapsulation, because objects are accessed solely through interfaces.
    • Any compatible object can be replaced with another at runtime.

< 사진 μΆ”κ°€ν•˜κΈ° >

Β§ Object-Oriented Development

  • Procedural Programming

    • Organized with procedures (statements changing value of variables)
    • Focusing on data structures, algorithm, and sequences of step
      • μ•Œκ³ λ¦¬μ¦˜κ³Ό 데이터 κ°„μ˜ dependency κ°€ μ—†κΈ° λ•Œλ¬Έμ— μ•Œκ³ λ¦¬μ¦˜μ„ 어디에든 μ‚¬μš©ν•  수 있음.
    • SASD (Structured Analysis & Structured Design) : ꡬ쑰적 뢄석 섀계 방법둠
      • Top-down divide and conquer
      • Data Flow Diagram (DFD) μ‚¬μš©
  • Object-Oriented Programming

    • Organized with objects (data and operation)
    • Object communications : No explicit data flow. only communication sequences among objects
    • OOAD (OOA + OOD)
      • Object-Oriented Analysis : discover the domain concepts/objects, identify requirements (use cases)
      • Object-Oriented Design : define s/w objects (Static model), define how they collaborate to fulfill the requirements (dynamic models)
  • Software (Development) Process Model

    • Waterfall model : systematic & sequential approach

    • Iterative model

    • Agile development : rapid prototyping, development.

      • iterative, incremental, actively involve users to establish requirements
    • Agile manifesto

      • individual > processes and tools
      • working s/w > documentation
      • customer collaboration > contract negotiation
      • responding to change > following a plan
    • Unified Process (UP) : iterative OOAD

      • Risk driven (client, architecture)
      • cycle : inception β†’ elaboration β†’ construction β†’ transition
    • Agile vs Waterfall

  • Quiz 01. OOAD 에 λŒ€ν•œ μ„€λͺ… 쀑 μ˜¬λ°”λ₯΄μ§€ μ•Šμ€ 것은? β†’ λ‹€ λ§žλŠ” 말이긴 ν•˜μ§€λ§Œ, μ •ν™•νžˆλŠ” OOAD λŠ” 개발 방법둠은 μ•„λ‹ˆλ‹€.

    • OOP 을 μœ„ν•œ μ†Œν”„νŠΈμ›¨μ–΄ 개발 방법둠 쀑 ν•˜λ‚˜μ΄λ‹€.
    • OOA λŠ” Domain concepts/objects λ₯Ό μ°ΎλŠ” 단계이닀.
    • OOD λ‹¨κ³„μ—μ„œλŠ” Software object λ₯Ό μ •μ˜ν•œλ‹€.
    • OOD μ—μ„œλŠ” object κ°€ μ„œλ‘œ μ–΄λ–»κ²Œ collaboration ν•˜λŠ”μ§€λ₯Ό μ •μ˜ν•œλ‹€.
  • Quiz 02. UP 기반 OOAD 방법둠에 λŒ€ν•œ μ„€λͺ… 쀑 μ˜¬λ°”λ₯΄μ§€ μ•Šμ€ 것은?

    • Iterative, Incremental 및 Evolutionary ν•œ μ†Œν”„νŠΈμ›¨μ–΄ 개발 방법둠이닀.

    • Risk-driven ν•˜κ³  architecture-centric ν•œ 개발 방법둠이닀.

    • Client λ³΄λ‹€λŠ” Architecture κ΄€μ μ—μ„œ λ°œμƒν•  수 μžˆλŠ” risk λ₯Ό μ€„μ΄λŠ” 것을 μ€‘μš”ν•˜κ²Œ μƒκ°ν•œλ‹€.

      • λ‘˜ λ‹€ λ™μΌν•˜κ²Œ μ€‘μš”ν•˜λ‹€.
    • λͺ¨λ“  λ‹¨κ³„μ—μ„œ use cases κ°€ μ€‘μš”ν•˜κ²Œ μ‚¬μš©λœλ‹€.

      • λͺ¨λ“  phase μ—μ„œ iterative mini waterfall λ‚΄μ—μ„œ λͺ¨λ‘ use cases driven 함.
    • MOF

    • UML 2.0 Diagrams

⚠️ **GitHub.com Fallback** ⚠️