Developing Salesforce Lightning Web Components

In mid-2020 we started a project to build small Salesforce components that could be added to any application or even a registration page. That project has grown to include twelve components currently in production and many more on the way. We publish the components on the AppExchange for free so any Salesforce administrator can install them into their org to try them out. Our team builds components that are utilities that can help us on a daily basis, or complement our other work in some way.

Developing Salesforce Lightning Web Components

Lightning Web Components

There are a few approaches we could take to build components like these, but we wanted to take advantage of the newer Lightning web component architecture. It uses JavaScript, HTML, CSS, and the Lightning Design System. When we need to access custom and standard object definitions or build and call REST APIs, we use the Salesforce Apex programming language.

Lightning web components are a powerful tool because they present data to the client in a dynamic and reactive way. Most components are designed to directly support the Salesforce users who will be interacting with them. This approach allows our team to build for desktop and mobile with very few differences in the code structure. And the Lightning Design System is crucial for designing and developing a UI that is consistent with the rest of the Salesforce experience and is easy for the end-user to understand.

Even though all the components are “components”, some of them could be classified as “sub-components”, meaning that one could be nested and work inside another. This allows the team to distribute tasks better and work more efficiently. It also allows the components to be scalable and to add more features to a single component. It also has the advantage of making the work neater: the code is more organized as each component has its own functionality. 

 

Customer-centered Logic

When creating a component that runs in a complex environment like Salesforce, we want to be sure to minimize the number of interactions with the server. Customer-centered logic helps us reduce response time and to create elements that interact with the client faster. This approach lets the server delegate many of its responsibilities to the browser. Since it acts as a controller, all the user’s logic is handled by the browser.

Developing in this way requires a disposable cache that stores data locally, reducing the response time. The approach is called a “View-Controller-Controller-Model” because it has both a server-side and a client-side controller. Other frameworks such as Visualforce do not interact as quickly with the customer because they continuously consult the backend and request information and/or approvals. They depend 100% on the server. The server has to handle all the user’s requests and analyze what the user needs, then access the database, answer the question, and then render the page for the user. Not very efficient.

 

Component Ideas

The process of building a Lightning Web Component starts with a brainstorming session. Once all the ideas have been discussed, the team does a reality-check and chooses the most Lightning web component-friendly options. Then a team is designated to research available APIs on the market and determine which libraries they need. It’s only at that stage that we determine if it is feasible to develop that new component. If it is, a designer then creates a sketch with the layout, titles, logo, and color palette, and the development team starts building the components and Apex classes. 

We currently have three Lightning web components published on the AppExchange, including Oktana Calendar and Oktana Youtube, with more components already in the security review process. It takes time for the Salesforce security team to complete their review and approve any app or component, and that review process has become even more rigorous recently. We’re excited to share with you our new components as they’re approved and published on the AppExchange. Keep an eye on this blog or check our Salesforce AppExchange listings page.

 

Okta and Oktana: Working Together

At Oktana, we’re proud of the work we’ve done and the companies we’ve had the opportunity to work with. Our goal with this blog is to share some of the work we’ve been doing and in turn highlight the things that make us good partners for those that may need help in the Salesforce space. One of our most recent partners -Okta- is one we’d like to highlight. Okta fast-growing technology company with a strong emphasis on enterprise security. Its focus is on the development of single sign-on systems for enterprise clients that allow users to log in to a number of services, including Gmail, Salesforce, and Slack all with one username and password. The success Okta has been experiencing has led to our partners so that we can assist them in their growth and capture key processes needed for such growth to be as smooth as possible.

Okta needed a partner to supplement its internal development team to achieve greater bandwidth, higher quality, and faster development cycles. In the process, we’ve become a part of Okta’s team and integrated ourselves into their workflow acting almost as an extension of the existing engineering team. Working together on projects with a goal of acting like one team even in an environment where everyone is collocated is something we’ve been doing for a long time. We can do it and we can do it really well. One of the key factors in the decision-making process that gravitated Okta to Oktana was the appreciation for transparency, honesty, and integrity when critically examining the work to be done and recognizing as a team the challenges we may face along the way as well as their solutions.

With that goal in mind, we have been working closely on a number of different projects. The biggest being an important refactoring exercise of their entire codebase. As mentioned earlier, growth is occurring so fast that they need to improve logic and code across the board is imperative to their ability scale. Oktana has become the face of this effort by spearheading improvements and encouraging the adoption of best practice principles that will lower maintenance costs and leverage Salesforce release improvements better.

This type of customer engagement is one that fits perfectly into our wheelhouse. The key elements of this project that we want to highlight are:

  • Apex/Visualforce
  • Salesforce Lightning and Lightning Components
  • Salesforce CPQ
  • Agile
  • Velocity
  • Quality
  • Transparency
  • Integrity
  • Honesty

Beyond our specific project described in this blog post, we’re also supporting Okta by helping improve its internal development processes. With the refactoring exercise, we’ve been slowly and subtly making the development process smoother and more streamlined for their team and helping them improve their scrum process as well. We are honored to get the chance to help an amazing organization such as Okta and hope we continue helping others in this same capacity.

If you are a Salesforce partner looking to partner with experts to help you provide the best custom app development solutions to your clients Contact us. Our team will give you more information about these services.