4 ms·
We had a discussion if we should skip Ember Data or not but concluced that it seemed easier to write custom serializers and adapters for most models instead. Ma
by staticelf 10y ago
We had a discussion if we should skip Ember Data or not but concluced that it seemed easier to write custom serializers and adapters for most models instead. Maybe it was an incorrect assessment but after a pretty steep learning curve I can at least say I know a lot about how ember works :)
Also, if you do not use Ember Data, you don't get to use the data part of the nice Ember plugin for web browsers.
- Touche 10y agoI don't follow your criticism then. Sounds like you have a really bizarre back-end setup and Ember provides you a low-level way to integrate it, so how is that "too opinionated"? Did you expect a high-level API that would work with this multiple endpoint setup?
- ehsanu1 10y agoClearly the criticism is that it was very muh harder than it had to be, due to the opinionated nature of Ember, even though it's possible. Eg, things you expect to work just not working, because some hidden convention is being violated, and requiring a bunch of hacks to make it work (making this example up btw, I haven't done any Ember). I'm not sure I'd conclude that their backend is bizarre, sometimes things cannot be perfectly resource-oriented in a 1:1 fashion with the backend. I know I've needed to expose two different endpoints and frontend models for the same backend model, for good reasons.
- mnutt 10y agoIf your data isn't resource-oriented, you are probably better off without ember-data. We started off using ember-data with an aggregated stats API and eventually found that just using regular ajax was much easier. No hacks needed, just define model() as an ajax call and don't pull in ember-data. If you're using ember without ember-data, you don't have a "store" and ember-inspector's data-store inspector won't do anything. You'll probably end up having to look at network calls. Ember is opinionated in plenty of ways, but I don't think reliance on ember-data is one of them.
- staticelf 10y agoThis. I can say that maybe it would have been a better choice to go without Ember Data but since we started there is simply too much work to redo a lot of stuff instead of just continuing in the same path. We didn't know ember had these conventions when we started working with it since it doesn't really advertise it and the problem first arises when you're trying to do something that feels easy but gets complicated due to Embers convention.
- Touche 10y ago> Clearly the criticism is that it was very much harder than it had to be, due to the opinionated nature of Ember, even though it's possible. The opinion is just wrong, then. It wasn't harder because Ember is opinionated. It wouldn't have been any easier with React, which has no model layer at all.