14 ms·
Why not just use Angular?
by bvcqw 14y ago
Why not just use Angular?
- bwilliams 14y agoWhy not just use Ember?
- felipesabino 14y agoThere is a very nice thread on Quora comparing both Angula and Ember. One of Ember creators also participate with good insights http://www.quora.com/Ember-js/Which-one-of-angular-js-and-ember-js-is-the-better-choice http://www.quora.com/Ember-js/Which-one-of-angular-js-and-em...
- danso 14y agoBecause it will "just fit" with corresponding Bootstrap assets, I'm assuming... I don't know if it does that now, but I'm assuming both frameworks will eventually share the same conventions and opinions so that developers can use them in tandem without too many extra ateps
- georgemcbay 14y agoBoth of the Bootstrap developers left Twitter a few months ago and AFAIK they are still the ones developing Bootstrap. While it is possible that they are collaborating with the current-Twitter developers working on this thing, it doesn't seem like much of a sure thing.
- jlogsdon 14y agoBecause not everyone wants to define application behavior in markup.
- aidos 14y agoI might be misunderstanding you but Angular behaviour isn't defined in markup. The views are, as well they should be, but they're just representations of the model behind the scenes.
- jlogsdon 14y agohttp://angularjs.org/#todo-html http://angularjs.org/#todo-html This just does not jive with me. My template knows that submission should be handled by `addTodo()`? Or even worse, looping. I want all of my logic to live in code, not some abstract framework specific attributes that don't add much in the way of clarity (context switching between template and view just to follow the workflow, for example). I use (and love) Backbone because the DOM is considered a pure presentation layer, nothing else. Any behavior, logic, whatever that the code controls is defined only in the code.
- aidos 14y agoTo each his own. I don't think it's that big of a deal either way. You don't actually have to do it that way in angular if you don't want to. You can put it all in code instead. The framework specific attributes you're looking at aren't exactly framework specific, they're kinda application specific (just happens they ship with the framework). You can write your own ones to move any of that stuff into code instead of markup. I personally think that loops should be in markup - I happen to prefer templating systems with less restrictions.
- ahoge 14y ago>My template knows that submission should be handled by `addTodo()`? Or even worse, looping. Most template engines support loops. Would be very weird without that capability, really. Also, you have to add hooks to buttons and the like somehow. There isn't much of a difference between adding a class like "js-addWhatever" or using Angular's in-your-face approach.
- TheZenPsycho 14y agoyou have to add visual styles somehow too. you might as well add them right in the html attributes, along with the <font> tags and <center> tags. We'll have js-addToDo and class="white big helvetica" and call it a day.
- 14y ago
- ww520 14y agoDifferent purpose. This is for building reusable UI widget components.
- hueyp 14y ago> It's agnostic to ... if you render your HTML on the client or the server I love Angular, but if you are rendering server side HTML (either as partials, or bootstrapping a page) it is currently lacking.
- bvcqw 14y agoFlight is rendered server side? I must have missed that. Okay, in that case I can see a need here.
- jlogsdon 14y agoFlight doesn't care where things are rendered. > It's agnostic to how requests are routed, which templating language you use or even if you render your HTML on the client or the server.
- taligent 14y agoWhy not just use KnockoutJS?
- aymeric 14y agoYou can end up with a hard to maintain code with knockout.js if you don't structure it well. I found https://github.com/danderson00/knockout.composite https://github.com/danderson00/knockout.composite recently that seems to adopt a similar philosophy (pubsub) to what Flight does while keeping the benefit of knockout.
- WickyNilliams 14y agoI've used this knockout extension to great success [1]. It's intuitive, it leverages knockout's internal pubsub, and fits in with the KO ethos. It can be used to synchronise observables across models (which is awesome as it's events without overhead), or as a general purpose event system. Ryan is one of the core contributors to knockout, by the way, so you can be assured of its quality. [1] http://www.knockmeout.net/2012/05/using-ko-native-pubsub.html http://www.knockmeout.net/2012/05/using-ko-native-pubsub.htm...
- Guillaume86 14y agoIMO the real question is why use KO when you know Angular? (except perhaps for the lib size) Really, I was using KO and it was really nice at the time but since I've tried angularJS I don't see a reason to go back to KO. Two way binding without ko.observable/ko.observableArray/ko.computed, just plain js objects is really a big win.
- zachrose 14y agoWhy use anything when you could just hire a web developer?