2

This question might be redundant, but I am trying to understand the following. I am migrating VF pages to LEX using SLDS in the phase one of migration. In phase 2 we will be building the components and I need to know the effort that is put in phase 1 is of any use in phase 2 or not at all? So basically for the restyled VF page, can it be used in any scenario in the Lightning component? My guess is it's not possible, but I may be wrong and still learning the do's and don'ts of migration.

On the other hand if I create fresh Lightning pages for existing VF pages using Lightning APP builder, is it possible to launch the lightning page created in Lightning app builder to be launched from a custom button on Opportunity object? I am confused. How difficult it is for a application written and grown in last 10 years to migrate to Lightning? Any blogs or articles about the best practices, approach etc.

2

It's really a case-by-case scenario. VF pages that are close to 100% pure framework pages (little to no custom JavaScript) have the best chance of being easy to port/translate to a LC (Lightning Component). VF pages that are strictly reliant on a framework like AngularJS also stand a decent chance of translating more or less directly. The most complicated pages are those that are heavy hybrids of framework and JavaScript, generate HTML directly in Apex Code, etc. Mind you, the code from the old page will be "useless" by the end of Phase 2, but the changes you make in Phase 1 will help you translate your code to LCs easier.

So, it depends on how your developers have been coding up to this point. If they do a lot of dynamic HTML generation in Apex Code, you might have a challenge ahead of you. If your pages are pretty vanilla, your efforts in Phase 1 will likely reduce Phase 2 time. Keep in mind that as long as your VF pages are working, there's no reason why you can't use them in typical scenarios. For example, force:navigateToURL can call up a Visualforce page, you can add VF pages to page layouts, Visualforce buttons still work, etc. There's no need to port your entire application at once, because most code in a typical application will work with minimal modification.

  • Thanks sfdcfox! How about use of jQuery? That also needs to be minimal? – Quest_sfdc Apr 3 '18 at 20:52
  • @sfmk2017 jQuery can generally be ported over, at least for now, but you should ideally migrate the code to native Lightning for performance reasons. – sfdcfox Apr 3 '18 at 21:40
  • Thanks sfdcfox! By 'migrate to native Lightning' do you mean using Lightning App Builder and build Lightning pages and so on? – Quest_sfdc Apr 4 '18 at 0:20
  • @sfmk2017 You'll want to rewrite your jQuery-based code as a native LC, eventually. jQuery + LC combined is very performance hungry, and will likely be a lot slower than just plain LC code. – sfdcfox Apr 4 '18 at 0:24
  • Thank you so much for your answers and clarifications. Such valuable information, especially for people who are new to Lightning and migration etc, is not available in one place. source – Quest_sfdc Apr 4 '18 at 0:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.