Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: mod_perl web app design considerations

by abell (Chaplain)
on Sep 04, 2002 at 09:37 UTC ( #195020=note: print w/replies, xml ) Need Help??

in reply to mod_perl web app design considerations

I would opt for solution 4 :-)

4. Put images into the database together with "confirmed" images, with a flag set to 'uncofirmed'. If the images belong to a more complex structure which is being built through a sequence of forms, put the 'unconfirmed' flag (a boolean field) on this structure, and set it to 'confirmed' when the input process ends properly.
This way, images remain private and you can use the same routines you apply to regularly stored ("confirmed") images. You only need this extra boolean field in one database table and you need to check it when you perform queries on confirmed images (so add ' AND confirmed=TRUE' to all WHERE clauses in your queries on images).
Every now and then you can delete all unconfirmed images, based on their upload date (if you have it stored somewhere), on their ID or simply when no user is in session .
The drawback is you have to pay a little overhead for retrieving images from the DB at the following stages of the input process, but maybe this is what you already do when showing images to users.

Best regards

Antonio Bellezza

Update: minor language corrections
  • Comment on Re: mod_perl web app design considerations

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://195020]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2018-04-22 13:47 GMT
Find Nodes?
    Voting Booth?