<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I noticed the recent check-ins by Attila to enable dirty component<br>tracking which should allow for asynchronous updates. The polling
<br>script is only enabled for single-frame-applications and I'm having a<br>devil of a time understanding how this is intended to be used, the<br>implications of a single-frame application and what the interface is for<br>
informing UCW that one of the components has had an asynchronous content<br>update.</blockquote><div><br>ok, for the first part i have no useful answer: this is the state of the code. i wanted to get rid of backtracking (in short: speed, per session memory leaking, and ajax apps can have much better navigation then the loosey back button). so i've added the single-frame-application-mixin that achives this.
<br><br>then i added some features (polling) that is only useful/interpretable with ajax apps and it ended up hooked on s-f-a-m. there's a lot to be cleaned up in the way sfam/ajax is integrating into the rest of ucw. it's even possible to mix backtracking/back button with ajax stuff, but i don't really understand how that should work. so for now (and maybe for a long time) ajax apps are like a remote desktop connection to the server. if you press the back button you are looking at the past, that is out of sync. pressing something will most probably end up in a redraw of the screen, just like the refresh button of your browser.
<br><br>you should inherit sfam, and then you get the polling support and lose backtracking. then you have a few methods you can specialize on (this is also young code, so don't expect a cristal-clear interface here):<br>
<ul><li>(notify-session-event session) to wake up a session poller. iow, tell ucw you have stuff for the client.</li><li>(has-events-for-the-client session) to customize the check for actual events (you (the poller) may be woken up without actual events). the default implementation only checks for dirty components in the session.
<br></li><li>(send-events-to-the-client session) to actually implement sending stuff to the client. the default impl is empty, this is a small anomaly in the code. dirty components are implicitly sent at the end of the ajax answers for now. this is a TODO entry to move it here... you can also add your custom stuff here, but rendering xml to the yaclml-steam from an ajax action body is way much simpler.
<br></li></ul></div>and finally take a look at the shared-counter example. it demonstrates nearly all of this.<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have an application I'd love to put together with UCW, but it requires<br>the ability to perform frequent updating of the client UI based on<br>background server processes. Any help/insight would be appreciated.</blockquote>
<div><br>hope the above helps. </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I've also noticed that the current repository state seems to not handle
<br>the back button and refresh buttons properly. The isolation counter<br>example is definitely not behaving correctly on either refresh or back<br>button (refresh always resets all counters to 0) and I'm seeing funny<br>
behaviors with my current application. I can provide further details if<br>this is not a known problem -- or perhaps is a result of my<br>unfamiliarity with some of the new functionality in the ajax branch.</blockquote><div>
<br>i've deleted some superfluous disallow-response-caching calls that may have caused some confusion. also added some more description to the example page. after the fix and some clicking it seemed to be behaving as expected, but it even fooled me once to think it's broken... :)
<br> <br>anyway, if you find unexpected things to happen after the update, feel free to ask.<br></div></div><br>-- <br>- attila<br><br>"- The truth is that I've been too considerate, and so became unintentionally cruel...
<br> - I understand.<br> - No, you don't understand! We don't speak the same language!"<br>(Ingmar Bergman - Smultronstället)