Sunday, June 17, 2012

Decorator (Wrapper) Pattern


  • Introducing the Decorator Design Pattern

http://www.youtube.com/watch?v=Xk8durvtiys&feature=channel&list=UL
wrapper classes
using wrapper classes to avoid changing code continuously


  • Overview of the Decorator Design Pattern

http://www.youtube.com/watch?v=MI_qyfeRk8c&feature=autoplay&list=ULXk8durvtiys&playnext=1


  • Coding the Decorator Design Pattern

http://www.youtube.com/watch?v=HkOdDMePE4Q&feature=autoplay&list=ULMI_qyfeRk8c&playnext=2


  • Executing the Decorator Design Pattern

http://www.youtube.com/watch?v=Ra-33SFHq6M&feature=autoplay&list=ULHkOdDMePE4Q&playnext=3



  • JAVA: Decorator Design Pattern

http://www.youtube.com/watch?v=9FQVs85fZd8&list=UUUvwlMMaeppKPdtAK8PxO8Q&index=2&feature=plcp
also known as wrapper pattern
extends class functionality by delegation
alternative to extending class functionality by inheritance(subclassing)


  • Decorator Pattern

http://www.youtube.com/watch?v=T9kqwyhQP24&feature=related
Structural Design Pattern
attach additional responsibility dynamically
alternative to subclassing  through composite and delegation
object level pattern



  • Java Design Pattern Decorator with Eclipse

http://www.youtube.com/watch?v=k_uTRC7DO68&feature=related




  • Decorator sablonu belirli nesnelerin davranislarini yeni türetilmis siniflar olusturmadan degistirmemizi saglar. 


Siniflarin varsayilan kodlarini degistirmeden  ek
davranislar kazanmasini saglamak için kullanilir.

Bu sekilde her zaman degisen ihtiyaçlarimiza cevap
verebilecek olan siniflari tasarlayabiliriz.


Örnegin; bir GUI bilesenine kenarliklar(border) eklemek
istiyoruz yada kaydirma çubugu (scrollbars) eklemek
istiyoruz.
Bu nesneden iki yeni nesne türeterek bu islemi
yapabiliriz. Bu sekilde yaparsak her nesne için kenarlik
çizdirmek için kenarlik çizimide yapabilen yeni nesneler
türetmemiz gereklidir. Hepsinde yapilan islem kenarlik
çizmedir, buna ragmen tüm kenarliga ihtiyaci olan
bilesenler için yeni siniflar türetmemiz gerekir.
Bu gibi durumlarda Decorator kullanilir


http://members.comu.edu.tr/msahin/courses/ust_duzey_files/patterns/decorator.pdf




  • Decorating Servlet Request Objects

how to apply the Decorator pattern to servlet request objects
how to use the pattern in servlets and lists popular servlet-related projects that use it
http://www.oracle.com/technetwork/articles/entarch/decorators-099517.html






No comments:

Post a Comment