Category: Salesforce

Why do we still need Visualforce and Apex?

Salesforce Lightning

Where possible we should really be trying to use Lightning Web Components over Visualforce. The main reason we should prioritize Lightning Web Components over Visualforce is because of a lot of the out-of-the-box benefits: more modern, more responsive, and frankly, Visualforce will at some point be deprecated.

Visualforce is still useful though, here are some good situations to consider still using it:

  • Building Wizards (multi-step processes)
  • Needing to control the flow through an application.
  • Org isn’t using Lightning yet (this should be really rare in 2021)

Apex isn’t going anywhere. For the most part, Lightning Web Components will need to call Apex code if you are doing anything really custom. The Lighning Data Service is pretty good, but it’s not going to work in every circumstance.

Wrapping it Up

Visualforce is slowly disappearing; there are very few situations that mean we should start new pages or Visualforce components with it.

Apex isn’t going anywhere.

How to Avoid Governor Limits in Salesforce Apex

Most governor limit errors are a result of poorly understanding how Salesforce works, so they can be prevented by designing a better architecture and by taking advantage of the platform. For example, too many SOQL queries can be avoided by writing bulk-friendly code or using caching.

Continue reading