3 ms·
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 com
by Bahamut 13y 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.
- AdrianRossouw 13y agodependency 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.
- Bahamut 13y agoIt 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.
- iLoch 13y agoHTML 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?