Components are reusable sections of the UI and can range in granularity from a single line of text to an entire app. Components interact with each other by listening to or firing events.
Use the Lightning Component framework to develop dynamic Web apps for mobile and desktop devices. It’s a modern framework for building single-page applications engineered for growth.
For more information, see the Lightning Components Developer’s Guide.
There are many benefits of using the framework.
- Out-of-the-Box Component Set
- Comes with an out-of-the-box set of components to kick start building apps. You don't have to spend your time optimizing your apps for different devices as the components take care of that for you.
- Intelligently utilizes your server, browser, devices, and network so you can focus on the logic and interactions of your apps.
- Event-driven architecture
- Uses an event-driven architecture for better decoupling between components. Any component can subscribe to an application event, or to a component event they can see.
- Faster development
- Empowers teams to work faster with out-of-the-box components that function seamlessly with desktop and mobile devices. Building an app with components facilitates parallel design, improving overall development efficiency.
- Components are encapsulated and their internals stay private, while their public shape is visible to consumers of the component. This strong separation gives component authors freedom to change the internal implementation details and insulates component consumers from those changes.
- Device-aware and cross browser compatibility
- Apps are responsive and provide an enjoyable user experience. The Lightning Component framework supports the latest in browser technology such as HTML5, CSS3, and touch events.
The beta version of Lightning components has some known limitations.
- Force.com Canvas Apps Don’t Work in Salesforce1 if Lightning Components are Enabled
- Limited Set of Out-of-the-Box Components
- The beta includes a very limited set of components.
- Namespace Prefix Required
- Your organization must have a namespace prefix required to develop Lightning components.
Open Source Aura Framework
The Lightning Component framework is built on the open source Aura framework. Aura is open sourced at https://github.com/forcedotcom/aura. You can build general-purpose Web apps hosted on your own server. Your apps can be completely independent of Salesforce and your data in Salesforce.
Note that the open source Aura framework has features and components that are not currently available in the Lightning Component framework. We are working to surface more of these features and components for Salesforce developers.