Agreed.awake. My view (I'd love to hear others) is that an unhandled exception in awake() is called a bug and should be fixed in development. I don't want the framework to force me to write sleep() with extra conditional logic to avoid clobbering an exception raised from a bug I may code into awake().
And I agree that they should be thought of in pairs; everything that awakes must also sleep. In fact, everything must also respond, but it can do so by sending a redirect or running an action.
This has bugged me about WebKit for a while, and we always change our SitePage to make it more consistent:
Our servlets ALWAYS do awake - respond - sleep. WriteHTML() is really inside of respond, and is effectively the default "action". Other actions cause WriteHTML to not really run, and you get bone-headed output like:
<html><body></body></html>
Usually, when an action is run, you either want to redirect somewhere OR do some output. Either way, there is still a response. But the output chain that is so nice in WK is short-circuited with actions.
Also, I'm not sure that the action should be called from respond... respond should be about sending data to the client. Action is usually used to do some application logic, like saving data to a database. Sometimes it's an alternate output, I suppose...
How do most people listening use actions?
I suppose that rather than keep complaining, I should make a proposal. ;-)
------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
