3

Basically I want to create an input area for a new record. I'm trying to get it styled like the standard "New" Button. I have tried doing it via Visualforce but it looks like a completely separate entity.

Before I continue I just want clarification on the best method to use?

Should I stick with Visualforce or figure out how to create Lightning Components?

I find Visualforce much easier to produce and get working but it's nowhere as pretty as lightning components.

The data aspect of Lightning Components I find hard to deal with (all the back end wiring/coding).

Do I have to use the Lightning Data Service with Components or can I use a standard controller like in VF?

This is the standard "New" Layout. This Is The Style That's Standard

This Is The Visualforce Layout I Created. This Is The Visualforce Page

This Is The Lightning Component I Made. This Is The Lightning Component I Created

Summary Of Questions:-

  1. Should I stick with Visualforce or figure out how to create Lightning Component? What's the key differences and the future method to be using?
  2. Do I have to use the Lightning Data Service with Lightning Components or can I use a standard controller like in VF?
  3. Any clear and easy guides to follow in reference to Lightning Data Service and Javascript Handles.

1 Answer 1

4

Should I stick with Visualforce or figure out how to create Lightning Component? What's the key differences and the future method to be using?

Answer: Lightning is the way forward, Salesforce is pitching it with Blood Sweat and tears to make everyone adopt it. Building in lightning would be like futureproofing your application. The key difference between VF and lightning is the VIEW-STATE. VF manages the state of the Controller Variable in encrypted Hidden Input Field and that state is transferred to and fro to your apex controller. In Lightning, it's your responsibility to maintain state and you use Stateful Client and Stateless Server ideology. In short, you store the values you would need in aura:attribute and then transfer it later to Apex for further processing.

Do I have to use the Lightning Data Service with Lightning Components or can I use a standard controller like in VF?

Answer: Lightning data Services and Base Lightning Components are the lightning equivalent of VF standard controller. You cannot use VF standard controller in Lightning,

Any clear and easy guides to follow in reference to Lightning Data Service and Javascript Handles.

Answer: Trailhead is your best friend here. It has good examples of using lightning standard controllers and how to handler events to make complex UI.

Src: https://trailhead.salesforce.com/en/content/learn/projects/workshop-lightning-programmatic/use-lightning-recordform

http://peterknolle.com/lightning-record-edit-form/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .