---
schema_version: "1"
id: d10a0c69dd8cd9743c10441ca5ecaf7f5425061ce4768b39cc146e1e9ad118ee
title: Using Object-Oriented Development
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/oo/oo-intro.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/oo-intro.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f02dd78843e2a43425f1e748e6c5d398cbb3228d3ba762b8d21402738e1c6f02
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Using Object-Oriented Development

The framework provides the basic constructs of inheritance and encapsulation from object-oriented programming and applies them to presentation layer development.

For example, components are encapsulated and their internals stay private. Consumers of the component can access the public shape (attributes and registered events) of the component, but can't access other implementation details in the component bundle. This separation gives component authors freedom to change the internal implementation details and insulates component consumers from those changes.

Inheritance in Aura components doesn’t work the way it does in Apex or Java. Using inheritance in Aura makes your code harder to understand as the behavior isn’t always intuitive. When possible, use composition instead of inheritance.

-   **[Favor Composition Over Inheritance](https://developer.salesforce.com/docs/platform/aura-platform/guide/oo-favor-composition.md)**  


    Aura supports inheritance, but it favors composition. When possible, use composition.

-   **[What is Inherited?](https://developer.salesforce.com/docs/platform/aura-platform/guide/oo-whats-inherited.md)**  

-   **[Inherited Component Attributes](https://developer.salesforce.com/docs/platform/aura-platform/guide/oo-cmp-attributes.md)**  


    A sub component that extends a super component inherits the attributes of the super component.

-   **[Abstract Components](https://developer.salesforce.com/docs/platform/aura-platform/guide/oo-abstract-cmp.md)**  

-   **[Interfaces](https://developer.salesforce.com/docs/platform/aura-platform/guide/oo-interfaces.md)**  


    Interfaces define a component’s shape by defining attributes, events, or methods that any implementing component contains. To use an interface, a component must implement it. An interface can’t be used directly in markup.

-   **[Inheritance Rules](https://developer.salesforce.com/docs/platform/aura-platform/guide/oo-inheritance-rules.md)**  


