Hacker News new | ask | show | jobs
by pyre 4385 days ago
It's kind of funny, but I don't even remember simple things being spelled out. For example, in their use cases all of the models and routes are single words like: post, comment, todo, etc.

In some places, you see 'Post' and others 'post', but there is nothing explicitly spelling out how that works for multi-word items (e.g. MultiWord => multiWord). Same with underscores in route names (e.g. route name 'multi_word.item.index' => MultiWordItemIndexRoute).

2 comments

Yeah, the magic rejiggering of names everywhere with no clear documentation of what mapped to what† killed my interest in Ember the first time I tried to actually use it for even a fairly simple app.

† Plus the enforced snakeCase/CamelCase everywhere, but that's more to do with me far preferring names_with_underscores in general.

That's a good generic overview but doesn't hit how the code handles the edge-cases.
This is one of the reasons that Ember.js + Rails seems like the preferred setup. Ember.js + Python gets you into converting underscored names to camelcase names.
Maybe to clear some confussion, snake case is exactly naming_things_with_underscores.
And SCREAMING_SNAKE_CASE, one of my favourite names for a convention ever, is when snake case is in all caps ;)
Replying to the sibling. There was documentation of how the names changed - you just need to know where to look:

https://github.com/emberjs/data/blob/master/TRANSITION.md

I'm not talking about transitioning from 'old' Ember Data to 'new' Ember Data. I'm talking about someone completely new to Ember looking through the examples and documentation. Even if they were looking through the repository, it would be easy to overload a file called "TRANSITION.md" if you don't need to transition from an older Ember Data version.