Share Your Experience With Others

Lightning Components Interview Notes Part 1

Lightning Componet Bundle

  • My domain is required to develop LEX components because it will be enable only after creating my domain.
  • Some features of LEX components will not work without my domain.
  • Single Page Application: For example: We have a login page and after login we are redirected to another page so the logic is written into different class for that page so we are not handling all the logic on the same page this is not single page application but in lightning components we develop components which renders the different part of component on the basis of certain conditions. All the logic remain in that components so we can say it’s a SPA.
  • Strongly coupled with Apex for server side calls, data is transferred in JSON format.
  • Responsive design
  • Lightning components are case sensitive.
  • Aura framework is an open source framework developed by SFDC.
  • When to use?
    • Develop SPA
    • Create visual app by simple drag and drop
    • If some functionality is not provided OOTB by SFDC.
  • When not to use?
    • Duplication SFDC OOTB functionality
    • Develop Custom UX which is not consistent with LEX.
    • Re-implementing existing VF pages without considering ROI and level of effort.
  • 8 files are there and there are tightly coupled.
    • Component
    • Controller
    • Helper
    • Style
    • Documentation
    • Renderer
    • Design
    • Svg
  • Component.xml is the only required resource is component bundle.
  • Two JavaScript controllers are there because LEX development follows MVC design pattern and controller handle the events of the components. Helper is there for code reusability.
  • We can’t call one controller function into another controller function but we can call helper function. For example : I need to call apex controller from both the methods of controller so we can reuse the helper function.
  • Rendered: Client side rendering to override default rendering(Pre rendering or Post rendering).
  • Documentation: Contains description, sample code or reference to your component.
  • Design: Enables you to design a form that enables business user to set value attributes in your component using LEX App Builder.
  • The checkboxes while creating a new lightning component will decide where you can deploy or use that component.

Lightning App Builder

  • Simple drag and drop
  • Create Single Page Application Pages
  • Customize Home Pages
  • Customize Record Pages
  • It’s like page layout but instead of fields you will add LEX components.
  • Use CTRL+ SHIFT + R to refresh the cache.

Avoid using HTML Tags:

  • Because standard LEX component automatically use SLDS.
  • Secure and optimized for performance.
  • UI difference is there between HTML tags and LEX button.

Leave a comment