I still do not understand what makes
Lightning Applications better than standard
VisualForce. What do
Lightning Applications do better than
VisualForce Pages? What types of problems are they worse at handling? So far in my experience, there does not appear to be much upside, but perhaps there is something I am missing. Thanks!
I still do not understand what makes
Lightning Components will give much greater reusability of features, separation of concern between components, and are much more opinionated about structure. These are fairly neutral things. Several very good answers have already been given about why to use Lightning Components and Apps.
It is useful to know when you will still use Visualforce.
I need to deliver a custom publisher action, custom button, UI inline to my page layout, or anything in the standard desktop browser UI
There are three ways to surface a Lightning component UI today.
- A tab in the Salesforce1 Mobile app
- A Lightning App Builder app that is surfaced as a tab in the Salesforce1 mobile app (which pretty much gives you the exact same thing today as you get in the first option, only it is in Pilot only)
- A lightning app with its own requestable URL
If your custom UI doesn't fit well into one of these use cases, Visualforce is the way to get it done.
I need to deliver a dynamic email template
Visualforce has a lot of applications outside of just a custom page. One of those is dynamic email templates. This is a powerful feature that is not replicated in Lightning Components.
I need to dynamically generate a PDF
Pretty much the same as above.
The Only Constant is Change
This will all change and evolve over the ensuing months/years as Lightning Components evolves into a much more key part of our UI, but I'd say this is the best characterization of the reality today.
Don't get me wrong, I'm extremely excited about what Lightning Components has to offer, and some of its promise. I just thought it would be a useful to be specific in this answer to complement some of the other very good answers.
I've updated this answer based on the current state of Lightning Components as of late July 2015.
The Lightning Component framework is a component-based framework.
- Contrastingly, Visualforce components are page-centric and rely heavily on server calls. Visualforce facilitates the delivery of template-driven web pages and email messages, making it suitable for developers who wish to maintain greater control over the life cycle of the request.
So, in a nutshell, you will use lightning for building apps that are compatible across multiple devices. It forces you to follow event-driven patterns and the component-based approach so that, in the future, it will allow the consumer of a component to focus on building their app, while the component author can innovate and make changes without breaking consumers.
You could also see Lightning Apps as the future and Visualforce as the past. We are now in the present and have live both for a while.
The concepts and designs of Visualforce has come into age. It's not out of the box Responsible, the component model wasn't wide spread, it comes with a ViewState, it's not SPA by design, it's jailed into security silos and separate domains, etc.
Lightning is trying to improve most aspects we are asking over years to get them for Visualforce. Also developmet will be faster.
I would seriously doubt that in 5 years you might consider Visualforce for new projects. However for existing project we might have legacy vf-pages probably for a very long time.
Right now there is just not everthing ready.
They are planning to replace the current standard theme (Aloha) by something new and Lightning centric.
So from my perspective it's very obvious where salesforce is moving to.
I think, that main reason for building apps in Salesforce1 Lightning is multi-device support. So it's easy to build responsive apps for any device. And also, Salesforce will prioritize the Lightning in the future... (as Tom Gersic wrote)
// I'm sorry, that I can't simply comment, but I don't have sufficient reputation.
In the spirit of declarative configuration, point-and-click Admins and Developers can drag Lightning components onto Lightning app pages without writing code.
This provides ISV partners with a new packaging and distribution model on the AppExchange and Admins with a composite application framework (many different AppExchange vendor components on a single page).
IT-focused Developers may choose either Visualforce or Lightning; the benefits of Lightning probably only recognized in orgs where there is high reuse of components.