Giter VIP home page Giter VIP logo

Comments (5)

mxgrn avatar mxgrn commented on August 24, 2024

It's a very interesting idea, but it probably won't work in case when the config contains objects that can't be safely serialized to be stored in the session. An example: say, the component "c" from your example receives as a parameter the instance of its container, the component "sub". Maybe we could implement the caching in such a way, that the developer will decide which components support caching, and which don't. Does it make sense? Would love to hear your opinion.

from netzke-core.

vimutter avatar vimutter commented on August 24, 2024

Yes, there should be some option, for example :cache, that indicates how the endpoints will be stored. Also, for the storing in session we could use some cleaning os the Hash itself, to clean-up proc and non-serializable objects. And of course the ensurement that component is cachable should be on developers side. So how do you think? I have experimented with cashing in session, and it appeared to work.

from netzke-core.

mxgrn avatar mxgrn commented on August 24, 2024

I'm not sure why you refer to endpoints where I was thinking about caching the complete config for (deeply nested) components. I suppose, this work would need to be done in invoke_endpoint in services.rb. So, it will probably be a component's config option which will command Core to store this component's configuration in session cache. I'll be watching closely your experiments if that was the intention of forking Core. Thanks so far!

from netzke-core.

vimutter avatar vimutter commented on August 24, 2024

You are right, the main idea was about caching config. I will try to experiment on it closely as I can.

from netzke-core.

mxgrn avatar mxgrn commented on August 24, 2024

Eventually, I came to the conclusion that with the right component design, instantiating the component tree should not be a problem. What we should simply avoid is to put too much into "def configure" (v0.8.x), leaving as much as possible to "def js_configure", which is not called at instantiating the component (e.g. with the aim of processing an endpoint call).

from netzke-core.

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.