Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a typical reaction from someone who hasn't used AngularJS to build a complex web app. I would strongly suggest you check out our boilerplate for building complex web apps with AngularJS, which uses Backbone for models and AngularJS for UI and data binding.

http://brandid.github.io/parse-angular-demo/

"In AngularJS, every time you visit a route, it passes an idand has to resolve it in your controllers."

- not true, just use nested controllers and prototypical inheritance to access the already resolved object

"AngularJS doesn’t follow this philosophy; it encourages you to throw away what you already had and find it again (probably from the server!)."

- not true, thats why $rootScope exists

"None of the examples or blogs I read through demonstrated how to reuse object instances, for example. Is that just not done in AngularJS?"

- not true, all scopes inherit from each other, javascript prototypical inheritance applies

"The problem is that the $watch function belongs to the $scope and NOT the Room."

- not true, you can put a $watch on the model if use Backbone for your models

"If you had an array of Room instances for example, you can’t watch them all without looping through them all constantly."

- not true, you can watch a collection of models, and you can do things like watch the length of the array for less processor intensive use of $watch



You can't possibly argue that using Backbone for models is idomatic AngularJS.

If you're arguing that with a bunch of extra code on top of AngularJS it does what Ember does out of the box, that was kind of my point.


...fair.

What's your take on points #1, #2, #3 and #5?


You CAN make Angular work like Ember, but you have to add a lot of code to do what Ember encourages you to do off the bat.

What you are suggesting is good practice but something that I suspect very few Angular developers do as it's not encouraged by the framework itself.

If you follow the guides on the official Angular site, they're done none of the things you suggest.


Umm.. nothing in #1, #2, #3 or #5 requires any extra code.

If you're argument is about what Ember 'encourages' vs what AngularJS 'encourages', that is your opinion and not a weakness in the framework.

I think it's great you've taken some time to learn AngularJS, and I think if you dig a little deeper you will be pleasantly surprised with what you find.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: