Re: mapping form fields to database and handling multiple users

by Tino Wildenhain <cdtv(at)amigager.de>

 Date:  Sun, 01 Jul 2001 16:18:32 +0200
 To:  Bennett Haselton <bennett(at)peacefire.org>,
hwg-servers(at)hwg.org
 References:  speakeasy
  todo: View Thread, Original
Hi Bennett,

you might also look at Zope (http://www.zope.org/ )
Zope covers an object oriented storage (which can
layout over different storage solutions) with an
application framework and can be programmed using
python and or C. You will find Python a lot faster
then Java for most practical cases, including prototyping.

If you look at activestate.com you will find python plugins
for visual studio as well.

Although there are many products avaiable as plugin for Zope,
you should focus on ZPT (Zope Page Templates) and
the object-relational mapping produced with ZPatterns and
stuff. SQL and other relational databases are as well easy
included and work with transactions if supported by the
particular database.

You probably will like the extensible permission engine built
into zope, since it supports exacly what you want here and may
be even more.

Regards
Tino Wildenhain

--On Sonntag, 1. Juli 2001 02:54 -0700 Bennett Haselton 
<bennett(at)peacefire.org> wrote:

> I've written a Web-based application that allows users to log in and edit
> profile data associated with their username.  Right now the application
> consists of perl code written from scratch, and for each username, the
> "database" storing information for that username is just a flat text file.
>
> The perl code I've written actually does an OK job -- handling logins for
> multiple users just involves checking a username and password against a
> text file, and then reading another text file that stores the user's
> settings, and filling in the correct values in form fields.  Sometimes
> it's  an advantage that I've written everything from the ground up -- for
> example, I wanted to have a field in the user's settings file that
> indicated whether the user had changed a particular setting in the last
> 24  hours.  I just added new "Fieldname_HasChanged" field, and altered
> the  update code so that the new value would be checked against the old
> value,  and "Fieldname_HasChanged" would be set to 1 if they were
> different.  If I  had been using an out-of-the-box solution, I doubt if
> that kind of  low-level tinkering would have been possible.
>
> On the other hand, since I'm about to rewrite the application using a
> more  scalable language and a better database system anyway, are there
> pre-built  solutions already out there for handling either or (ideally)
> both of the  following situations:
>
> - The site stores accounts for multiple users.  Users log in through a
> form  on the main page; the system hides the details of how user login
> states are  maintained (through cookies, or cryptic URL strings, or
> whatever).  While  logged in, users can view multiple pages whose content
> depends on the  user's account details.
>
> - The server stores data associated with each user.  When a user logs in
> to  the site, they see a page containing form fields with values filled
> in  corresponding to the user's data.  They can edit and update their
> data by  changing the values in these form fields and clicking an Update
> button.
>
> Both of these are, admittedly, not very hard to code by hand, but a
> pre-built solution would decrease the chances of some tiny logic error
> creeping in and trashing large amounts of user data.
>
> Ideally I'm looking for a way to do it in server-side Java, since Java is
> the language that the application will probably be re-written in.  (I
> have  to stop using perl since I've found that I can write code much,
> much faster  with statement completion and drop-down fill-in-the-blank
> capability in my  code editor, which means I have to use some language
> supported by Visual  Studio.  Of course this means I have to put up with
> a lot of ribbing from  friends who eat assembly code for breakfast.)
>
> 	-Bennett
>
> bennett(at)peacefire.org     http://www.peacefire.org
> (425) 649 9024
>

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.