-
Notifications
You must be signed in to change notification settings - Fork 89
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
sending data between the client and the server, ie ajax #268
Comments
Hi, Fay uses Like you discovered, the representation used is pretty much the JSON object you'd expect, with the index.js's To produce a string like this on the server side:
And to read:
Perhaps we should expose these directly from In the produced js these aren't available directly but internally the same thing happens, which lets you do FFI calls like
which will instantiate the object through the In the snaplet-fay example I defined this ffi function for ajax calls:
The data supplied is stringified and sent to the server in the request body. As for State you have a few options:
Let me know if this cleared things up for you, otherwise I can try to elaborate. Cheers! |
I'll close this, please ask if you have any other questions |
Dear Adam, Thanks so much for your input. I should have thanked you earlier, but I got things working with your help. I should be ready to put my example online any day now. Best wishes, |
Good to hear! Looking forward to it. |
Adam, thank you for the clarification. Are you planning designing RPC syntax and protocol? I mean for example:
I know there's and issue with the dependency solver. Some packages would not be required directly in source and thus should be excluded. Maybe a GC like algorithm? The only thing i find dirty about this implementation is the ajax settings (url). I think it could be embedded in a data type with the service itself? I don't quite now Makes me curious if this makes sense or if it's an overkill. |
The text was updated successfully, but these errors were encountered: