views:

103

answers:

6

I am about a develop a simple web application (5-6 static pages). Is there a framework I could use for this? I can just write these HTML pages without a framework but I would like a framework as it will better handle header, footer, and CSS throughout the website.

I have a Perl script that will be modifying these HTML pages daily. And I don't need a database.

A: 

In the past I've used a makefile that just ran various template pieces through a template engine (Genshi in my case, but the exact details don't matter) to generate the static pages.

Ignacio Vazquez-Abrams
A: 

You can try the Blueprint CSS Framework, which helps to standardize layout across different browsers.

Extrakun
+2  A: 

You can just generate the static HTML with the Perl script. That way you don't have to re-type the footer etc in each HTML file.

Used to have a page that was generated each hour with /bin/sh and various unix tools :)

edit: And, as Ignacio said, you can still use template engines etc.

Øyvind Skaar
A: 

For projects that are too small to use a full-fledged web framework, I usually write a class (module) for handling the layout. Then each page in the project would be a Perl script that uses the module's functions to print the header and footer. It would look something like this.

my $page = GauravWebpageClass->new(-title => 'Page Title');
$page->add_style('anotherStyle.css');
$page->add_script('fancyJavascript.js');
$page->print_header();

# Print your content here
# Print your content here
# Print your content here

$page->print_footer();

That's the basic idea. It assumes you know how to write object-oriented Perl. Let me know if you need help with the details.

Daniel Standage
+9  A: 

ttree is made for this purpose.

Sinan Ünür
This is what I do for many simple sites.
brian d foy
+1  A: 

Another option would be Server Side Includes.

slu