What framework(s) should I use?
Small modules: the solution?
In the mean time, some people have putting away those gigantic monolithic frameworks for a more modular approach. There is a trend towards micro-frameworks: tiny pieces of code that do only one thing (like, templating or routing) but that do it really really well. You can therefore create your own custom stack depending on your needs. Here I am looking at MicroJS andNPM modules.
This solution looks great on paper, but the problem is that there is a lot of noise and fragmentation. How do I know that this little framework I am using right now to route my app is still going to be maintained 2 months from now? Am I actually making the right choice combining those 5 micro-frameworks? How portable will the code I am writing be? As Rich Harris pointed out: “small modules, it’s not quite that simple”.
Most of all, understand your needs!
Well, I think that the best solution lies somewhere in between all of that. Most of all, understand your needs. Building a hybrid mobile app with 5 views probably doesn’t require the same heavy lifting as a full-fledge 100-view web app. As a rule of thumb, before adding any piece of code to your project, make sure to fully understand how it works so that you are confident you can tweak it if needed. And, as always, experiment!
PS: The new ES2015 standard actually has templates and modules (and a lot of other awesome stuff) built into the language which make a framework-less solution more viable!
Originally published at www.linkedin.com.