Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Minimizing paths?

by swiftone (Curate)
on Sep 17, 2002 at 13:17 UTC ( #198481=note: print w/replies, xml ) Need Help??

in reply to Minimizing paths?

(Not really an answer to your question, but others have addressed that, and this is related)
Assuming your main program doesn't do anything user specific, why put the burden of program execution on the user? The sites I work on have their dynamic scripts as scripts, and the bulk of the html generated just as your is, except that I save the output to a branch the webserver serves up.

That didn't sound right. Let me offer an example:

/usr/local/apache/content holds the "content" html just as your /perl/index.html does.

/usr/local/apache/htdocs is where the webserver serves up pages.

My program wraps the content html in headers and footers (as well as running the whole thing through Template Toolkit), then saves the result as an .html somwhere under /usr/local/apache/htdocs/

Thus my users don't have any execution time for "flat" pages, only with actual dynamic content, but my unit doesn't have to maintain the navigation on every page because the build process drops it in place. Our setup is a little complex, with a database holding the relationships between pages, and the build process generating a different local navigation for each page, but you can season to taste.

It's not a concept I can take any credit for, it's been done for a while (Laziness, after all). Template Toolkit ships with a helper program that does something like this, and it's a simple script to do it with most other template systems (I only have experience with Template::Toolkit and HTML::Template, but the concept holds true for anything with HTML output).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://198481]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2017-02-28 02:11 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (394 votes). Check out past polls.