Hacker News new | ask | show | jobs
by Bahamut 4473 days ago
I'm a huge fan of dependency injection, it makes life infinitely better when designing your code & testability.

That said, I'm somewhat sympathetic to this complaint - it turns me off towards Backbone. However, I argue that it isn't nearly as bad as views with Backbone. In addition, this is changing in 2.0 with a much cleaner injection mechanism.

1 comments

dependency injection is fine. just the magic argument detection wasn't a good idea.

Backbone views has nothing to do with this, imo.

The thing I miss the most when using backbone, and I use it a _LOT_, is observables. Binding and unbinding model events can get really tedious.

Marionette really does help for that, but this stuff can still get out of hand.

It does when it comes to not leaving your views in an ugly string representation of html - you use a build process of some sorts to get around that fundamental flaw so that you can still use a nice html template file. That alone was enough to sour me on Backbone, hence the comparison.

This flaw in Angular isn't nearly as deep was my point.

HTML is HTML, why does it matter what file type it resides in? All my templates are stored according to the view's type within my ./templates folder. If I want to include the HTML in an "actual" HTML file I can do that too. Have you even used Backbone?