From: Jeff S. <hea...@ya...> - 2007-01-26 06:13:35
|
Hi David, I think when it comes to sessions and TclHttpd from what I have read most people tend to roll their own even though TclHttpd has a Session module built in. I think one of the reasons they don't use it is because of lack of Documentation and examples thus your question. I don't know whether the Session module is a good or bad design but due to my lack of programming experience I decided it would be a better experience for me to try and figure out how it worked rather than reinvent the wheel. The Documentation summarises how the Session module works and there is an snmp.tcl file in the TclHttpd distribution that uses it. I followed this and wrote a Username and Password database using Metakit. This is used on a daily basis at my work and has been running for several years. The Session module is used for record locking and as well as serialising the write requests to the database. This works well for Metakit due to its concurrency limitations. The Session module has 2 parts. The first part is used for the Session id stuff and is stored in a state array. The second part creates a slave interpreter and excutes the pages in this interpreter. I followed this approach but after I finished I realised I could have just used the first part without the second. Refer to http://wiki.tcl.tk/8657 for an example. Since I used the Session module it has been enhanced so there are probably new features available. Kind Regards Jeff Smith --- David Gravereaux <dav...@po...> wrote: > Hi, > > I need to manage user sessions across different > pages of a domain script hooked > into data I'll have to save/retrieve from a > database. I'm not sure where to begin.. > > Well, actually, beginning at the login page seems > most obvious.. But I don't know > how to begin the back-end code for it.. Any > pointers? > > -- > I'm learning real skills that I can apply > throughout the rest of my life ... > Procrastinating and rationalizing. -- Calvin > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > TclHttpd-users mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tclhttpd-users > ____________________________________________________________________________________ No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail |