Giter Site home page Giter Site logo

Comments (3)

abdulhaq-e avatar abdulhaq-e commented on August 26, 2024

In addition, rather than searching everything for resources to update, maybe it's better if a new part of the store holds the resources that need to be applied.

So the moment a resource is marked as CREATED/UPDATED/DELETED then the identifier of that resource is put in the store which can then be used by apply instead of searching. What do you think?

from ngrx-json-api.

remmeier avatar remmeier commented on August 26, 2024

yes seems perfectly right, the set of ids of resources that are updated together should be stored in store as well. But I think this is something very application specific and ngrx-json-api should not attempt to solve that for an application.

In general I like the current data model. It is simple, normalized. I can select a resource and get all the information including original remote state, update state, etc. All that makes it easy to use and explain. So I think that should remain unchanged in the context of this ticket.

From a performance perspective, apply is called quite rarely. The looping a few dozen to thousand resources is negligible.

so to conclude, I think, just those array of ResourceIdentifier and a set of inclusions should be sufficient. But the documentation should state how to make use of that (meaning write an effect or something than then triggers the apply action with ids fetched from elsewhere in the application-specific part of the store)

from ngrx-json-api.

remmeier avatar remmeier commented on August 26, 2024

introduced a "ids" and "include" parameter to control which parts of the store should be applied to backend.

from ngrx-json-api.

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.