after reading the CGI.pm documentation, my problem is that I think this module was created with the concept in mind that programmers create web pages

No, quite the reverse if anything: CGI.pm is written with the assumption that HTML is so complex, programmers would want to use some other interface to write it. This is such an astonishingly preposterous notion that I don't feel any need to bother explaining why it's wrong. Using CGI::Lite for form input is fine, but in terms of output, it's better by far to write your HTML in an editor that shows you the actual code — preferably one that lets you split the window and see the HTML in one pane and the CSS in another.

have a webdesigner create a web page with a WYSIWYG editor

They can create a concept mock-up that way, but someone who knows HTML will have to rewrite it from scratch. The code that comes out of most WYSIWYG editors is so bad, it's not worth revising for a static page, much less trying to use it as a framework or template for dynamic content. The programmer will want each piece of the generated content to be wellformed, so that the pieces can be combined dynamically without producing a complete mess. Worse, if you take code created in a WYSIWYG editor and do something really radical such as resize the browser window, it's often going to fail rather badly. You don't want this headache.

let's take this pretty web page and insert special tags in it for the dynamic, CGI-generated content

If your generated content is anything more complex than filling in a couple of blanks, this is going to get you a completely unwieldy wreck of a mess that will be nightmarishly difficult to maintain. If you really must go this route, you should probably think in terms of PHP, which is geared more that way, but I don't advise it for anything remotely complex. Get an artist to draw you what the layout will look like, yes. Have them print it out and give it to the web developer on paper, and let the web developer figure out how to make it look that way. This will take a little longer initially, but you'll get a website that's easier to modify later without screwing everything up, and you'll get a website that deals better with changes in the user's setup, such as resolution, default colors, and so on. (One of the many things WYSIWYG editors don't show you is when you commit the cardinal sin of specifying a foreground color without a background color or vice versa. This is generally obvious if you're looking at the code.)


;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print

In reply to Re: A different approach to CGI by jonadab
in thread A different approach to CGI by Shenpen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.