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

Implement modules SharedReact and SharedReactivedata #162

Closed
balat opened this issue Dec 10, 2014 · 3 comments
Closed

Implement modules SharedReact and SharedReactivedata #162

balat opened this issue Dec 10, 2014 · 3 comments
Labels

Comments

@balat
Copy link
Member

@balat balat commented Dec 10, 2014

Take inspiration from Eliom_csreact file (in branch sharedreact).

@balat balat added the feature label Dec 10, 2014
@Drup
Copy link
Member

@Drup Drup commented Feb 11, 2015

Notes from today's discussion:

So, the feature goal is to implement the R module for html/svg on the server that would create an initial value on the server and a signal on the client (with the right initialization).

  • Here is the branch: https://github.com/ocsigen/eliom/tree/sharedreact
  • Currently, tyxml's functor is not used, and it needs study to see how to use it, it seems not completely trivial.
  • Needs to add {shared{ <expr> }} in expression position that would desugar to the pair ocaml ( <expr>, {{ <expr>}}). Also need type 'a shared_value = 'a * 'a client_value.
  • An equivalent of the React.S module should be reimplemented on 'a shared_react = 'a * 'a React.S.t client_value.
  • When a previous page is already here and we reload the page, in order to keep all the signals working properly, we need to use the old signals (but update their values back to the one sent by the server). Currently, this is done by registering signals in a cache (see Eliom_cscache) manually. It may be possible to make that more automatic.
  • There might or might not be a problem of flickering when the initial server value is replaced by the signal. For now it's not visible.

@balat: Did I forgot anything ?

@balat
Copy link
Member Author

@balat balat commented Feb 17, 2015

No it's ok.
Keeping the old value of signal is not really related to Eliom_cscache.
User will decide where the signal is stored (for example in the cache).
The main problem with current solution is that it is too easy to forget the
[~default] parameter to React.S.create (and quite boring to have to do so).

Le Wed Feb 11 2015 at 02:19:14, Gabriel Radanne notifications@github.com
a écrit :

Notes from today's discussion:

So, the feature goal is to implement the R module for html/svg on the
server that would create an initial value on the server and a signal on
the client (with the right initialization).

  • Here is the branch: https://github.com/ocsigen/eliom/tree/sharedreact
  • Currently, tyxml's functor is not used, and it needs study to see
    how to use it, it seems not completely trivial.
  • Needs to add {shared{ }} in expression position that would
    desugar to the pair ocaml ( , {{ }}). Also need type 'a
    shared_value = 'a * 'a client_value.
  • An equivalent of the React.S module should be reimplemented on 'a
    shared_react = 'a * 'a React.S.t client_value.
  • When a previous page is already here and we reload the page, in
    order to keep all the signals working properly, we need to use the old
    signals (but update their values back to the one sent by the server).
    Currently, this is done by registering signals in a cache (see
    Eliom_cscache) manually. It may be possible to make that more
    automatic.
  • There might or might not be a problem of flickering when the initial
    server value is replaced by the signal. For now it's not visible.

@balat https://github.com/balat: Did I forgot anything ?


Reply to this email directly or view it on GitHub
#162 (comment).

@vasilisp
Copy link
Contributor

@vasilisp vasilisp commented Oct 15, 2015

This is in master now, so closing. All @Drup's points are addressed, except reusing old signals, for which we offer no help at this time. Report more specific issues as needed.

@vasilisp vasilisp closed this Oct 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants