intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Bài giảng Mẫu thiết kế: Design pattern in software development

Chia sẻ: _ _ | Ngày: | Loại File: PPTX | Số trang:39

2
lượt xem
1
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Bài giảng Mẫu thiết kế: Design pattern in software development được biên soạn dành cho sinh viên ngành Công nghệ thông tin và những người quan tâm đến thiết kế phần mềm hiện đại. Tài liệu giúp người học nâng cao khả năng phân tích và lựa chọn mẫu thiết kế phù hợp cho từng bài toán cụ thể. Mời các bạn cùng tham khảo cuốn sách để biết thêm chi tiết!

Chủ đề:
Lưu

Nội dung Text: Bài giảng Mẫu thiết kế: Design pattern in software development

  1. DESIGN PATTERN IN SOFTWARE DEVELOPMENT
  2. “We have a car, but clients want it to run on the rail”
  3. What we have: THE CAR What client wants: A CAR CAN RUN ON THE RAIL
  4. ADAPTER
  5. ADAPTER
  6. “Adapter is like a translator at a meeting, it helps two parties communicate who wouldn't otherwise be able to understand each other.” —Someone Famous
  7. Adapter is a Structural Pattern
  8. Structural Pattern group includes: • Adapter • Bridge • Composite • Decorator • Facade • Private Class Data • Proxy
  9. Adapter allows the interface of an existing class to be used as the interface that client wants.
  10. What we have: THE CAR What client wants: A CAR CAN RUN ON THE RAIL
  11. Adapter can help to allow two incompatible interfaces to work together
  12. Adapter can be used as a wrapper
  13. Adapter can be used when clients want to: • Reuse existing classes but its interface is not compatible with the current code. • Reuse some existing subclasses that lack functionality and cannot be added to parent class.
  14. Class Adapter and Object Adapter
  15. Class Adapter and Object Adapter Class Adapter Object Adapter Use Inheritance to connect Use Composition to connect Adapter and Adaptee Adapter and Adaptee Less flexible More flexible
  16. Adapter can be used when new components or new applications need to be integrated and work together with existing ones.
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
53=>2