Ask HN: Which JavaScript libraries do you use for non single page applications?
When you have a project that is clearly a SPA there's a plethora of articles and questions about the best tool for the job. Personally I've worked before with Backbone, Ember (really early days) and very little AngularJS.
More often than not, I prefer to not use a library. Not even because of size or page load times, just to avoid having to deal with dependencies, all the build environment around it and sometimes the learning curve.
Almost inevitably after some period on a project, I see myself wasting a lot of time on JS-related work. Maybe it's one page with an interactive form or it's a bundle of components that are complex. But at the end of the day I catch myself thinking I'd have been better off using some kind of framework. The general overhead of writing it all myself (re-inventing the wheel I guess) when complex components come into play makes me doubt my earlier decision of not using something. We know it's all about trade-offs.
Taking all that into account plus the ever-growing number of JS libraries that are available today it made me wonder if there are libraries that stand in the middle that I never heard of? Certainly HN can answer that.
If you were building a non single page application today with maybe some complex interactive pages. What libraries would you use?
3 comments
[ 2.7 ms ] story [ 10.5 ms ] threadCan't remember the last time I did that. Probably back when I used PHP on my first internship.
Don't you think it's a lot of added overhead rewriting the same over and over? Things like data binding, validation, etc. If you do two projects with vanilla JS you'd end up with a bunch of similar functions for this basic stuff.
I transform my data into a JSON object, suited for the front end. So the only Controller -> View boilerplate is a "call the api" JavaScript function.
My comment is primarily a criticism of the JavaScript world where folks can NPM their entire server infrastructure (containing plenty of needless files)...