I love the natural style of page conversation on the example page. As a Java developer, I wish that this style were possible on the servlet platform: local login_page = Tir.view("login.html") local login_form = Tir.form { 'login_name', 'password'} local function login(web, req) local params = login_form:parse(req) repeat params = web:prompt(login_page {form=params, logged_in=false}) until login_form:valid(params) ret…
Where this kind of coroutine stuff sucks though is in anything that's "RESTy". In other parts of Hype.la I had simple Xhr callbacks that just grabbed lists of data, so the coroutines were just annoyingly in the way and half the time they were just a big loop with an if-statement for the URLs.
That's where the evented came in. In that way I just map actions to callbacks and done.
Then I ran into a few simple things that didn't work in evented and were still stateless, like the search interface, and so I use the stateless handler for that. Nice and snappy with no extra junk.
Another advantage of all this is that, if you have a part of your app that needs to be resistant to restarts, then you can craft it evented or stateless. In other parts, restarts aren't a big deal so you can do natural. And since everything is just a bunch of little processes, it scales out nice and doesn't have as much of the "gotta-copy-the-world-for-users" that Seaside upgrades do.