Live data from Hacker News

Rant: Backbone, Angular, Meteor, Derby

gist.github.com

81–90 of 163 posts

Re: Rant: Backbone, Angular, Meteor, Derby

#81
I've been using angular.js for a while now and there are a few reasons why I've really liked it:

- dependency injection: because everything is injected, it makes writing isolated unit tests very easy. It also makes it very easy to swap functionality in and out without affecting other parts of the app.

- two-way data-binding: most of the pain of being a javascript developer comes from managing and manipulating the DOM. After using angular, there is no way I will ever use a framework that doesn't automate this tedium by providing two-way live data-binding (knockout, meteor, and ember all do this). The best part about having less DOM manipulation code is that it makes writing automated tests easier and makes those test much less brittle.

- extending HTML: this is often a main complaint of angular. People say that directives "pollute the DOM" which I find to be a strange complaint, given that HTML is a declarative (sometimes) semantic language to begin with. HTML5 added a ton of new attributes and features yet nobody complained that these new tags were "polluting HTML". Angular simply allows you to extend HTML's functionality even further, and in doing so it makes it very easy to understand what an HTML template is trying to do without having to dig through any JS code.

- testing: the angular team made testability a priority, which I was something I always really appreciated about the Rails team. If you're not writing tests for your javascript code, you need to start. Having full test coverage in both end-to-end tests and unit tests has been a major source of stability for me and my team.

Re: Rant: Backbone, Angular, Meteor, Derby

#82
post #76

Earlier quoted context omitted.

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.

We actually think that AMS is significantly better, but I'm glad rabl works well for you. :)

Re: Rant: Backbone, Angular, Meteor, Derby

#83

[meteor dev] Please come help us with this! We have six engineers at Meteor and dozens more contributors in the community working on the platform every day. The plan to 1.0, including REST, is at http://roadmap.meteor.com/ . Here's the guiding principle behind Meteor. There should be a dramatically faster, more accessible way to write applications. Improving that developer experience means rethinking some things: aut…

I was excited using meteor but was sadly disappointing after a couple days of "banging my head on every simple things I tried". As far as I'm concerned, Meteor is a big "Screw everything that exist, it sucks. We're better and we've got the time and money to re-build all the life from scratch".

So, in a way, that's great! An mental orgasm for any nerds out there. But in the real life when shit needs to get done, I'm still using everything else that sucks.

Now, before people start saying I don't know what I'm talking about, here are a few examples: - It does NOT use npm (!) -> Basically, you can't use anything without first converting it to Meteor. - It does NOT use Express (Or connect) as its base -> Basically, the standard in the Node community. That means I can't just plug-in the 20 or so awesome plugins built explicitly to be used by any kinds of node application that support connect.js - The current Asynchronous (following node's philosophy) wasn't good enough for them; so the re-created a whole new Mongo version acting synchronously.

But most importantly, it's just extremely annoying to hack with it. It's like a big black box.. you're not very sure what it does and you hope it works. But when it's not working, you can't just hack it your way or read the source. It's a little bit like Django or Rails (but in worst) as you can use SQLAlchemy in Django, or you can use different template engines, but then no project from the django community will work with your app.

The good news is, the meteor team is working hard. Maybe in a couple years it will be stable enough and iterated fast enough to provide a platform where it will be fun hacking and building web apps. But for now, I sadly prefer to stay in the "Everything else sucks" world and hack my way in the node jungle.

(For those interested, I have also tried Derby. As said in the article, it's not yet fully stable and the documentation is really Meh. But I think it's going to be big really soon and I'll be more than happy to give it another fair try. So far, I'm sticking to a basic express (Or locomotive.js which is nice.) I'm also using Angular.js on the front-end. It's something amazing as I feel very productive and it saves a tremendous amount of time.. but at other moment, I just bang my head against the table as I want to do something simple and it's just impossible so I need to use all kind of hacks to do what I'd have done in a couple lines in Vanilla Javascript. Oh well. Hard to be a hipster web developer trying all new technologies :-))

Re: Rant: Backbone, Angular, Meteor, Derby

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

>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: http://www.grobmeier.de/angular-js-binding-to-jquery-ui-date.... - how many lines of code just to make it a date picker? I couldn't have written that code myself without several more days of banging my head. Wonder what'd happen if I really try and do something it doesn't agree with... So out the window with that for the time being.

To be fair, you can just use Angular UI as that article says: for a date picker and the ui-jq directive for any other jQuery plugin.

Re: Rant: Backbone, Angular, Meteor, Derby

#85
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 had a similar experience. I use backbone for interactive parts of the app and ended up going with jquery-pjax for almost everything else. Another option is to create handlebars templates that are compiled with the asset package. But that introduces some other problems that need to be solved.

I'm ready to get on board with something cohesive that's Ember-ish whenever it matures.

Re: Rant: Backbone, Angular, Meteor, Derby

#86
Straight from the backbone faq: "Backbone.js aims to provide the common foundation that data-rich web applications with ambitious interfaces require — while very deliberately avoiding painting you into a corner by making any decisions that you're better equipped to make yourself."

I think the problem is people come into Backbone.js thinking it's a full fledged MVC framework for in-browser apps, instead you should think of it as a minimalistic set of tools with which to create your own framework (and in fact, a few actual frameworks have been released that are built on top of backbone.js).

One way to taxonomize frameworks is on how opinionated it is - Backbone.js is on the far end of the unopinionated side. If that's what you like, then Backbone.js is for you. If you want something more out-of-the-box, you should be considering the other options.

Re: Rant: Backbone, Angular, Meteor, Derby

#87
post #7

Recently decided to use Backbone as a JSMVC Framework on my team. Although I looked at Ember and Angular, which obviously both have many more features than backbone out of the box, We chose to use Backbone because it seems to have such a large and vibrant community behind it - seems like angular and ember are both lacking in this respect. However, as our Backbone application grew in complexity, we noticed that Backbo…

I always said it, Backbone is not a JSMVC Framework; It's a JSMVC Framework Framework (How to go meta!) Basically, it's a solid foundation to create a JSMVC Framework.

Re: Rant: Backbone, Angular, Meteor, Derby

#88
similar growing disenchantment with Backbone. Minor gripe re: Angular - if you're working with a server side templating language (i.e. Flask/Jinja) you have to configure it to use alternative tags, which could cause problems if working with any 3rd party libs.

Re: Rant: Backbone, Angular, Meteor, Derby

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

Re: Rant: Backbone, Angular, Meteor, Derby

#90

I switched from backbone to angular about half a year ago. It was the best thing that ever happened to the project I was working on. I've rebuilt the complete interface using angular in 2 days. The original backbone version took me weeks (I learned both frameworks from the ground up while writing the interface) It was just a joy to see how databinding and promises where working hand in hand to make my life as a devel…

As a person that switched from Backbone to Angular, can you explain models in Angular (from a Backbone standpoint)?

I've looked over the docs, and as far as I can tell there really isn't a model in Angular - not anything concrete anyway.

The docs seem to explain that any JS object is a model as long as you make some reference to it.

Or, is an angular Controller (+ some JS data structure) really a model.

Its quite confusing to me.

Post reply on HN