Move all business logic into stand alone Python modules, then convert the ..ASP pages to Cheetah templates
Stay on IIS until you can move wholesale to Python.
Shared sessions:
1) create a db table to store all session data.
2) Always create the session first in IIS. In your global ASA create a
"sub onSessionCreateOrSomeNameSimilar" that creates a row in the db table with the newly created sessionID
write another subroutine to trap the onSession expire event, and use that to either delete the row from the table or mark it dead.
In your awake method you check the database for a session, and if its there use that data.
If you want to use webware sessions also you can copy the database row into the Webware session.
If the session is not there or marked dead then call session().abandon.
Actually a slicker way would be to add some sessionMixin code into your __init__.py.
Actually Webware supports different session types so you could write a version of SQL session that supports your data.
The real problem is that webware wants to pickle the data, so you can create and delete session values on the fly. If you map to a database then all of the fields will have to be know.
I guess that you could also use some string encoding system (maybe convert value - pairs into a POST or GET string - supported on both servers)
In all of your webware pages make sure that you serve something from IIS so you keep the session alive.
I did a lot of IIS work in PerlScript, (I never actually tried PythonScript) and it worked great.
-Aaron
Max Ischenko wrote:
Hi,
I have a rather big ASP/IIS-based system which I'm trying to rewrite and extend with python (more specifically, using Cheetah/WebKit).
I've already wrote some useful code in Cheetah/WebKit and now I'm thinking about the best way to integrate it back into the legacy system.
Basically I see the simple route:
Put Response.Redirect('webkit/..') into .asp pages. But I need to shared data between IIS and WebKit I'm not sure how to do it. First of all, I 'd like that both env. match the session state: create WebKit's session when IIS session starts and end WebKit's session when IIS session ends. Would appending parameter _SID_=xxx start the session? If yes, then how could I end it? Add another redirect to the page that would call self.session().abandon()?
Other ideas for integration and discussion are wellcome.
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
