Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ok, you like angular. I don't. It has too much magic and forces you to pollute your html with ng attributes. Blanket statements about frameworks like this grow old. So much of the decision comes down to individual preference and the needs of the project. No need to rant about it. I can't really speak on derby vs meteor but I imagine it's the same.


It's not like that. I'm saying use Angular, Ember, Knockout, whatever - just not Backbone. Unless you know Backbone is what's needed for your project, or you yourself really love Backbone. What I'm discouraging here is its popularity as the de-facto client MV*. I'm under the impression that most people today, when thinking about their next JS project, will use Backbone because it's the most popularly-touted framework where It shouldn't be. It's a great framework, and die-hards & specific projects should indeed use it. But the majority should use one of the other frameworks.


Ember, Knockout, Angular, Batman, all have data-binding in their core. Backbone doesn't. If you like writing client code where you have control over rendering and DOM manipulation, Backbone is the best choice short of building your own framework.


Agreed. Also backbone gives you the flexibility to use it on the backend or as the data models behind a canvas app or other kinds of non-html rendering.


Probably should have said that in your article if thats what you meant. It came off as a pretty insular point of view with 'rant' in the title.


Updated the article, thanks for the advice


I don't quite understand the 'polluting the html' argument. How is this worse than using a templating package like Moustache? Plus, it's Angular's mission to extend html with the framework. Says so right on the homepage.


Im sure that is inline with their mission. I just don't happen to like their mission. IMO the html gets pretty messy with a bunch of non-standard attributes that could easily be handled just using class/id names. Once again, my point is that is why 'I' don't like it. I don't have anything against angular or you using it.


Could you perhaps answer the first part of his question as well? That was probably the main part that you missed out. Isnt mustache doing the same? Why do you really care about the rendered HTML ( after mustache's spits out html ) being clean and pure? Dont we all know that "no one" sees it?

The only time angular / knockout's html seems to be less "pure" is when the browser has already rendered the content. At which point pretty much no one cares about it. When you are debugging you have your source.. Its either mustache ( or similiar templating solutions! ) which are not even close to HTML or HTML with additional attributes.. I dont see how that makes a difference.


polluting HTML with.. HTML attributes? Angular lets you stay very much in line with the spirit of HTML, which is a declarative language. To me, when done right, an angular infused HTML page reads very nicely. It's clear to the designer what elements do what. All that logic isn't hidden away in some javascript file.

The fact that you do very little DOM manipulation with angular.js is one of its biggest advantages, IMO. Makes it easier to write maintainable and testable code.


ng attributes are invalid html attributes. Any non-standard attr should be prefaced by 'data-' according to the spec.

edit: Also to you point about dom manipulation. The same amount of dom manipulation is happening. You just aren't in control of it.


Angular lets you use attributes like: data-ng-*. You can also put directives in css if are that concerned about validating markup - class="data-ng-click: foo"


BTW Angular supports prefixing your 'ng-' attributes with 'data-' if you want valid HTML.


Didn't know that. Makes it a little better ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: