On JS Frameworks and Salesforce Consultants
Brett M. Nelson - Friday, June 2, 2017
A few days ago a reader by the name oh Havs left a comment on Visualforce with Vue.js – Part 2 which is great! They also asked a question, which is also great!
Havs This is awesome! But I wonder about the maintainability here. I would love to be able to use any JS framework in Salesforce... But unless the next developer or consultant know the framework used, the learning curve would be high.. Given that, I could see if it's you're own product, and there is a specific use case, then it would be great.
I left a message at the time but wanted to add to it.
Modern front-end frameworks provide ways to write less code, with more (or any) tests and more understandable.
Let's take a look at why.
Write Less Code
Arguably the only way to get fewer bugs in your program is to have less code and one way to do that is to not create custom frameworks with a jQuery dependency.
Most modern frameworks include examples of how to test the application. Some come with tests setup when you follow the setup guide. So right out of the gate you are at least 3 steps closer to having your first test written than if you were creating everything custom.
When you use a framework like Vue.js or Angular you are setting the ground work for a common structure to you application. It wont require as much time for some one who already knows a specific framework to start contributing to a project since framework specific knowledge eases the barrier to entry. Can the same be said for a project that is all custom?
Make a case with the project owner or decision maker for using a framework and explain what it means going forward. In the case of the concern about future developers that means the customer would be agreeing to the responsibility of using developers capable of learning the framework if they don't already know how.
A second non-dev reason to bring the business into the process of choosing a framework is to ensure any legal guidelines are maintained. As a consultant I have to get clients to agree to the license of a library before it can be used since I wouldn't want to cause my client to violate any legal policy they have.
Think I am way off? Let me know by leaving a comment below, emailing email@example.com or following and yelling at me on Twitter/BrettMN.