It is going to be a database driven interactive site, and if possible I would prefer the database to be xml based.
Hmm, what do you mean, that the database is an XML file? That won't be too speedy...
Im not anticipating having to store more than a few megabytes of user data as this is going to be a highly specialised service.
"A few megabytes" is, IMO, already too much for an XML file.
should I use mod perl?
Duh? First you make it dead slow by abusing an XML file as a "database", and then you'll use mod_perl to speed up the startup time??
My recommendations, since you asked:
- Don't use an XML file as a database. You can use SQLite, if you want to have a file as a database and yet have a very low startup overhead. Or, if installing is a bit of a problem (while all you need to do is to compile the module, it contains the database engine), perhaps a Pure Perl module like DBM::Deep will appeal to you.
- Don't start with mod_perl if it's your first time. Do it in CGI first. When you're happy with its functionality and it needs just a little bit of improvement on startup speed, then you can port it to mod_perl, or fast_cgi, or something else in that vain... You'll be happy to find that your code probably won't need too many changes, if you've done it right. By the time you get there, mod_perlite might already actually be usable for production.
- Like others said: use templates for the HTML, let your app just drive it and provide the data to fill in. Template Toolkit, HTML::Template... pick your favourite.
But don't generate raw HTML in your code.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.