Hacker News new | ask | show | jobs
by quack 4440 days ago
A better comparison would be Angular vs Backbone Marionette or vanilla Angular (no pre-built directives) vs backbone. I'm looking at you ng-repeat.

I love angular as much as the next person, but comparing two frameworks by LoC does not do much to move the discussion along.

4 comments

You can't just take away the pre-built directives as they are a core module of "vanilla Angular" as stated on the front page of the API docs. From controllers (ngController), to models (ngModel), to looping (ngRepeat), to the actual app itself (ngApp), directives are fundamental to using Angular. Taking away core directives would be like taking away selectors from jQuery, or models from backbone; without them, the framework is pretty much useless.
I agree that LoC is rarely the most important factor. It's just what inspired me to actually sit down and code the Angular tutorial in Backbone.
Marionette is terrible. The code is a mess: prototypes defined within instances [0]. Uninformed use of design patterns: controllers are what, just namespaces? [1] Unmodular internals, almost like globals [2].

It's not worth a comparison.

[0] https://github.com/marionettejs/backbone.marionette/blob/mas...

[1] https://github.com/marionettejs/backbone.marionette/blob/mas...

[2] https://github.com/marionettejs/backbone.marionette/blob/mas...

Marionette is a solid framework. It has everything you need to build fast, and clean: regions (which were a great step in the right direction and will be improved in V2), composite/collection views, layouts... the basics are there for you to work with how you would like.

You've made three points which I can't see much fault with. Why the hate?

I'm sorry that you don't see much fault with it. I've tried my best to explain.
I'm sorry but [0] and [1] are complete non-issues and I'm not sure I fully understand your point with [3].

The code is very far from terrible. Go look at Marionette's source on github - you'll find it's extremely easy to understand and reason about. Now try and do the same with Angular or Ember...

How are [0] and [1] non-issues? I like my libraries "SOLID" and "Clean" (look em up). I have worked with Marionette's source, and it's neither.

Point [2] means, to use a different renderer you need to replace Marionette's internal renderer completely like it's a global (globals are bad).

Angular's source is pretty clean, minus compile.js and select.js
try the stickit framework by nytimes, works great for me
Or Angular to EmberJS