Inheritance and how you might use it

by Adrian on September 4, 2009

Inheritance along with polymorphism, encapsulation and data abstraction is one of the four fundamental concepts of object-orientated programming (OOP). It is typically employed as a code reuse mechanism to build class hierarchies when modelling ‘is-a’ type relationships. Derived, or child classes ‘inherit’ behaviour from their parent class. This behaviour can be modified by ‘overriding’ methods from the parent class or enhanced by adding new methods not present in the parent.

Inheritance is often used to implement both UI and business entity frameworks. UI frameworks are typically responsible for rendering web pages that need to share common functionality such as ‘look and feel’, validation rules and data binding techniques. With business entity frameworks, inheritance can be used to implement fundamental services such as data access, authorisation, authentication, transaction processing, auditing and logging.

Previous post:

Next post: