[Ur] Forms that call rpc instead of redirect
Aistis Raulinaitis
sheganinans at gmail.com
Sun Feb 11 19:13:17 EST 2018
Right. I have considered spending more time looking over UPO! The auth
system looks very interesting and relevant, I'm still working on wrapping
my head around it.
Any pointers to get me started on the right path when it comes to a more
effective usage of source based forms?
On Feb 11, 2018 16:09, "Adam Chlipala" <adamc at csail.mit.edu> wrote:
> I'm not sure what to suggest. No, there is no existing feature like what
> you suggest. I have found it quite pleasant to work with sources and
> widgets connected to them. And it is even better to use higher-level
> abstractions like in UPO <http://upo.csail.mit.edu/> (itself likely not
> applicable to your card game).
>
> On 02/11/2018 05:03 PM, Aistis Raulinaitis wrote:
>
> Yes I did get a little demo working with ctextbox, cchecbox, and the like.
> However the result is much more verbose and more likely to have runtime
> errors over a regular form.
>
> The way that a form will pack all of its contents into a stuct is a clear
> advantage over the source based route. It requires defining possibly many
> sources and wiring them all into the right slots, having to call "get" on
> each one of them in the onclick handler and then wire all the gotten values
> into the handler.
>
> Losing the form submit struct typing mechanism and the added verbosity of
> all the sources would be very painful if you are expecting the majority
> of your forms to be of this style. Which I am.
>
> On Feb 11, 2018 13:20, "Adam Chlipala" <adamc at csail.mit.edu> wrote:
>
>> I think that kind of form has gone out of style, and I personally almost
>> always use the Ur/Web tags like <ctextbox> to collect data and then choose
>> RPCs programmatically.
>>
>> On 02/11/2018 04:10 PM, Aistis Raulinaitis wrote:
>>
>>> The form mechanism is excellent, with the built in type checking, but
>>> the submit action function returns a page: state -> transaction page.
>>>
>>> Is there such a thing such as a version of forms that has a submit
>>> action function with a type of: state -> transaction unit.
>>>
>>> This is so I can call rpc functions there in the submit action and then
>>> the current page is updated using responses over a channel from the server.
>>>
>>
>
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20180211/b359a63a/attachment.html>
More information about the Ur
mailing list