Live data from Hacker News

Rant: Backbone, Angular, Meteor, Derby

gist.github.com

131–140 of 163 posts

Re: Rant: Backbone, Angular, Meteor, Derby

#131

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

Yeah dude I feel you. How confusing is Ruby on Rails too? I mean, this is one of the lines in Rails:

  end
Come on man?? How the fuck am I supposed to know what that means? End what? And where do we begin??!

:rolleyes:

Re: Rant: Backbone, Angular, Meteor, Derby

#132

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.

Angular lets you use attributes like: data-ng-*. You can also put directives in css if are that concerned about validating markup - class="data-ng-click: foo"

Re: Rant: Backbone, Angular, Meteor, Derby

#133

"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.

It's certainly my favorite argument. Folks sometimes forget that pre-Backbone, there was a cornucopia of rich JavaScript framework options: YUI, SproutCore, Dojo, EXTjs, UkiJS, JavaScriptMVC, Cappuccino, and so on. If Backbone has become a bit popular over the last couple years, perhaps it's because it tries to do less than the excellent pre-existing alternatives.

Re: Rant: Backbone, Angular, Meteor, Derby

#134

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

It's not that hard when you know the idioms. && is a guard and || is a default. With a little bit more context and experience in writing concise javascript, it's actually pretty clean.

Re: Rant: Backbone, Angular, Meteor, Derby

#135

[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…

There should be a dramatically faster, more accessible way to write applications.

You do realize this is the holy grail of software development? The thing we've been seeking since, oh, at least the mid 1950s.[1] Pretty ambitious to think you'll crack the nut, at least more than momentarily.

[1] http://en.wikipedia.org/wiki/FLOW-MATIC

Re: Rant: Backbone, Angular, Meteor, Derby

#136
As a mediocre Javascript dev, AngularJS was the first library that clicked for me and helped me avoid the jQuery soup code I was doing more and more as a result of less code on the server and more on the client.

It can be a bit daunting when you are not a JS rockstar : directives and services code architecture, designing views without straight conditional logic, understanding the full power of filters and expressions (I still don't), using jQuery plugins with it etc.

I don't even use routes or forms yet but I had no problem integrating it into a "classic" web app.

The docs need some work though, maybe with more example on certain part. But you can find great code snippet and videos elsewhere.

Re: Rant: Backbone, Angular, Meteor, Derby

#137
post #83

Earlier quoted context omitted.

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…

What blocks you from digging into the source? I want to make that easier for you. Nearly all of the Meteor code is broken out into various packages. They implement components like publish/subscribe, client-side data caching and snapshotting, reliable remote method invocation, live page updates, and hot code push. They're the building blocks for a rich client application. Now, we have some work to do on better separat…

What blocks me from digging into the source is mostly that even if there are separated components, I still need to understand all the aspects of Meteor. I can't just open the file and change it. Will it screw up the deploy system? Will all the data-binding continue to work as expected? Maybe yes, maybe no. Unless I totally understand the system, I can't really know.

You say "like using livedata (publish/subscribe) with Angular", but that's the problem I'm talking about. You need to tweak the system to make it work with Angular. But what about the hundreds of other smaller angular-like libraries? Or tomorrow's most popular one? I can't just , I'll need to create a meteor package and make sure it works good with all the rest of the system (Which unless I'm a Meteor expert, I have no way of knowing).

That could actually be a good blog article, "How to use MooTools, django template system and MySQL with Meteor". I.e. Going through what's needed to be tweaked to make it work. Compared to say, express, I could tell you use the mysql node library, normally include mootools in your html files and use mustache (Or whatever library already exist to mimic Django's libraries).

Re: Rant: Backbone, Angular, Meteor, Derby

#138

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 con…

Angular model is just any normal js object you want, then via two way binding it gets displayed without you doing any work. Freakin awesome.

Re: Rant: Backbone, Angular, Meteor, Derby

#139
post #74

Earlier quoted context omitted.

> 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?

Not sure. I'd have to run a test to really know what "degrades" means in real life. I was hoping someone would know.

Re: Rant: Backbone, Angular, Meteor, Derby

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

> a lot of these tools have tutorials that don't really walk me through all of what I want to do, which initially involves a fairly straightforward "CRUD" type of application

As it happens, I just completed a 4 part tutorial building an Angular CRUD app this afternoon! http://jphoward.wordpress.com/2013/01/04/end-to-end-web-app-...

The backend in the tutorial is in C#/WebAPI, but it's very easy to apply the concepts to any server - the server is tiny and very simple. I'll be doing a Python tutorial with Flask-Restless very soon.

I'd be interested to hear any feedback. I'll be adding video wall-throughs in the next week or so too.

Post reply on HN