The Architecture of LWR (Lightning Web Runtime)
- LWR sites are a package of three primary pieces: an application that runs the site page, a set of plugins, and components that define the user interface.
- The framework and user interface layer is static, so when we publish an LWR site, It results in quicker page loads for visitors. All static content is compiled during the initial site build and then stored in the Salesforce Content Delivery Network (CDN), which brings the data closer to the customers and expedites site delivery.
- The underlying data layer is made up of information from the Salesforce Platform, and that remains dynamic. Business processes, Salesforce records, and other live data are updated in real-time. The result is a website that is up to date with the most relevant information but is not delayed with slow load times.
LWR Can Be Used For The Following Advancements:
- The framework provides speed and versatility, which makes it ideal for high-volume sites that need to scale effectively.
- It has fewer templates and out-of-the-box components. We should consider sticking with Aura templates for the time being if our use case demands a comprehensive set of pre-built components.
- Developer training is frequently required to create components. LWR might become our new companion if the use case is slightly more open-ended.
How To Create An LWR Site:
1. Go to Setup, in the Quick Find box, type Digital Experiences, choose All Sites and then click New.
2. Click on ‘Build Your Own’ (LWR), and click Get Started in the site creation wizard.
3. Enter a name and a base URL value. When Digital Experiences is enabled, a domain is created that now has the essential URL value.
4. Choose an authentication option.
👉 Unauthenticated to build a public site that does not support login or authentication and is open to anyone on the web. This link is not incorporated at the end of the base URL.
👉 Authenticated to build an authenticated site where users can access user-specific data and have login access. This link is incorporated at the end of the base URL.
5. Press Create. The Experience Workspaces area is now visible when we create our site.
- We get the components and pages with Aura templates, including object pages and record components.
- Most pre-configured standard pages, such as Account Management, Knowledge, and Contact Support, are used when creating custom pages.
- The Navigation Menu component is the default, although we can build our own.
- Audiences and page variations.
- Rendering is progressive.
- Out-of-the-box themes and theme management.
- Multilingual sites, including translatable component properties.
- Right-to-left languages.
- Theme export, template, page and Lightning Bolt Solutions.
- Some base features and components from the Lightning Component Library.
- Salesforce Community Page Optimizer.
Lightning Web Runtime (LWR) is a new tool for developers to build powerful web applications. It is designed to be fast, lightweight and easy to use. With LWR, developers can take advantage of the latest web technologies to create rich, interactive applications.