5 ms·
Not to rain on Backbone's parade, but I am easily twice as productive in angular.js. The learning curve is a bit steeper but once you mastered you end up with (
by kreek 14y ago
Not to rain on Backbone's parade, but I am easily twice as productive in angular.js. The learning curve is a bit steeper but once you mastered you end up with (IMO) a cleaner more maintainable app.
- film42 14y agoI think angular offers some amazing features, but it's very opinionated in how you use it. My experience with angular has left me feeling less like a javascript wrangler and more like an angular wrangler. I mean no disrespect to the framework, because it is amazing, but, it's just different.
- mrchess 14y agoHow big is your Angular project? I mean I like the idea behind Angular, but my concern how Angular holds up in a huge app, let's say if Angular was written as the client of WordPress (or some blog) admin. I don't have enough experience with it to be able to judge how well it is to handle that. Or would it be a hybrid of Backbone + Angular? Would love to hear the opinion of someone more experienced.
- lopatin 14y agoThe common anecdote is that Google used Angular to make the the Doubleclick advertiser interface, which is just as big if not bigger than the Wordpress admin interface. It turned out to be great, with much less lines of code than what they had before (GWT). Regarding Backbone + Angular in a large project, I wouldn't touch that code base with a 10 foot stick.
- mrchess 14y agoGreat thanks. My perception up until this comment was that Angular was more of a mini-tool for MVVM for use in little widgets, and not really able to be huge. I wish it was advertised more what large projects using Angular and that they are actually architected completely with Angular.
- zenocon 14y agoI'm not sure what you mean by _really able to be huge_ -- a large single page app? a site with a huge number of pages? # lines of code? I don't think there are any hidden limitations in Angular proper -- in fact it will allow you to organize source for a "large" project very well, and will perform very well -- but you have to be careful with scope digests (i.e. don't try to "compile" a bazillion objects -- but that is mainly common sense)
- mrchess 14y agoA lot of articles I originally read/skimmed with Angular didn't really tout it's ability to organize large codebases... I got the impression is targeted toward smaller projects, whereas Backbone they market themselves in your face "we will clean up your large codebase".
- vidarh 14y agoThe coupling between views and controllers - at least based on the examples on the front page - looks horrible to me, and makes it a non-starter right out of the gate. To me that feels like a return to the bad old days when we embedded PHP right in the HTML....
- xaritas 14y agoIf Angular doesn't float your boat, that's fine. For those wondering if this is true, it's not. Views in Angular can interrogate their controller for model data, and they can fire events into the controller. The controller doesn't know about the view (or even if it is hooked up to a DOM instead of a test runner). You can reuse a view with a different controller (provided, of course, the controller supports the same operations). I don't believe that this level of coupling is harmful. In fact I think it separates these concerns nicely. The view is written in HTML, you declare the bindings with moustache-style templates or with attributes. Some people get really hung up on this, but the declarative UI is not Turing complete, so it's not really like embedding PHP at all. By the way, I like Backbone too, and I use Underscore everywhere. Congratulations to all involved on reaching an important milestone and creating tons of value for everybody.
- vidarh 14y ago> You can reuse a view with a different controller Then the examples on the site are really misleading, given that they hardcode the controller name in the example views. EDIT: To give an example of what I object to, this is cut and pasted from the Angular homepage: <div ng-controller="TodoCtrl"> <span>{{remaining()}} of {{todos.length}} remaining</span> [ <a href="" ng-click="archive()">archive</a> ] <ul class="unstyled"> <li ng-repeat="todo in todos"> <input type="checkbox" ng-model="todo.done"> <span class="done-{{todo.done}}">{{todo.text}}</span> </li> </ul> <form ng-submit="addTodo()"> <input type="text" ng-model="todoText" size="30" placeholder="add new todo here"> <input class="btn-primary" type="submit" value="add"> </form> </div> First, it hardcodes the controller name. This, to me is configuration information - part of setting up routes - that the view should not know. Then there's the ng-click and ng-submit bits. More configuration that I really don't want in my views. It also seems to declare the model to update in the view? This is what I meant about tight coupling to the views.
- alistair77 14y agoAngular and Backbone are very different. Angular is a full framework; it's brilliant but also gets in my way on a regular basis. It may take me longer to write the same app in Backbone but it's a library and happily co-exists with other libraries. With Backbone I feel like I'm using JavaScript, with Angular I'm learning Angular.
- zenocon 14y agoI also write a LOT less code, a LOT less boilerplate code -- after writing a number of Angular apps, I won't go back.