[Component Based] You cannot extend a component, but by using component templates and include files it is possible to share quantities of common code. [Object Oriented] 
You can define a class which extends an existing class, thus inheriting all the properties and methods of that class.