|No such thing as a small change|
Using the file system as a DB in a web app?by jimbus (Friar)
|on Apr 07, 2006 at 05:11 UTC||Need Help??|
jimbus has asked for the
wisdom of the Perl Monks concerning the following question:
I'm converting an app from JSP to mason/mod_perl that allowed xls files to be uploaded and then hyperlinked them for later access. When I'd originally built the app, the customer had a limited number of reports and it made sense for me to set up a few columns in mysql to handle the three keyword columns (one keyword per), urls and display name for each file. I used the keywords to create the directory structure in the upload area. As part of the conversion, there is a change in requirements. The customer has decided he needs more/different granularity because he had more reports. Now different reports and resources have different numbers of keywords and things aren't as neat as they were and I'm wondering if there might be a better way to approach tracking the files.
My thought is, since I have a fetish for fully descriptive file and directory names, could I write a quick PM to travesrse the varying length directories, prettying up and capitaling the names and embedding them in hyperlinks to the next level to print out on the page. When I reach a leaf, I could extract the entire path and filename for the page title and the date from the filename for the hyperlink to the file.
OK, I guess the point of this.. other than it helps focus things in my head to try and explain them... is: How safe is this? Is this realistic from a a performance point of view? Of course, I'll regex all the input to make sure no one is trying to back door the system. Is there anything else I need to worry about?
--Jimbus aka Jim Babcock
Wireless Data Engineer and Geek Wannabe