1

I am building a SPA that basically incorporates multiple video streams (using WebRTC) and various other components such as a text 'chat' feature.

I have spent a couple of weeks building a proof of concept prototype using vanilla javascript, jQuery, HTML 5 and Node.js. I was considering using a framework like Angular, or a library like React for the real product.

However, for the scope of the project and from what I learnt building the prototype, I'm pretty confident I can build this using the tools mentioned above.

I can modularise my code and test it using these tools, and from what I am reading these seem to be the main benefits of using something like Angular.

What I'm worried about is not understanding the disadvantages of taking this vanilla approach. I'm aware this question is leaning towards the 'opinionated' side of things which is why I am asking for specific disadvantages as I'm sure there must be things due to my lack of experience in this area that I am overlooking.

  • 1
    SPA frameworks like Angular and Aurelia provide several benefits that your vanilla Javascript does not provide. Mostly it comes down to "scalability," in the sense of writing a large application. Building out your application, maintenance and deployment all become increasingly difficult without the help of a framework's organizing principles. The data binding that you get with MVVM is an incredibly powerful tool that can help you write larger applications much faster. – Robert Harvey Oct 17 '16 at 14:09
  • 2
    Its not as if SPA's didn't exist before Angular. If you feel confident that your app is testable and ready-for-prime-time then it seems wrong to try to re-do it in Angular just because that's the hot new buzzword out on the market now. And I try not to ever solve scalability problems that i don't actually have today, as its usualyl a waste of time. Deploy it now, then start learning some Angular slowly. You can always port it over later, once you've got Angular experience under your belt. – Graham Oct 17 '16 at 19:08
  • Thanks for that. I agree, for now I don't really need to think more than a touching amount about scalability. Waiting to port it is exactly what I was thinking. By that time I expect the new hot frameworks will be completely different anyway. – Si-N Oct 17 '16 at 19:18
  • If anyone else is in the same situation, I started using vanilla code and soon switched to Angular. I'm so glad I did. My life became a whole lot easier very quickly. It turns out my SPA was a perfect fit for Angular and once I got used to thinking in a more Angular way I was able to move very quickly. It is set up very well to separate your concerns and is made to be testable. I haven't had any regrets and dread to think what state I'd be in if I'd stuck to vanilla (although I guess this is dependant on your experience). – Si-N May 17 '17 at 8:34
2

The main disadvantages versus using libraries are the need for:

  • custom JavaScript to handle browser specific implementation differences
  • custom CSS to handle mobile, tablet, and desktop
  • custom polyfills to handle inconsistent implementations of HTML5 video features
  • refactoring necessary to handle specification changes to webrtc

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.