A Lightning Component bundle consists of four primary sections (there are also Renderer, Design, and SVG sections apart from these four, which we will cover in upcoming chapters):
- Lightning Component Markup file (.cmp) file: This is an XML component definition and consists of HTML markup.
- CSS file (.css): This consists of CSS for the component.
- JavaScript helper and controller (.js): This consists of JavaScript code. The helper file is used to keep all the reusable code for the component.
- Apex controller (.cls): This is not a part of the bundle, but every component that uses Salesforce data uses a server-side controller to fetch and post data to the Salesforce servers.
In the last section of this chapter, we will create a Lightning Component using the Salesforce Developer Console. In Chapter 3, Working with Lightning Component Building Blocks, we will dig deeper into each of these files and explore how to build a functional component for Lightning Experience.