Posted by jeffc518 on November 17, 2014 at 4:55pm
Hey all,
I'm curious as to what the most popular JS framework is amongst us. I've read quite a bit about Angular and Backbone, but I'm wondering which could prove to be most useful in or out of Drupal. Any comments on your own experience with one of these (or others) would be most welcome.
I know there are separate groups dedicated to frameworks but I want to try to get a discussion going here in Albany. Headless Drupal 8 is becoming a popular topic, which I believe is Angular, but I want to focus more on what I can do now.
Thanks to all in advance,
Jeff

Comments
Javascrpt framework comparison
To get this conversation going i think this link may be helpful.
https://www.airpair.com/js/javascript-framework-comparison
We're in a special kind of
We're in a special kind of industry. Frameworks and libraries bloom and die sometimes in cycles as short as months. I've subscribed to the "do what's trendy" model of pragmatism.
Libraries with more users and more chatter ultimately have more support, bigger communities, and normally larger market share.
http://www.google.com/trends/explore#q=angular%2C%20angularjs%2C%20backb...
In a direct comparison of angular and backbone, angular certainly has it. (note how the jump in angularjs correlates with the jump in the base keyword angular while backbone had only a small rise and fall)
I'm still not subscribed to any particular javascript framework but I think we're going to be seeing more of angular.
We have another angle we need to keep in perspective as well, "What is the Drupal community as a whole doing?" I'd look to see what libraries some of the more well known distros and drupal agencies are using as well. Choosing a tech stack that isn't drupal future proofed means technical debt in the form of rewrites, modules, and/or cheap hacks to merge any custom software.
I'm partial to Angular
I'm partial to Angular because it's the only one I tried. after watching about 20 short videos on egghead.io I had a fully functioning application consuming a drupal data source.
A friend once asked me, as we were comparing angular and backbone, how jQuery beat Dojo as the "go to" js library. We both agreed that Dojo is faster all around, is more modular, and scales gracefully, while jQuery is slower, less modular, and suffers performance hits at scale.
The answer, in short, is "approachability."
Jquery was easy to use, didn't require a ton of setup, and had a huge community of support and tutorials to learn from.
Go angular and don't look back.
Frameworks
Thanks for the comments guys. I've been noticing an uptick in web development shops that claim to use multiple frameworks, as well as other developers that expect you to be extremely well versed in a specific one. Backbone is popular for Wordpress, as it's been part of core along with Underscore since 3.5.
I tend to agree that Angular is the "best" one, but paying attention to what's best for Drupal going forward is even more important. I"m partial to jQuery and jQueryUI where I need some quick widget functionality - otherwise it seems like the frameworks take tasks that I already know how to accomplish and makes them that much more complicated, at least until you get past the initial learning curve.
Patrick, what you say about these frameworks / libraries being possibly short-lived is precisely what I'm afraid of. I want to make sure that what I end up using isn't going anywhere.
From a very general CMS driven standpoint, it seems that it's Drupal = Angular and Wordpress = Backbone. I mention WP here because it's something I have to use at work.
angular could end up like J#
My fear is that angular may end up like J#. It has a big spike right now but what is its staying power. I see a lot of themes made with Backbone for Drupal, WordPress and Joomla. I have not seen a lot of Drupal themes with AngularJS. Anyone have some good examples of a Drupal theme using AngularJS? Also what is the Drupal organizations view on the next gen javascript Frameworks? What framework will be moved over to drupal 8 and better yet what will be in by default. If Drupal 8 has a javascript framework in it by default that will be the death of all the other javascript frameworks.
Angular isn't meant for
Angular isn't meant for drupal themes. It's meant for development of a front ends separate from drupal, that consumes drupals data (hence, headless drupal, head = front end).
dontbescared it's the "plight" of the web developer to never be able to truly master a technology. It's important to learn as much as you can.
Simply put, any framework can/will consume any data you want from any source.
Do yourself a favor and choose whichever one you think is easiest. (Chances are, it's angular)
Also, use what your coworkers
Also, use what your coworkers are using and like. Super important.
For home/hobby/independent work you have a lot of creative freedom, but when it comes to working as a team you need to keep the interests of your team mates in mind.
There was a short stint where a coworker was all about the cakephp framework. I kind of moaned to myself about it, but now choosing that framework when it's appropriate for projects means we have multiple team members who are familiar with the framework and have to go through less mental limbo to jump into a cake project. (unfortunately not everything fits drupal, even though I pretend it does).
Management and business folk typically don't understand the concepts of things like "flow" and "knowledge debt" the way developers do and it's an implied part of our job roles to make sure we make good decisions that affect everyone around us positively. It's utopian and not always possible, but it's certainly something I strive for. "I do well when we all do well" as it were.
A team of people juggling multiple frameworks and libraries while adopting new ones will be on course for a head on collision down the road as things need to be maintained, ported, or given to new maintainers.
One tech stack to rule them all. From the server OS to the css compiler. Conformity breeds simplicity. Simplicity breads productivity. Productivity breeds creativity. The same way man kind changed course when manufacturing was standardized and you could get tools and resources in standard sizes/configurations.
I think I've ranted too much because I'm heading into work flow.
So yeah, when prototypejs got usurped by jquery I was sad.
Gotham City Drupal
Zone 5 has been working with Gotham on a number of projects over the past couple of years, and I asked founder Kelly Bell what they're using with regard to frameworks:
"Angular and Node are the only other frameworks we use. Drupal is, itself a framework. For theming, it's Bootstrap (SASS, not the LESS version). We are looking into Facebook's new setup as well, but we haven't had cause to go beyond R&D yet. Of interest is Laravel, but that's another CMS — and would be in replacement of Drupal, not in addition to.
"That's really the position we are taking for now, until D8 is being used in production. So far no client has chosen to use D8 yet. Angular and Node will still be used then too, I imagine. But who knows? Things move quickly in Drupal-land :)"
zone5.com
Albany, NY