On Fri, May 19, 2000 at 06:08:41PM +0100, Matt Sergeant wrote:
> 
> I would say that the bigger picture is definitely not generating HTML with
> functions - use templates or stylesheets.

At the very moment, I have a problem to find arguments to persuate my
colleagues to accept this vision. Do you have some arguments that
could be used?

For example, some of our code currently looks like

        $display_help = $q->get_preferences_from_db('display_help');
        ...
        show_help('If you want to do that, do it this way ...')
                if $display_help;

and show_help touches some global settings (updated per request) to see
if it should print the text with <FONT SIZE="-1"> or <FONT
COLOR="grey">, so the logic is in the functions (or methods) that are
called throughout the code or the script/handler.

I'd much better just do something like

        push @out, '<HELP>If you want to do that, do it this way ...</HELP>';

or even generate it with template, and then postprocess this with
stylesheet, and change the color setting or remove the help text
completely, if the user has the $display_help = 0 set because he's an
advanced user. The main objection I hear to this is that you'd need to
parse and substitute something that you could have gotten right in the
first place, and you can do the design changes in the functions as
you'd do in the stylesheet.

Can you help me with some points that I could use to persuate
templates and/or stylesheet for this application?

-- 
------------------------------------------------------------------------
 Honza Pazdziora | [EMAIL PROTECTED] | http://www.fi.muni.cz/~adelton/
   .project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.
------------------------------------------------------------------------

Reply via email to