Live data from Hacker News

Rant: Backbone, Angular, Meteor, Derby

gist.github.com

91–100 of 163 posts

Re: Rant: Backbone, Angular, Meteor, Derby

#91

Earlier quoted context omitted.

What function is the Rails component serving? Is it just a REST interface or is it also acting as a separate HTML interface?

You can do both, for example, you can use rails for authentication with traditional views and then use ember for the main single page app. I think this is how square does it. Also you should look into active model serializers for integrating rails with ember. I think it's yehuda Katz' preferred method for Jason serialization from rails to ember.

> I think it's yehuda Katz' preferred method for Jason serialization from rails to ember.

That is true. AMS + Ember-data = 👍 (I'm now maintaining AMS, but Yehuda and Jose Valim originally wrote it for this purpose.)

Re: Rant: Backbone, Angular, Meteor, Derby

#92
post #36

I have a rant coming about these things too. * I started out with Backbone. It seems ok as far as it goes, but a bit annoying in that there's enough "magic" and stuff going on that I don't quite understand it completely, but without enough magic to really make things simple and easy. * Angular.js. Now this is more like it in terms of magic. Then, the other day, I decided to add a date picker to one of my forms. Uh oh…

i've went the backbone/knockout/angular route and i think all of them works great for simple things. but if your project gets a bit more complex (or where your code-base changes frequently), you'll start running into all kinds of problems. yes, you can usually hack around them after several exchanges on the mailinglists/irc, but very time-consuming nevertheless. now, i'm back to plain javascript/jquery. i run into le…

Angular is used internally by Google for bit-more-than-complex projects so its possible my friend. It was also used for the Double Click for Advertisers rewrite.[1]

>and still lot of things they didn't support like proper callbacks upon rendering, etc

Heh render callbacks in Angular? That's so Backbone. Did you read the hello world tutorial?

1: https://www.youtube.com/watch?v=oJoAnVRIVQo

Re: Rant: Backbone, Angular, Meteor, Derby

#93
post #36

I have a rant coming about these things too. * I started out with Backbone. It seems ok as far as it goes, but a bit annoying in that there's enough "magic" and stuff going on that I don't quite understand it completely, but without enough magic to really make things simple and easy. * Angular.js. Now this is more like it in terms of magic. Then, the other day, I decided to add a date picker to one of my forms. Uh oh…

backbone? magic? backbone is 1534 lines of straightforward, well written, well documented javascript. backbone is about as simple and un-magic as MVC gets, by design.

I was just going to post this...Seems like 99% of the anti-backbone posts is that there isn't enough magic in it.

Re: Rant: Backbone, Angular, Meteor, Derby

#94
post #93

Earlier quoted context omitted.

backbone? magic? backbone is 1534 lines of straightforward, well written, well documented javascript. backbone is about as simple and un-magic as MVC gets, by design.

I was just going to post this...Seems like 99% of the anti-backbone posts is that there isn't enough magic in it.

I understood what pjax was doing in about 5 minutes. Backbone.js is more complicated than that, and while I'm certain it's not that hard to figure out, I felt a bit like "ok, it's doing stuff I don't immediately understand, but it's also not doing any deep magic that makes difficult things super-easy, either". Very subjective, but it just didn't feel like a sweet spot. Angular.js actually seemed like more of an "all-in" play with the fancy stuff, but that datepicker issue was a wake up call about getting to a point where even doing something simple might be quite difficult.

Re: Rant: Backbone, Angular, Meteor, Derby

#95

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.

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…

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.

Re: Rant: Backbone, Angular, Meteor, Derby

#96
post #14

Try knockout. I wrote a quick intro to it a few days ago: http://returnbooleantrue.blogspot.com/2012/12/architecting-k... I personally don't like backbone that much. I don't know why so many people love the damn thing. It is hard to understand and not even that great.

What does Knockout, Angular, et al give you that Backbone doesn't? It seems like most of the anti-Backbone comments are about it being unable to "scale", which is funny considering Hulu, Trello, SoundCloud and about a hundred other very large apps use it just fine. I have yet to see any of the other frameworks deployed to the that scale at all (where are the examples?)

Re: Rant: Backbone, Angular, Meteor, Derby

#97
post #26

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…

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.

Re: Rant: Backbone, Angular, Meteor, Derby

#98

Earlier quoted context omitted.

i've went the backbone/knockout/angular route and i think all of them works great for simple things. but if your project gets a bit more complex (or where your code-base changes frequently), you'll start running into all kinds of problems. yes, you can usually hack around them after several exchanges on the mailinglists/irc, but very time-consuming nevertheless. now, i'm back to plain javascript/jquery. i run into le…

Angular is used internally by Google for bit-more-than-complex projects so its possible my friend. It was also used for the Double Click for Advertisers rewrite.[1] >and still lot of things they didn't support like proper callbacks upon rendering, etc Heh render callbacks in Angular? That's so Backbone. Did you read the hello world tutorial? 1: https://www.youtube.com/watch?v=oJoAnVRIVQo

If I understand correctly, most everything is still done with Closure Library and tools built in-house around that.

Re: Rant: Backbone, Angular, Meteor, Derby

#99

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.

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.

Re: Rant: Backbone, Angular, Meteor, Derby

#100
post #26

Earlier quoted context omitted.

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…

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.
Post reply on HN