in reply to Re: Rebuttle to chromatics
in thread Rebuttle to chromatics
SQL is not perl code. Therefore, it should not be in your perl programs. I generally have an 'SQL' directory that I keep one query per .sql file.
Amen.
Now, all my html is loaded via HTML::Template and all my SQL is in external files. I only look at perl when I edit a perl file.
Now here we have some asymmetry. HTML is not Perl code either. Nor is it necessarily non-complex. However, your means of abstracting the two differ. Could you provide us with some input as to why your approaches differ? I think such a post would be one of the first posts to explore and expound some basic means of Perl Software Engineering.
Functions to generate html is very ugly and a nightmare to maintain. So is SQL. Queries are complex business and should probably be written by hand; how many abstractions layers have gotten joins right?
Have you read the docs for DBIx::Recordset. It handles all sorts of joins. Further, what do you plan to do when you want to write those same applications in a database independent form? This is an important question and I want to hear your answer to it. I do have an alternative to Recordset. It is Class::Phrasebook::SQL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Rebuttle to chromatics
by DrZaius (Monk) on May 08, 2001 at 22:26 UTC |