Patterns for Migrating from Visualforce to Lightning Components: Part 1

Introduction and Background on Lightning and Visualforce

This three-part blog series is adapted from a presentation I had the opportunity to give at the Midwest Dreamin’ event in Chicago. I gave the session a fairly provocative name – The Long, Slow Goodbye: Patterns for Migrating from Visualforce to Lightning Components – as I feel there is a growing belief in the Salesforce developer community that Lightning Components will replace Visualforce over time.

Whether or not this ends up being true is yet to be seen, but as a Salesforce architect I wanted to put some thought into possible migration strategies should organizations choose to adopt Lightning component development as a key part of their Salesforce development strategy. This presentation was my attempt to articulate these strategies to and receive feedback from an audience of Salesforce developers and MVPs.

In Part 1 of the Patterns for Migrating from Visualforce to Lightning Components series, I’d like to start out by giving just a little background on Visualforce and Lightning. With Lighting, I want to talk about what it is and what it isn’t.

Then I’d like to compare and contrast the technologies at a high level so that we understand where Visualforce and Lightning fit into the Salesforce architecture.

Patterns for Migrating from Visualforce to Lightning Components - Patterns for Migrating from Visualforce to Lightning Components - Slide01

Patterns for Migrating from Visualforce to Lightning Components - Slide04

The Long, Slow Goodbye

Many organizations are envisioning creating a rich, unified Salesforce experience by migrating from Salesforce Classic to Lightning Experience and developing responsive applications using the Lightning Component Framework.

There are many questions that have to be asked before making the transition to Lightning, one of the biggest ones being, “What happens to Visualforce?”

In this session we will clarify what Lightning is (and what it isn’t), highlight the key differences between Lightning Components and Visualforce and where each fit into the Lightning Experience architecture, and envision five possible migration strategies for transitioning from a page-centric Salesforce Classic and Visualforce experience to an app-centric experience using Lightning Components in Lightning Experience.

Patterns for Migrating from Visualforce to Lightning Components - Slide05

Mike Topalovich

Mike Topalovich is a freelance Salesforce architect and advisor with a knack for envisioning and designing next generation systems that help organizations do business in new ways. Focused on removing friction from processes and using cloud computing as a force multiplier, Mike works with visionary organizations to design game-changing systems on the Salesforce Platform to enable rapid business growth and cloud-driven business models.

Mike is also the part time CTO of Marketing Lucidity, a Salesforce ISV Partner, and recently built out a Salesforce implementation to manage tens of millions of person accounts for a Super PAC supporting a 2016 presidential campaign.

Based in Chicago, Mike is a regular presenter at Dreamforce and regional Salesforce events, and is a co-author of the book Visualforce in Practice. When he isn’t advising growing organizations or pushing the envelope of Salesforce technology, Mike is a part time instructor for Salesforce University, teaching Apex, Visualforce and Lightning Component programming to Salesforce developers in major cities around North America.

Patterns for Migrating from Visualforce to Lightning Components - Slide07

Goals

I want to talk about something that’s been on my mind for a while. When I teach the DEV450 class (Apex and Visualforce), we usually move into the Visualforce section of the class after lunch on Thursday. In nearly every class I have taught since Dreamforce 2015, I have gotten the same question during the Visualforce content:

“Why are we learning about Visualforce if it’s being replaced by Lightning?”

At first I didn’t have a good answer to that question. Now that I’ve had enough time working hands on with the technology and teaching it to developers, I have a better answer. And that’s what I’d like to talk about.

For the sake of readability, I have broken the presentation into three separate blog posts:

Part 1: Introduction and Background on Lightning and Visualforce

I’d like to start out by giving just a little background on Visualforce and Lightning. With Lighting, I want to talk about what it is and what it isn’t.

Then I’d like to compare and contrast the technologies at a high level so that we understand where Visualforce and Lightning fit into the Salesforce architecture.

Part 2: Deciding to Use Lightning or Visualforce

We’ll talk about the roles Visualforce can play in our brave new Lightning world. We’ll also talk about how Lightning can take us far beyond where Visualforce can today.

Once we have this background and understand the roles that each of these technologies play, we’ll talk about visions for our future state Salesforce experience.

Part 3: Strategies for Migrating From Visualforce to Lightning

Once we have a vision of where we want to go with Lightning, I’ve mapped out a number of possible migration strategies and the considerations that have to be made for each.

Patterns for Migrating from Visualforce to Lightning Components - Slide08

What is Visualforce?

Introduced at Dreamforce ’07, Visualforce is a server-side, tag-based UI language. It was originally designed  and optimized to recreate the look and feel of what is now called the Salesforce Classic UI, with the page-centric, scrolling architecture that would display a detail section at the top of the page, followed my any number of related lists.

Visualforce gives you access to hundreds of standard components that will generate HTML and CSS based on attributes that you pass through to them. You write Apex controllers for advanced business logic.

You can also think of Visualforce like a container for not only Visualforce markup, but also for rendering custom HTML, CSS, and JavaScript code within a Visualforce Page.

Patterns for Migrating from Visualforce to Lightning Components - Slide09

Is Visualforce Going Away?

OK. So back to the question that started me down the path of thinking about the future of Visualforce…is Visualforce going away?

No. Visualforce is not going away. Anytime soon, at least.

I know everything you hear from Salesforce right now is Lightning, Lightning, Lightning…but there are two key factors that are going to keep Visualforce around for a long time to come:

  • Visualforce has been around for a long time and there is a huge existing footprint.
  • Visualforce pages get billions of hits every month.

Lightning is an immature technology that will not only take years to reach any level of maturity, but will take years after that to be fully adopted by the Salesforce community

When I do the math, I don’t see the tipping point for Lightning coming for another 2-3 years. And I don’t see Visualforce being sunset anytime within the next 7-8 years…if that happens at all.

Patterns for Migrating from Visualforce to Lightning Components - Slide10

What is Lightning?

Here’s the $20,000 question. What is Lightning?

I think before we can answer that question, we first have to ask, “What isn’t Lightning?”

The marketing department at Salesforce loves their brand names. And they seem to particularly love the Lightning brand name. Because they’ve slapped it on literally everything.

Sales Cloud is now…Sales Cloud Lightning.
Service Cloud is now…Service Cloud Lightning.
I just saw “Lightning for Outlook” and “Lightning Sync” the other day…

OK…so there are a lot of products that woke up one day to discover that their names had been augmented with the word “Lightning.” I could probably spend hours talking about products that have had Lightning appended or prepended to their names, but we’re not going to go down that rabbit hole.

We’re going to talk about the two most important Lightning technologies: Lightning Experience and the Lightning Component Framework.

In the grand scheme of things, everything else is just noise. These are the Lightning technologies that matter because they underpin a powerful vision of a unified Salesforce experience across all devices and form factors.

Patterns for Migrating from Visualforce to Lightning Components - Slide11

Lightning: It’s All About the Experience

If we think about Lightning as the unified Salesforce experience across all of our devices, it makes our mission today much clearer.

If we think about designing and developing responsive, reusable components for this new unified experience, Lightning makes a lot more sense.

Traditionally, Salesforce UI design came down to two questions:

  • Do I want to recreate the look-and-feel of Salesforce with custom Visualforce pages?
  • Or do I just want to use Visualforce as a container for JavaScript frameworks?

The prevailing design pattern since the fall of Adobe Flex / Flash has been to use Visualforce  to simply render the output from JavaScript frameworks such as Backbone, Angular, Ember, Sencha, and others. Developers could interact with Apex controllers in a number of ways, including JavaScript Remoting.

While this may have enabled a rich, responsive experience for certain applications developed for Salesforce, users still had to put up with a mixed experience across all of Salesforce, especially if multiple JavaScript frameworks were in use.

Lighting Experience and the Lightning Component Framework solve a problem that has long been a barrier to a truly unified experience for all Salesforce users: Providing a single, integrated framework for developers that enabled the creation of rich, responsive applications that could be seamlessly “plugged in” virtually anywhere in the UI rather than having to stand alone in a separate container.

Whether Visualforce has a place at the table in this vision of a unified experience, and what the options are for moving forward from the page-centric world that Visualforce dominates to an app-centric world where the future is a story that is still being written.

Mike Topalovich Salesforce Technical Architect in Chicago
Mike Topalovich - Salesforce Certified Force.com Platform Developer I Mike Topalovich - Salesforce Certified Force.com Platform Developer II Mike Topalovich - Salesforce Certified Force.com Developer Mike Topalovich - Salesforce Certified Force.com Advanced Developer
Mike Topalovich - Salesforce Certified Mobile Solutions Architecture Designer Mike Topalovich - Salesforce Certified Force.com Platform App Builder Mike Topalovich - Salesforce Certified Administrator Mike Topalovich - Salesforce Certified Advanced Administrator
Mike Topalovich
Hi, I’m Mike. I help companies like yours do business in new ways with Salesforce.

I am a freelance Salesforce Developer, Architect, and CTO as well as a part time instructor for Salesforce University.

Connect with me today to discuss how I can become a part of your team on an ongoing retainer basis.
Mike Topalovich on EmailMike Topalovich on FlickrMike Topalovich on LinkedinMike Topalovich on RssMike Topalovich on Twitter

One Comment

Trackbacks & Pingbacks

  1. Why You Should Attend Midwest Dreamin’ Every Year | Orchestrate, LLC

Leave a Reply