Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending mobx to fully featured Adaptive (Incremental) Programming toolbox #1369

Closed
awto opened this issue Mar 6, 2018 · 2 comments
Closed

Comments

@awto
Copy link

awto commented Mar 6, 2018

This is an Idea but not about a change in Mobx, it is rather about possible another tool based on Mobx framework.

I'm finishing a transpiler for embedding computational effects in JS - EffectfulJS. One of possible such effects is an Adaptive (Incremental) programming. Namely re-executing only parts of the code when some dependency changes. Like @computed property but not re-executing the whole function, only a part (delimited continuation) to reflect the changes in variables. These may be loops, other functions calls etc - some heavy computations.

For example, if there is a huge data grid and we want to render only a visible part of it (with possibly applied filtering, sorting etc). We can write simple for-of loop rendering the grid between starting and finishing position, and if the variables change (on scrolling), or new data arrive from a server only the changed parts rerender, without even using special component, they typically lack some required feature. Or, imagine, it is a game scene rendering where some object changes but the code doesn't bother on handling the changes, it just renders the whole scene once, the rest is handled by the underlying framework.

Adaptive programming is not why I wrote EffectfulJS, so I'm asking here if this may be interesting to avoid spending time on something nobody needs.

I believe it is fairly easy to utilize Mobx for this. From my transpiler it will receive proper continuations (which may be fired more than once). And they are used called the same way @computed properties are called on dependency change. There is already delimited continuations effects library. Mobx can just call the continuations like it does for @computed properties.

A couple of links about Adaptive Programming (though they are about functional programming)

This is based on rather complex functional programming concepts but end-user won't need to know them to use. They will just write plain JS programs.

@awto
Copy link
Author

awto commented Mar 10, 2018

oki, moving it to EffectfulJS, closing here, if anyone wants to comment, ask or suggest anything here is the ticket awto/effectfuljs#3, or contact me privately via e-mail or gitter.

@awto awto closed this as completed Mar 10, 2018
@mweststrate
Copy link
Member

I think it is a super interesting direction and thought about it myself quite some times (it is one of the reasons why i still want to build #166, some day..). But indeed, not really an issue to discuss here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants