Live data from Hacker News

Rant: Backbone, Angular, Meteor, Derby

gist.github.com

71–80 of 163 posts

Re: Rant: Backbone, Angular, Meteor, Derby

#71

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 actually just had this same experience this past weekend. Hours spent banging my head against the wall trying to figure out why Ember-Data wasn't working. I don't know what wasn't clicking but I decided to switch to backbone for this project. Literally minutes of work to get backbone going and have my data appear properly.

Ember-Data isn't easy, and I'm sure when your frustration is running high it's easy to just say screw it and jump to backbone, but you'll be paying for it later if your frontend has more than 5 deeply connected models.

Re: Rant: Backbone, Angular, Meteor, Derby

#72
post #34

Earlier quoted context omitted.

Backbone I understand, but why not angular? It seems quite similar to knockout to me? Whats your backend platform?

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 sense a smell. Something is not right.

Re: Rant: Backbone, Angular, Meteor, Derby

#73

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. Makes it easier to write maintainable and testable code.

Re: Rant: Backbone, Angular, Meteor, Derby

#74
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…

> jquery-pjax What happens to SEO?

"For browsers that don't support pushState pjax fully degrades." Source: https://github.com/defunkt/jquery-pjax

Wouldn't that suggest that any search-engines wouldn't have an issue indexing your site if you implement things correctly?

Re: Rant: Backbone, Angular, Meteor, Derby

#75

I can only speak for myself, but the reason I use Meteor ( http://telesc.pe ) is because I believe that while it's not perfect right now, it has a bright future ahead of it. The Meteor devs themselves will acknowledge that some features are lacking (I imagine that's why it's not 1.0 yet), but the roadmap looks very promising and I believe Meteor also has the right team to make all this come true.

The reason I used Meteor (http://redacted.meteor.com / https://github.com/doctorpangloss/redacted) is because it is fast, exceedingly simple, and gets you a working program in five minutes.

Re: Rant: Backbone, Angular, Meteor, Derby

#76

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?

We're working on https://github.com/rails-api to make Rails a great backend for APIs, and specifically Ember. Team is mostly Rails Core members and Ember team members. The hope is to make it awesome for other JS frameworks too, but we mostly build Ember apps ourself, so you start with what you know...

Huge +1 on rails-api. When used in combination with rabl, it's the most formidable Backend solution there is.

Re: Rant: Backbone, Angular, Meteor, Derby

#77
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 don't you like about Backbone? I never hear anything constructive or even a solidly coherent argument from its detractors

Re: Rant: Backbone, Angular, Meteor, Derby

#78
post #69

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…

Ember data docs are pretty sparse, but once you get up and going, the learning curve is pretty flat. Backbone is pretty easy to get going, but the code complexity gets exponential when you have lots of collections and references that need to be updated. It's easy to get frustrated with ember & ember-data and just jump ship to backbone, but you'll be paying for it later when your data model expands beyond 5 interconne…

> but once you get up and going (...)

See, that's the problem. How do you get to "up and going" if the docs are sparse?

Just to be clear, this is not meant as a criticism of Ember, just a general observation that I have made time and time again when looking at new projects and reading comments saying things like "yes, X is not documented and hard to get into but once you get up and going it's all roses"

Re: Rant: Backbone, Angular, Meteor, Derby

#79

Earlier quoted context omitted.

I actually just had this same experience this past weekend. Hours spent banging my head against the wall trying to figure out why Ember-Data wasn't working. I don't know what wasn't clicking but I decided to switch to backbone for this project. Literally minutes of work to get backbone going and have my data appear properly.

Ember Data is a heavy hard-hat area and no wonder you were frustrated. Really, just start with your own data layer and get used to Ember first. Ember has a very Rails-ish philosophy and just like in the Rails world - magic happens (but ya should know how it happens anyways). This blog post is a good intro to how Ember works - http://trek.github.com/ (though routing has come a long way since - http://emberjs.com/guide…

> Ember Data is a heavy hard-hat area and no wonder you were frustrated. Really, just start with your own data layer and get used to Ember first

So why is that? This was my big head-scratcher with Ember; surely the access to a data layer is the whole point of these javascript frameworks? I mean all backbone is really is a layer between REST and client-side javascript. I guess i'm missing a whole class of JS applications that don't need access to a server-side data layer, but for me that's the fundamental reason to be looking for a JS framework in the first place. So to come across one so highly regarded which doesn't have it baked in was very jarring.

Re: Rant: Backbone, Angular, Meteor, Derby

#80

Marionette (a framework built on backbone) offers a nice solution. It still keeps things pretty light but does a lot of the groundwork you would normally have to do with backbone for you. Eg cleaning up event bindings, provides a region/view manager and an application wide event bus.

I'd also recommend looking into Chaplin for stronger routing / app design. It's got a great CollectionView, which is one of the most common use cases for Backbone (also seems to solve a lot of the gripes with plain Backbone
Post reply on HN