Suppose we need to develop an app which can be used both inside Salesforce and in another web site. And definitely we don't want to duplicate the code.

So basically there are two options here:

  1. Develop the components in lightning component (aura or lwc) , then expose them to external website using lightning out.

  2. Develop those components in either React or Angular, then embed them into Salesforce using Canvas App.

Personally I feel both approaches are viable. But when it comes to architect decision, is there one approach which is better? What are the pros and cons? Let's suppose we have the capacity in doing both.

  • 5
    Lance, I love the question... but It is mostly opinion based. If you were asking me, I'd ask for a lot more detail. For example, What is the use case? who is going to maintain the solution? what languages do they know? What volume of usage will you need out of it? Is there infrastructure to host the react solution? And about 100 more... and there still will be a large preference component to my answer. :) Jan 9 '20 at 22:56
  • @SebastianKessel I agree on that this can very potentially be opinion based. However, there might still be some guide lines for this type of decisions. I guess those questions are part of the pros/cons things. For example, how do they perform when supporting large volume data, etc.
    – Lance Shi
    Jan 9 '20 at 23:25
  • I've seen really good answers to this type of questions before, I agree. I did not flag your question, by the way, but I did want to point out what I felt was "the problem" with it. Jan 9 '20 at 23:26
  • Any detail you can add will give you (and me) a better answer Jan 9 '20 at 23:27
  • 4
    @SebastianKessel I don't quite have the details right now. Because this is not a decision I need to make right now. A friend of mine asked me this question several time ago (so I am not sure this is still applicable to their current situation) I have answered with both options and provided a few restrictions on both. This question is coming to my mind when I rethink about it and want to figure out how should I choose from a general perspective though.
    – Lance Shi
    Jan 9 '20 at 23:59

Your Answer

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

Browse other questions tagged or ask your own question.