What's the biggest "program" you've written using solely jQuery? I recently completed something in the range of 3k lines using only jQuery and prototypical inheritance and realized later it probably could have very easily benefitted from picking up Backbone, at the very least to hold state better than sticking it in an object on the base class in various ways.
Even backbone isn't worth the added complexity IMO.
All these frameworks make you write more code than needed... and because people started to feel it wasn't worth it, their latest pitch focuses on speed. They say the "virtual DOM" is the future, and if you're not diffing your state to re-render the DOM you're not a serious developer.
I still don't see the benefit. I've written 15k lines of javascript code in some apps. My components have state and I re-render as needed, and as long as you separate code between components it's fine.
How many times have you been using a js app and thought "wow this DOM is slow?" You don't. It's either 0.1 sec or 0.2 sec to re-render the whole component/widget. 99.9% of the time a website is slow because the server requests take too long. Every once in a while you'll see some crazy CSS3 animations that make things unresponsive.
The people who go on about having a virtual DOM run benchmarks on thousands of elements... I don't know about you, but I'm never rendering thousands of elements at a time. Ajax/pagination works fine for extra data. I did write a very simple template system and event management system... but I'd rather do that than add the complexity of a framework. Dealing with a framework to make things work in "the X way" is wasting everyone's time. And then the next Angular or whatever comes along... and everyone wastes more time learning the latest version. This has turned into a rant... but I just want to say I'm happy as a coder who avoids frameworks at all costs. At the same time I try to use as many libraries as possible. Libraries save time, frameworks waste time.
I often feel like Javascript frameworks is dominated by 'experts' claiming how the proper way to write Javascript apps is now to share their opinions.
I've yet to run into any problem that were supposed to happen using jQuery and vanilla Javascript.
Even outside of Javascript, I stay away from using full blown frameworks. Even libraries that you think will be perfect for your use case turns out to be a drainage of resource learning, and now being bent to the will of the author's opinions. For example, Celery is a complete piece of shit. The amount of bug, and workarounds that one must experience vs. writing something on your own using RabbitMQ or even just redis, it's clear to me. Same with giant PHP frameworks or RoR vs. Flask. Even microframeworks that focus on not being a framework comes with the some opportunity cost, however being better than the monolithic frameworks that whines and decides to leave you in the dark because you did not share the same opinions.
about 5k. Funny I thought about the same thing but in the end I considered the amount of work that would be required vs.something that is already working well, easy to understand, skillset being very low if someone needs to pick it up (just jQuery, not even weird object orientated bull crap).
Yup, just one single .js file written in jQuery. I am however, curious about React.js, and want to experiment with new components, I doubt I would use Backbone.js however.
It took far longer, and more bugs using Backbone.js than using jQuery. I don't know why people are so obsessed with Backbone.js, modularizing, object orientation with Javascript, the language was not optimized for such purposes, it's only with the server side javascript boom with node.js that we are seeing this heavy shift towards Javascript, but I treat Javascript like the second class citizen it really is, and I think it's rather naive to suddenly start using it for everything just because you can and everyone is doing it.
There are a lot of factors that make a framework either worth it or not. Here are some that lean towards framework.
* Is it an application (google docs?), if not, you may not need a framework.
* How large is the team? For a solo project, a framework offers less of a consistency benefit. In a group, having people implement the same way can be important, and a framework helps a lot.
* Are you managing a lot of application state in javascript?
I'm out of time, but those are some of the big ones. I've used frameworks in the past, but we're currently doing a classic wizard-style application, and the frameworks don't offer us a lot. If it was less site & more application, I would be pushing for one of the popular frameworks to help manage complexity. Frameworks bring additional complexity, and they need to mitigate a certain amount of complexity to be worth it.