0-Introdution

Embed Size (px)

DESCRIPTION

0-Introdution

Citation preview

  • 1

    OBJECT ORIENTED DESIGN

    Nguyn Th T Mi

    Email: [email protected]

  • Gii thiu mn hc

    Tn mn hc: Thit k hng i tng

    Tn ting Anh: Object-oriented Design

    M mn hc: 214352

    S tn ch: 4

    Mn hc: Bt buc

    Cc mn hc tin quyt: Lp trnh c bn

    Cc mn hc trc: Lp trnh nng cao

    2

  • Mc tiu ca mn hc

    Sau khi hon tt hc phn, sinh vin c th :

    Nm bt cc khi nim c bn, cc nguyn l v quy trnh

    thit k hng i tng

    Nm bt, c hiu ti liu v phn loi cc mu thit k

    thng dng.

    Nhn din, thit k v p dng cc mu thit k thch hp

    vo bi ton c th.

    Nng cao k nng lp trnh thng qua cc bi tp thc

    hnh.

    Phn b thi gian:

    Ln lp: 45 tit

    Thc hnh: 30 tit 3

  • Ni dung chi tit mn hc

    Phn 1: Cc khi nim c bn trong hng i

    tng

    Phn 2: Quy trnh pht trin phn mm.

    Phn 3: Gii thiu cc nguyn l thit k v mu

    thit k

    Phn 4: Cc mu thit k

    Cc mu to i tng

    Cc mu cu trc

    Cc mu ng x

    Mu MVC

    4

  • Phn 1: Cc khi nim c bn trong hng i tng

    Tru tng ha.

    i tng v lp.

    Tnh ng gi.

    Tnh k tha.

    Tnh a hnh.

    Interface.

    Package

    Quan h:

    Quan h kt hp (Association), Quan h thu np (Aggregation), Bn s v chiu.

    Quan h ph thuc (Dependency).

    Quan h tng qut ha (Generalization).

    5

  • Phn 2: Quy trnh pht trin phn mm.

    Cc bc c bn trong quy trnh pht trin phn mm:

    Phn tch, Thit k, Ci t

    Use case v k thut phn tch yu cu bng use case

    Thit k hng use case

    Xc nh lp

    Xc nh trch nhim ca lp dng CRC Cards

    Xc nh quan h gia cc lp

    Sequence Diagrams

    State Diagrams

    Case Study

    6

  • Phn 3: Gii thiu cc nguyn l thit k v mu thit k

    Cc nguyn l ca thit k hng i tng

    Encapsulate what varies

    Favor Composition Over Inheritance

    Program To An Interface, Not An Implementation

    (OCP) The Open Closed Principle

    (LSP) The Liskov Substitution Principle

    (SRP) The Single Responsibility Principle

    (DIP) The Dependency Inversion Principle

    (ISP) The Interface Segregation Principle

    Gii thiu mu thit k

    Phn loi cc mu v mi lin h gia cc mu

    Cc mu to

    Cc mu cu trc

    Cc mu ng x

    7

  • Phn 4: Cc mu thit k

    Cc mu to i tng

    Mu Factory Method

    Mu Abstract Factory

    Mu Builder

    Mu Prototype

    Mu Singleton

    Cc mu cu trc

    Mu Adapter

    Mu Composite

    Mu Decorator

    Mu Bridge

    Mu Faade

    Mu Flyweight

    Mu Proxy

    8

  • Phn 4: Cc mu thit k

    Cc mu ng x

    Strategy

    State

    Observer

    Template Method

    Iterator

    Command

    Visitor

    Mediator

    Memento

    Interpreter

    Chain of Responsibility

    Mu MVC

    Cc thnh phn: Model, View, Controller

    T hp cc mu hin thc mu MVC 9

  • Hc liu

    Gamma, Helm, Johnson, Vlissides, Design Patterns: Elements of

    Reusable Object-Oriented Software, (also known as Gang of Four book),

    Addison-Wesley, 1994

    Eric Freeman and Elisabeth Freeman, Head First Design Patterns,

    O'Reilly, 2004

    Rebecca Wirfs-Brock, Brian Wilkerson, Lauren Wiener, Designing Object-

    Oriented Software, Prentice-Hall, 2000.

    Stephen Stelting, Olav Maassen, Applied Java Patterns, Prentice-Hall,

    2001.

    Mark Grand, Patterns in Java, John Wiley & Sons, 2002.

    Rebecca Wirfs-Brock, Alan McKean, Object Design: Roles,

    Responsibilities, and Collaborations, Addison Wesley, 2002.

    10

  • Cch nh gi

    Thang im:

    im cui k: 60%

    im bi tp: 20%

    im gia k: 20%

    11