Live data from Hacker News

Ember.js is driving me crazy

softwaresimply.blogspot.com

111–113 of 113 posts

Re: Ember.js is driving me crazy

#111
post #105

Earlier quoted context omitted.

In the first case, he was using an `ObjectController` without understanding the special behavior of the `model`/`content` property. In the second case, he used HTML comments to comment out Handlebars code, not realizing that he should have used Handlebars comments.

To be fair, the documentation I was linked to doesn't say anything about the 'content' property behaving this way. It only mentions 'model'. In the second case, it seems quite reasonable to assume it knows about HTML comments and that they would behave as I expect.

The docs for ObjectController (and ObjectProxy, which ObjectController extends) both mention the specific behavior about 'content' (not model, the fact that model and content mean the same thing when you're talking about proxying controllers is something you learn as you go along):

http://emberjs.com/api/classes/Ember.ObjectController.html http://emberjs.com/api/classes/Ember.ObjectProxy.html

Sorry to hear about the pain points so far. I felt like this many times when I was starting with Ember. It definitely gets better the more you become familiar with all the different conventions.

Re: Ember.js is driving me crazy

#112
post #73
post #15

The things that are frustrating about writing an Ember app are the things that are frustrating about Javascript in general. Those "set" and "get" calls are a great example: they're an unfortunately necessary workaround for Javascript's lack of real dynamic message dispatching (like Ruby's method_missing). We all look forward to ES6 fixing this. The run loop is another example. It's a gross hack that wouldn't be neces…

I don't mind those explicit set calls as much. I prefer when `obj.foo = 10` is a side-effect-free operation that only affects `obj` instead of something that triggers bunch of layout updates and got knows what other changes as well. I do agree on the callback thing though and I find it kind of sad that not many people use CPS compilers for JS even though things like Cofeescript and SASS are pretty common.

I seriously considered going through a CPS transforming compiler for my major production Javascript application, but it's a risky step to take, relative to using a less invasive transformation like coffeescript.

It comes down to lack of mature tooling and debugability: coffeescript is easy to debug, because it's a very light level of syntactic sugar and dropping into the Javascript is easy. A more aggressive compilation step would require me to put a lot more trust in the maturity of the compiler and associated tools.

Re: Ember.js is driving me crazy

#113
Most of the author's issues could have been replicated in any static typing language, apparently the author is just angry and wants to blame something other then the developers of the framework that confused him in the first place.

Also the whole static typing reasoning is BS, because the author could have simply used either Google Closure Compiler Linter that can enforce typehints, TypeScript or Dart.

Post reply on HN