Less Work Required To Write Salesforce Lightning Components? I’m in!

by Aidan Harding - October 11, 2016
Less Work Required To Write Salesforce Lightning Components? I’m in!

Salesforce Lightning is a modern interface with some nice architectural ideas (e.g. event-based communication between modules). It is clearly the direction that SF want to go, but we have always been put off by the lack of some features that we are used to having in Visualforce.

Well, another one of those features has now made it to Lightning (in preview form, at least).

Until now, you had to write some Javascript and Apex in order to make updates to sObjects in a Lightning Component. When compared to the simple declarative equivalent in Visualforce, this was a lot of work and created an amount of code that was storing up technical debt for the future.

In Winter 17, Salesforce have introduced a simple, consistent way to make those updates. Not only is it less code, but it automatically plays nicely with other lightning components by broadcasting any changes via the event system.

 

At the simplest level, you can think of Lightning Data Service as the Lightning Components version of the Visualforce standard controller. While this statement is an over-simplification, it serves to illustrate a point. Whenever possible, your components should use Lightning Data Service to read and modify Salesforce data.

 

 

Related Content


Get In Touch

Whatever the size and sector of your business, we can help you to succeed throughout the customer journey, designing, creating and looking after the right CRM solution for your organisation