[Ur] Busy indicator

Adam Chlipala adamc at csail.mit.edu
Fri Sep 2 15:49:55 EDT 2016


On 09/02/2016 02:07 PM, Saulo Araujo wrote:
>
>     I think this really is a serious usability issue.  In your
>     original example, what happens when your program is using a
>     library that, between versions, starts making more RPCs, so your
>     UI says that "your" code is "still working" when actually it's an
>     expensive RPC in a library?
>
>
> In this particular case, the UI would correctly show to the user that 
> there is some ongoing work.

But the original intent may have been only to report ongoing work in the 
application itself, rather than in libraries that it uses.  With 
multiple threads providing background services, the results could be 
very confusing.
>
>     To add such behavior on top of existing Ur/Web code, you just need
>     to redefine the identifier [rpc] at the top of a file, which could
>     be accomplished by [open]ing a library module.
>
>
> Rather than changing every file that is part of a library (possibly 
> developed by others, in which case I may not even have its source 
> code), I would prefer redefining the functions requestUri and 
> xhrFinished to update the rpcCount source. Both options seem like a 
> hack to me. However, the latter is a more centralized one.

I think it is a desirable feature of the language to prevent implicit 
changes to behavior of operations.  So, if this counting isn't built in 
(and it isn't clear that its use cases are compelling enough), then I 
like that it takes explicit work in code to add counting.

> I think that AngularJS (and others) provides a "poor's man" aspect 
> oriented programming.

Yes, and aspect-oriented programming has very few fans today.  Even some 
of its original designers repudiate it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20160902/8c4b1763/attachment.html>


More information about the Ur mailing list