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

Chapter 3. Understanding Pattern Variations > Variation via inheritance

Variation via inheritance

Variations via custom extensions can be hard work. You're breaking new ground, even if (hopefully) a number of the pieces your new solution touches are components in other, regular patterns. A way that gains more leverage from reuse can be through the use of generalization/specialization. But let's try and get some language barriers out of the way first:

  • In traditional data modeling terms, we speak of supertypes and subtypes. The supertypes typically define what attributes and relationships are common for all of its subtypes. The subtypes define what is distinct for them.

  • In the OO world, we have superclasses and subclasses, or generalizations and specializations. The association between them is often referred to as an inheritance association.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

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

  

Start a Free Trial


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