Introduction to Lightning Web Runtime (LWR)

 Lightning Web Runtime



Introduction:

This new technology's primary focus is on its performance and adaptability. LWR websites are more developer-friendly and faster than aura components. Using the Lightning Web Runtime (LWR), you can create digital experiences that meet the high scale, security, and performance requirements of modern online applications. In the end, LWR is a neutral method for configuring and loading the necessary JavaScript modules, services, and dependency providers. You can deploy on a variety of runtime environments based on your use case. LWR, for example, runs in a local Node.js runtime or a standalone Heroku instance.

Architecture of LWR:

Image Source: Google | Image By: Salesforce

The framework and user interface layer is static when you publish an LWR site, resulting in quicker page loads for visitors. The Salesforce content delivery network (CDN) stores all static content once it has been compiled during the first site build, which brings the data closer to the user and speeds up site delivery.

It dynamically uses the lightning web component for the aura component. meaning that every time a page loads data, the site must download fresh information about components. The performance is being slowed down as a result.

Therefore, LWR is 3x faster than Aura runtime as compare for the same site load.

Performance of LWR


When to use LWR:

The speed and adaptability of the LWR frameworks make them ideal for large websites that must successfully scale. This brand-new LWR contains few pre-made and templated components. If your use case calls for a comprehensive set of components that have already been built, you might want to consider sticking with Aura templates for the time being.

Developer training is frequently required for component creation. If your use case is more open-ended or if you want to design unique components, LWR might become your new best friend.

In any case, if you want to make your own individual components, we recommend using the Lightning Web Components (LWC) development model, which is compatible with both LWR and Aura websites.


Create a LWR site:

  1. From Setup, type Digital Experiences in the Quick Find box, choose All Sites and then click New.
  2. Choose Build Your Own (LWR) and click Get Started in the site creation wizard
  3. Enter a base URL value and a name. When you enabled Digital Experiences, you created a domain that now has the basic URL value. For instance, if you’re constructing a partner site and your domain name is UniversalTelco.my.site.com, you can enter partners to create the distinct URL UniversalTelco.my.site.com/partners.
  4. Press Create. The Experience Workspaces area becomes visible when you create your site.

LWR Limitations:

The following items are unavailable :
  • The majority of the standard pages and components that come with aura templates include object pages and record components.
  • The navigation menu element by default. However, you can create your own.
  • Rendering is progressive.
  • Theme management and out-of-the-box themes.
  • Multilingual websites with component attributes that can be translated.
  • Right-to-left languages
  • Accessibility features at the template level, like a skip link.
  • Value-added mobile service providers like Browser.
  • Deploying a change set.
  • Configuration of contributors.
  • Optimizer for the Salesforce community page.

Conclusion

  • The new LWR template introduced in Spring 21, gives the developers flexibility to create pixel-perfect sites. 
  • The LWR sites make heavy use of caching to improve performance and scalability on the live site. 
  • The template is a barebones template since it only supports standard LWC components and a limited set of standard pages. 
  • The template is best suited for developers who are comfortable developing Lightning web components and working with Salesforce DX, User Interface API, and Apex.
Thanks

Keep Reading.
Next Post Previous Post
No Comment
Add Comment
comment url