Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: CGI.pm HTML shortcuts, Better Way?

by knobunc (Pilgrim)
on Jun 06, 2001 at 16:00 UTC ( [id://86174]=note: print w/replies, xml ) Need Help??


in reply to CGI.pm HTML shortcuts, Better Way?

Cool idea. However, templating systems are great. By being able to make components that get reused throughout the site you can change the look of the site quickly and consistently if you want to.

Nothing in most template systems requires 1 page -> 1 file. Most of my recent experience is with Mason and I have made pages that generate themselves differently depending on which step in the process this is.

However, I have more recently bought into the component model that Mason allows and have started breaking up pages into multiple smaller re-usable chunks. So I no longer try to condense multiple pages down into 1 file (unless it is a simple submit page that shows the status of the submit on the second viewing) and I have found that this makes things much simpler. It is easier to write and debug since I can usually determine which file the problem is in at a glance, and then each file is smaller and simpler so I can usually see the problem pretty quickly.

-ben

Replies are listed 'Best First'.
Re: Re: CGI.pm HTML shortcuts, Better Way?
by shotgunefx (Parson) on Jun 06, 2001 at 16:09 UTC
    Hi Ben, I've used templates on over 100K pages. Nothing against them :)
    Where I find it lacking is when lets say you have an application where you may have 10 functionality areas with a few subfunctions on each page. This starts to get really messy (I think) and hard to maintain. Especially if a functions is carried out over several forms.

    We aren't usally just dumping a form into a nice background but actually modifying the forms and tables, etc in response to the actions and state.

    Update
    Another thing to think about is that if your program is generating your forms etc, using server side persistance, you can know what your expecting to receive on the next transaction as far as incoming parameters, what is and is not a valid state (relative to where they are),etc to stop people from hacking your forms or submitting invalid or irrelavant data (or resubmitting for that matter).

    I agree for a lot of things templating fits the bill. Just it falls short for a lot of what I'm doing.

    -Lee

    "To be civilized is to deny one's nature."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://86174]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2024-04-18 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found