I presentation

556 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
556
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

I presentation

  1. 1. DESIGN PATTERN
  2. 2. Apa itu Design Pattern ?? • Design pattern adalah solusi yang digunakan untuk menyelesaikan masalah-masalah umum yang ditemukan dalam design perangkat lunak. • Design pattern berupa template • Design pattern bukan termasuk algoritma
  3. 3. Jenis-jenis Design Pattern • Creational Patterns: 1. Abstract Factory 2. Builder 3. Factory Method 4. Prototype 5. Singleton
  4. 4. Jenis-jenis Design Pattern(cont.) • Structural Patterns: 1. Adapter 2. 3. 4. Bridge Composite Decorator 5. Facade 6. 7. Flyweight Proxy
  5. 5. Jenis-jenis Design Pattern(cont.) • Behavioral Patterns: 1. Chain of Responsbility 2. Command 3. 4. 5. 6. Interpreter Iterator Mediator Mementto 7. Observer 8. 9. 10. 11. State Strategy Template Method Visitor
  6. 6. Singleton Design Pattern Singleton artinya satu class hanya boleh mempunyai satu instance selama aplikasi berjalan
  7. 7. Singleton Pattern (problem)
  8. 8. Singleton Pattern(problem)
  9. 9. Singleton Pattern
  10. 10. Singleton Pattern
  11. 11. Factory Pattern When we use it? • When our object or component setup involves a high level of complexity • When we need to easily generate different instances of objects depending on the environment we are in • When we're working with many small objects or components that share the same properties • When composing objects with instances of other objects that need only satisfy an API contract (aka, duck typing) to work. This is useful for decoupling.
  12. 12. Factory Pattern
  13. 13. Factory Pattern Problem
  14. 14. Factory Pattern Solution
  15. 15. Facade Pattern Adalah objek yang menyediakan interface yang telah sederhana dari deretan kode yang sangat besar
  16. 16. Facade Pattern (Problem)
  17. 17. Facade Pattern
  18. 18. Adapter Design Pattern Intinya menyederhanakan interface
  19. 19. Adapter Pattern (problem) postToW all
  20. 20. Adapter Pattern
  21. 21. Adapter Pattern
  22. 22. Observer Pattern Konsep Utama dari Obserever Pattern adalah saat terdapat kelas tertentu (Observer) yang perlu mengetahui aktifitas dari kelas lain (Subject)
  23. 23. Observer Pattern Observer
  24. 24. Command Pattern Subject
  25. 25. Observer Pattern client
  26. 26. Command Pattern Intent • Encapsulate a request in an object • Allows the parameterization of clients with different requests • Allows saving the requests in a queue
  27. 27. Command Pattern Implementation
  28. 28. Command Pattern

×