Stabilizing Salesforce Lightning Development With the React Design System

Stabilizing Salesforce Lightning Development With the React Design System

The transition from Salesforce Classic to Lightning has been a rocky road for some Developers. This journey was dramatically stabilized once we adopted the React design system for all front end (FE) Salesforce Lightning user interface (UI) development.

For one, the adoption of React no longer meant we were recruiting and hiring specialized “Salesforce Lightning Developers”, and instead focusing on generalist “React Front End Developers”, which vastly expanded the pool of available Developers.

React adoption has been steadily increasing in the web development ecosystem. In 2019 React reached a critical mass of 57% adoption by all new projects [1] and continues to grow.

No alt text provided for this image

Second, the workflow for React Developers starts in a localhost environment with rapid feedback provided by “hot reloading” components. This is in contrast to a cloud-driven workflow that deploys all changes to the cloud for compilation, testing, and UI layout feedback. "Hot reloading" improves team morale and allows Developers to make lots of small changes quickly.

Third, the one-way data binding nature of React with immutable records made it far simpler to rationalize page rendering flows. No global variables or two-way data binding results in minimal side-effects and more focus on the responsibilities of an individual component. One input and one output.

Fourth, use of Redux for storing state allows for rich user experiences that can leverage “time machine” undo / redo and what-if adjustment scenarios, which are critical features for our Financial Services focused spreadsheet and data grid experiences.

Fifth, the React community is actively involved in unit test automation. Our Front End team selected Jest and works with a variety of other test runners on a daily basis to assert all expected output and minimize regression bugs.

Salesforce requires 75% unit test coverage for backend Apex code, but front end unit tests are currently optional. As an ISV Developer, we strive for unit test coverage parity on both the front and back end.

At the time of this writing, the React design system supported 40 UI blueprints from the Lightning Design System.

No alt text provided for this image

Results

Recruiting decreased from about 90 days to 30 days since the job description was more focused on a readily available market.

Onboarding new Developers decreased from 6 weeks to 2 weeks. Most React Developers immediately recognized the patterns and best practices in place and were immediately productive. Developers were not required to learn Salesforce-specific Lightning or aura framework syntax or practices.

Sprints became far less volatile. Velocity was more consistent. Deliverables were inline with estimates.

No alt text provided for this image

Some enhancements incorporated by our Front End Team:

  • Local installation of json-server running that serves mock API responses.
  • Data Access Object (DAO) tier that serializes all client-server I/O to JSON. This removes all namespace prefixes and custom suffixes from API payloads.
  • Auto lint and pretty formatting upon commit.
  • Selenium macros
  • A custom create-react-app utility for provisioning new React Lightning pages and components

Conclusion

The React design system for Salesforce Lightning is currently open source under a BSD 3 license and actively maintained (link). Any team can use or fork this library for free.

Rather than hiring a specialized full stack "Salesforce Lightning Developer", consider separating the roles into "React Front End (FE) Developer" and "Salesforce Backend (BE) Developer", with the latter being more Salesforce focused and certified. Allow the Front End role to independently contribute as a generalist.

Michael Leach

Intelligent Document Processing (IDP) and Generative AI/GPT for Salesforce

1 年

In retrospective 4 years later, this article and architecture have aged pretty well. We continue to develop and maintain React apps in various managed packages. We've update the React apps to reference the latest SLDS versions about once a year without issue. An upgrade to React stable v18 was completed in 2023. The introduction of Lightning Web Security (LWS) was problematic, as Salesforce auto-enabled this feature for all new orgs without a thorough regression testing of existing Aura and LWC apps. But Salesforce ultimately resolved most of the LWS enablement issues. The ability to recruit generalized React Developers with 2-4 weeks of onboarding to learn SLDS and metadata deployment flows continues to be a huge efficiency gain for us.

回复
Lorena Salamanca Rojas

Backend Developer at Picnic supermarkets

3 年

Hi Michael! Great article, we're on the same road, currently we have a few LWC components but already wondering whether we should explore React in Salesforce. After 2 years since you wrote this, what's your stand now? Can React be used in Salesforce seamlessly? Super curious to know! :)

Jay Janarthanan?

Lead Technical Architect @ CIMSS Innovative Solutions | Salesforce Omnistudio, Snowflake, Data Cloud

5 年

Its all most impossible to be "full stack and good" in Salesforce?

Anil Kumar

Principal Solution Architect

6 年

We migrated our salesforce service classic application to lightning and we did all the front end development using lightning design system so just would like to check what will make the difference if we use react design system

Clint Carvalho

Sr. Salesforce Administrator | Sales Service Community Cloud and CPQ Specialist

6 年

要查看或添加评论,请登录

Michael Leach的更多文章

  • Best of Breed is a Luxury

    Best of Breed is a Luxury

    I was watching a CNBC tech piece on IT spending and the comment was made "Best of Breed is a Luxury"; which was the…

  • Refactoring Web 2.1

    Refactoring Web 2.1

    I’ve been thinking a lot about Web 2.1 recently.

  • In Pursuit of the Next TLA

    In Pursuit of the Next TLA

    Conventional wisdom says smaller companies tackling big problems should define a new category, or TLA; which stands for…

  • The Lathe of Heaven and Digital Transformation

    The Lathe of Heaven and Digital Transformation

    One of my favorite books growing up was “The Lathe of Heaven” by Ursula Le Guin. In a classic “be careful what you wish…

  • Salesforce NPSP Year-End Donation Receipts

    Salesforce NPSP Year-End Donation Receipts

    For Salesforce Administrators at Nonprofits, the task of generating year-end tax donation receipts may seem arduous…

  • Auto-Scaling iDialogue Document Workflows

    Auto-Scaling iDialogue Document Workflows

    When building the iDialogue document automation web service, we wanted to ensure that everything auto-scales. Whether…

  • Accounting in the Serverless Cloud

    Accounting in the Serverless Cloud

    One of the most fascinating R&D topics in Enterprise Software today is how to utilize the "Serverless Cloud". This next…

    5 条评论
  • Migrating to Salesforce CPQ

    Migrating to Salesforce CPQ

    Summary Migrating to Salesforce CPQ requires importing Orders and mapping them to many Salesforce objects (aka…

    1 条评论
  • Forecasting SaaS Revenue With Salesforce SteelBrick CPQ

    Forecasting SaaS Revenue With Salesforce SteelBrick CPQ

    Software-as-a-Service (SaaS) is fundamentally a subscription business with a mix of recurring software revenue and…

    3 条评论
  • Plans Are Worthless, But Planning is Everything (Agile Software)

    Plans Are Worthless, But Planning is Everything (Agile Software)

    I recently re-read Dwight D. Eisenenhower’s 1957 speech (link) in which he referenced this famous quote “Plans are…

社区洞察

其他会员也浏览了