Hi all. Okay, here's the latest.
I've been screwing around with my first CGIs - pretty cool, now I see the appeal. Anyway,
I'm fairly comfortable using MySQL and generating XML output from it, and printing it
to files and stdout. Now I'd like to create the usual web interface that starts with a form
and results in a table of links from the query results. Probably multiple-page results per query.
The problem is, which way to go? There seem to be a zillion techniques, and I don't want
to go down a dead (or annoying) path. For example, should I go XML to HTML (via some
module like XML::Parser), or use CGI.pm? Should I create a layer between the query
results and the HTML generation?
I'm about to jump into CGI.pm anyway, since it seems like the logical place to start, but
any advice appreciated...
thx
Mike
Most of these are questions that only you can answer based on desire, time, money, requirements, etc. Whether you need to go XML to HTML or can go directly to HTML, or better yet XHTML, is up to you. Do you need the intermediary? Should you create a layer between the query and results, do you have time, money, knowledge to do so? Do you want to? If this is the start to a large application suite you would be silly not to, if it is a few one off CGI scripts then there is not likely any need, if it is somewhere in between I say hack it up and see how far you get, then refactor if the need presents itself. Regardless you probably shouldn't build your own templating system, that I will tell you. There are many available and several very good ones, there have been articles on Perl.com about the templating systems.
You should absolutely use CGI for form processing, cookies, etc. Whether you use its HTML generation abilities is more a matter of preference, personally I don't, but then I also use a home grown templating system which I already told you not to do :-) (of course I was building an application framework).
Which brings me to, have you looked at some of the app frameworks available? They can provide a lot of this already for use, depending on how much you want to learn and write yourself they can be an easy way to get a jump start. Many of them have beem written up on Perl.com too.
Good luck,
http://danconia.org
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>