Regarding session management, CGIDEV2 already has tools that make this easy to do at the CGI program level. 

If and until Rich Diedrich develops something better, these tools should meet your needs.

Please see http://www-922.ibm.com/cgidev2h/readme.htm#funcusrspc1 and read the topics "Saving and restoring state information" and "User space subprocedures." 

See the code in sample program STATE, http://www-922.ibm.com/cgidev2p/dspsrc.pgm?cgiinp01=cgidev2&cgiinp02=qrpglesrc&cgiinp03=state , which
saves and restores state information using CGIDEV2's user space subprocedures, CrtUsrSpc and RtvUsrSpcPtr.

Also see the prototypes for these subprocedures in PROTOTYPE2 http://www-922.ibm.com/cgidev2p/dspsrc.pgm?cgiinp01=cgidev2&cgiinp02=qrpglesrc&cgiinp03=prototypeb

Managing session time-outs would involve saving in the user space a timestamp for the last transaction and calculating the elapsed time between that time and the current transaction.

Cookies are not necessary for session management, since any session related data can be stored in the user space. The only piece of data that has to be sent back and forth is the user space name, which can be done with a hidden form variable or a cookie.  Since some users turn cookies off, I prefer to use a hidden variable.  If you want to use a cookie, CGIDEV2 has procedures for creating and retrieving cookies,  http://www-922.ibm.com/cgidev2h/readme.htm#funcCookies .

I hope this helps.

I'll leave your "XML/WebService Support" and "Simple Encrypt/Decrypt Procedures" ideas for Rich Diedrich to consider.

Mel Rothman, CGIDEV2 Author
Mel Rothman, Inc.



[EMAIL PROTECTED] wrote:

I've been keeping this message in the back of my mind thinking of things we would really like to see in CGIDEV2.  It is a really well put together package, so it was sort of hard to think of things, but here are some things I would like to see:

Session Management - You have mentioned this is in the works and my company has already programmed most of what we need in this department, but it is a major feature that is currently missing from CGIDEV2.  Particularly, I would like to see CGIDEV2 automatically create cookies to pass around a session ID as well as have support for cookieless sessions.  A way to store "session variables" would also be very handy.  Most importantly, the session management tools should allow you to easily set and manage session time-out.

XML/WebService Support - Another valuable enhancement would be to include procedures for parsing and writing XML.  Particularly writing and parsing SOAP.  I've read somewhere that maybe something like that is coming to RPG itself in V5R4, but I think you should still add it into CGIDEV2 for those who may not be in a rush to upgrade to the new version of the OS.

Simple Encrypt/Decrypt Procedures - I would also like to see some simple procedures for encrypting (or hashing) and decrypting strings.  By simple, I mean procedure(s) that have 2 or 3 parameters.  For instance, only require a string and a key and return the encrypted or decrypted string accordingly.  This would be valuable for encrypting things stored in cookies or hidden input variables that we do not want to be seen.  I don't store extremely sensitive information in cookies or hidden fields, but I do store things I would encrypt if it was simply a matter of calling a procedure to hide the true value.

Thanks,

Matt Lavinder



"Rich Diedrich" <[EMAIL PROTECTED]>
Sent by: [email protected]

11/22/2005 09:03 AM

Please respond to
[email protected]

To
[email protected]
cc

Subject
[Easy400Group] Enhancement requests







I really appreciate the suggestions that I have received so far, both
on this site and through email, and I would like to repeat that this
is a good time to let me know what you would like enhanced.  I will
evaluate all of the suggestions (and the discussions on the
controversial ones), and use that information to help me shape the
enhancements and future direction of CGIDEV2.  

The suggestions do not have to be specific implementation changes, but
can include more general requests, like the one for more assistance in
handling persistence data.

Rich



SPONSORED LINKS
How to format a computer hard drive Cobol programmer Iseries 400
How to format a computer


YAHOO! GROUPS LINKS




Reply via email to