Live data from Hacker News

Rant: Backbone, Angular, Meteor, Derby

gist.github.com

121–130 of 163 posts

Re: Rant: Backbone, Angular, Meteor, Derby

#121
It doesn't make sense to compare Backbone to any of these. Backbone is a low level library for getting you started.

If you are looking for something easy to use to get you going you just use one of the frameworks built on top of Backbone, I suggest Marionette.

Re: Rant: Backbone, Angular, Meteor, Derby

#122
post #54

I wanted to use Ember, and I started going down that road, but I just didn't click with it. I didn't progress past the tutorial! I can't remember what exactly I didn't get working, but I just felt very lost and overwhelmed, and that was spending a couple of days reading around online, looking at the code and examples.* I switched to Backbone and got going right away, in half a day of reading the docs and watching a c…

"I can't remember what exactly I didn't get working, but I just felt very lost and overwhelmed, and that was spending a couple of days reading around online, looking at the code and examples." Exactly . I don't want to feel "lost and overwhelmed" when trying to learn some new product, or having to Google every single thing. It is a wonder anything ever gets done. Seems these things are written by someone in their ivo…

As someone who has sacrificed his last few weekends and holidays writing documentation for my open source projects, I can assure you that that is not my attitude, and the fact you think so is very disappointing.

Re: Rant: Backbone, Angular, Meteor, Derby

#123
"It seems that most people today, when thinking about their next JS project, will use Backbone because it's the most popularl framework when it shouldn't be." (sic)

Here's a long list of examples why maybe it should be:

http://backbonejs.org/#examples

In comparison, here's the public list of interesting apps built with Angular and Derby:

http://builtwith.angularjs.org

https://github.com/codeparty/derby/wiki/Community-Projects

What you want to look for in a library goes beyond feature checklists and magic datepickers. Lots of client side developers have been burned in the past by JavaScript frameworks that promise the world and end up getting in the way more than they help.

Backbone tries to provide the barest useful essentials -- the main business of building your app is up to you.

Re: Rant: Backbone, Angular, Meteor, Derby

#124
post #105

Earlier quoted context omitted.

What they give you actual two-way binding for DOM manipulation and rendering between client and model. They also, generally speaking, place very few requirements on your model which is a very good thing. Angular is exceptionally flexible and one of the first tools for building client-side JS that really impressed me. That said it is fairly complex (and not that well documented) when compared to Backbone, so I can und…

Two-way binding is a neat trick, but I hate that it clutters my markup, and almost always I need to augment it in some way. Backbone's declarative events hash is universally a better way to go for that.

Why is it universally a better way?

may look ugly but it is very clear that there is a variable associated to this DOM element.

It took some time getting use to but once I realized how much it made sense I got over it.

So tell me about this universally better way to go.

Re: Rant: Backbone, Angular, Meteor, Derby

#125
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.

Yeah, knockout is great. And it's relatively(to angular) easy to understand what's going on. Also, in my tests for an app(PhoneGap) I did recently, it seems much faster than angular(rendering seems to take half the time)

Knockout's tutorials are great.

Re: Rant: Backbone, Angular, Meteor, Derby

#126

I'm working on an app which uses Ember 1.0.0pre-2. Over the past few weeks I've been lazy / busy doing other things so the project was set aside for a bit. I came back to it yesterday, opened the guide page ( http://emberjs.com/guides/ ) and noticed it had been updated. I was excited and immediately checked the Router section. The guide reflects a brand new router API, which from what I've read makes it much easier t…

Sorry about this, we're going to be cutting a new release soon so that should resolve this discrepancy.

Re: Rant: Backbone, Angular, Meteor, Derby

#127
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 hardly feel that backbone is well written and straightforward.

This is one of the lines in backbone.js:

if ((callback && callback !== (ev.callback._callback || ev.callback)) || (context && context !== ev.context))

I feel stuff like this takes a lot of mental power to understand the context that it is being executed in and what exactly it is doing. It feels like I am knee deep in some obfuscated C code.

Re: Rant: Backbone, Angular, Meteor, Derby

#128

Earlier quoted context omitted.

I just finished evaluating frameworks for a project and chose Knockout over angular for a couple of reasons: Extensibility & hooks: Extending built in behavior in Knockout was much easier than in Angular. Without getting into too much detail, one of the things I tried to do was create a list of items on the page with a simple animation for item removal. In Knockout, it was trivial. In angular it would have required a…

You are right about the first situation. Currently doing animations with Angular is not a trivial task. This is mostly because of its "No DOM manipulation in Controllers clause". If you break that clause, having a repeat with animations is possible ( not trivial - but possible! ). Angular does have a conditional add/remove element. You can use ng-switch for that. If you are using CSS selectors in an angular app I sen…

Yeah, I came up with a number of potential workarounds to the animation issue, all of which involved doing "non-angular" things. That wasn't ideal, but what really turned me off was how difficult it seemed to be to extend, compose, wrap, or otherwise re-use directives.

You're right - you could use ng-switch for add/remove. It's a bit awkward though. I'm curious as to why you'd consider "CSS selectors" a smell in an angular app. I'm assuming you mean some subset of CSS selectors (possibly just the first/last/nth-child selectors I mentioned?), as without selectors you can't really have CSS.

Re: Rant: Backbone, Angular, Meteor, Derby

#129

"It seems that most people today, when thinking about their next JS project, will use Backbone because it's the most popularl framework when it shouldn't be." (sic) Here's a long list of examples why maybe it should be: http://backbonejs.org/#examples In comparison, here's the public list of interesting apps built with Angular and Derby: http://builtwith.angularjs.org https://github.com/codeparty/derby/wiki/Community…

You use this argument a lot, but the ranter suggests that the reason many turn to Backbone is because of a self-selecting bias of it being the most popular.

Re: Rant: Backbone, Angular, Meteor, Derby

#130

Earlier quoted context omitted.

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.

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