Comments (4)
@hennii I found this blog post a while ago https://blog.lux.name/2-dive-into-ember-data-1/ that is a good introduction. I havent found a part 2 yet, hope it comes eventually.
Did a lot of reading from @runspired overview https://blog.emberjs.com/ember-data-5-x-update-2023-04-15/ (Thanks for all the hard work), and am interested in references to how serializers are handled. I do need some property renames for example and not sure where that happens in the request/cache versions.
from ember-cli-mirage.
Autodiscovery is (period) bad. I think at most what ember-cli-mirage could do for ember-data is integrate with the schema service and build its models on-demand from the schemas that service provides. But really the mistake mirage is making here is twofold (1) in assuming a library like ember-data has models and (2) in using presentation classes (models) as schema sources (even for itself). Both of these are brittle foundations.
One of the points I was trying to convey in my comment is that the future of EmberData has no models. Neither in the container nor on disk. Autodiscovery simply will not work, because there is nothing to discover.
EmberData users will likely come up with a lot of ways of supply schema to the schema service (or be schema-less). The encouraged patterns will be around just-in-time derivation/loading. The friction here is probably because EmberData is not an ORM while Mirage attempts to be.
from ember-cli-mirage.
@runspired I'm really curious about the idea of models going away from EmberData, do you have any more resources you can link to regarding this idea/discussion?
from ember-cli-mirage.
@cah-brian-gantzler any data munging to align API to cache format should happen in a handler. That said, such munging always should be considered a code smell if you have the ability to align the cache to the the API or the API to the cache. There are times when neither of these is possible (3rd party API with a format that's not very useful so you want a different cache format anyway) but they are usually rather rare.
from ember-cli-mirage.
Related Issues (20)
- Proposal to change of Mirage Setup HOT 4
- Remove autostart HOT 7
- Remove the testConfig function HOT 5
- Consider making MirageJS a peer dependency HOT 12
- Mirage not intercepting requests HOT 1
- discoverEmberDataModels() triggers `ember-data:deprecate-early-static` deprecation HOT 4
- v3 upgrade guide? HOT 1
- Timing not working in miragejs server instance HOT 1
- breaks when using ember-data 4.8.0 HOT 15
- Extending a model breaks one-to-many relationship
- Mirage cannot preload assets HOT 2
- New Release? HOT 14
- discoverEmberDataModels() fails if any pre Octane style Ember model has a property named `errors` HOT 1
- Tests only? HOT 9
- Is it possible to have a custom folder for fixtures in mirage? HOT 2
- Accessing Models using `require()` will no longer work on ember-data v5 HOT 1
- `discoverEmberDataModels` crashes if there is a non ember-data object in the app/models folder HOT 6
- mirage enabled even when using `--proxy` flag HOT 5
- Polymorphics - missing the buid method HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-mirage.