by dubcanada · 11y ago · 0 comments
Are you in a latency-critical domain, which Google Search is? Then optimize to minimize the number of bytes shipped to the user and startup time. Do you have 100+ screenfuls of information? Then optimize so that making new screens is easy. Do users load your app once, leave it open in the background, but then need to perform a number of interactions quickly? Then ship down the initial interface quickly and progressively lazy-load bundles of functionality that are just a JS function away on click, like GMail does.
Incidentally, one of the main reasons Google Search finally adopted Closure was because it had to integrate with Google+, which was all done using Closure. So again, the choice of a framework was driven by product concerns.
It's not a failure when a company builds a home-grown framework that is carefully tailored to the product needs that they've discovered over the last few years. Indeed, having the resources and domain knowledge to build your own framework is a far bigger success than building an app with the hot framework of the month and failing because you look just like every other app out there.
Constructing your own framework has cost. Sure, you will acquire a lot of knowledge doing it, but is it going to help the bottom line? Maybe.
Once again, are you seriously advocating that _everyone_ should do "vanilla JS" without any frameworks?
Rewriting your product is not failure, particularly when done at the very early stages where it only takes a week or so anyway.
As a nice side benefit, this also avoids all the holy wars about which framework is best, since you can put off the decision until you have hard data about which is best for you.
Frameworks can have their own complexity and developer overhead, they can demand you spend more time solving the problems they impose (cough AngularJS), they can be ill-suited to the requirements and/or problem domain you're working in.
Building your own isn't always the sensible choice, but it can be.