http://www.perlmonks.org?node_id=256136


in reply to RFC: CGI::Tables

  1. I have to be honest, while your API seems nice and simple and clean, I don't see any major advantage to using it over using HTML::AsSubs (or the table/Tr/th/td methods that CGI provides).
  2. You might want to read up on HTML::ElementTable, It seems to have a pretty powerful API for manipulating tables.

Replies are listed 'Best First'.
Re: Re: RFC: CGI::Tables
by The Mad Hatter (Priest) on May 07, 2003 at 15:27 UTC
    One of the major advantages of seperating presentation from code is being able to change the presentation without changing the code. This allows people such as web designers to come in and redesign a website without the programmer having to change his code to fit that new design.

    I can personally say that HTML::Template works great for me and allows for easy design changes. As for being able to manipulate tables using HTML::ElementTable, you can't get much more powerful than changing the raw HTML.

Re: Re: RFC: CGI::Tables
by elusion (Curate) on May 07, 2003 at 20:16 UTC
    I think the area where my code would shine is when you have a table, and you want to insert data and shift everything else. Instead of moving braces and commas and rearranging, you just put the new cell in there.

    The same thing applies to changing the number of rows or columns. Change one number and you're done. If you want, you can even choose the size based on a user preference.

    elusion : http://matt.diephouse.com