Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

9. Template Method Pattern > Key OOP Concepts used with the Template Method

Key OOP Concepts used with the Template Method

As one of only two design patterns that use inheritance instead of composition in the Behavioral category of design patterns, the Template Method would seem to be a hard sell when it comes to proposing the design pattern as a paragon of good OOP. After all, the second principle put forth by GoF is to favor composition over inheritance. Why even bother with a design pattern that seems to favor inheritance over composition? Further, is the Hollywood Principle unique to the design patterns using inheritance, or is it a general principle usable in both design patterns using composition as well?


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint