On Thu, Sep 26, 2002 at 02:42:11PM -0500, Ian Bicking wrote: > > If I'm understanding the concept behind an > > app server, the state of my application could remain intact between > > pages without me having to try to maintain it between pages. That's > > what I've been using sessions in PHP for, but it always seems to get > > complicated--especially when it comes to accepting/validating form > > data. Or maybe I'm just dense... > > Yes, Webware would be appropriate for this sort of application. It's > still similar to PHP in terms of session data, but hopefully it would > still be simpler. I'd recommend you spend time putting all the hard > work (with the databases and statistics generation) into a plain Python > module (i.e., one that doesn't use Webware in any way). Then you can > use Webware servlets to provide an interface to this module. This will > help keep your code cleaner, and probably make the programming more > pleasant.
There are two types of application data. Data that depends on the current user has to be kept in session variables like PHP because the appserver is handling several users at once, and the only way to tell that this transaction is related to a previous transaction is if they have a common session ID. But there's another type of application data, that which doesn't depend on the current user. Perhaps it's an array of error messages or cached data. With PHP, you'd have to reinitialize it from source every transaction. With an application server, you can store them in module globals as Ian suggests, and they are "already there" for the next transaction. That's the kind of state Webware gives you that PHP doesn't. -- -Mike (Iron) Orr, [EMAIL PROTECTED] (if mail problems: [EMAIL PROTECTED]) http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
