Giter VIP home page Giter VIP logo

Comments (4)

cah-brian-gantzler avatar cah-brian-gantzler commented on June 8, 2024 1

@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.

runspired avatar runspired commented on June 8, 2024

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.

hennii avatar hennii commented on June 8, 2024

@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.

runspired avatar runspired commented on June 8, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.