[hunchentoot-devel] site structure

Zach Beane xach at xach.com
Tue Aug 21 17:45:25 UTC 2007


On Tue, Aug 21, 2007 at 01:37:56PM -0400, Austin Haas wrote:
> 
> How does one generally structure their source files for a multi-sectioned site?
> 
> I have a site that has several disparate sections, including:
> 
> 1. main page, company information, etc.
> 2. portfolio of past works
> 3. client projects
> 4. various other interactive demos
> 
> When I initially setup the project, I put the source files for each section into it's own directory, and included it as a module in my main defsystem. The main dispatch table would branch from there using "create-prefix-dispatcher" and call a "dispatcher" method belonging to the appropriate module.
> 
> Each client project gets it's own source file and dispatcher, because they usually contain many unique sections themselves, such as pages for alpha demos, betas, etc. Some also need various dynamic features, too, so it's not as if I can just create some template system and pull unique data from a DB. I really need to be able to through up entirely new branches to the site on a weekly basis.
> 
> The main issue that I've faced so far is that I have to add any new files to the :components section of the main defsystem method, which is inconvenient.
> 
> It is very likely that I'm just not understanding the basics of setting up a lisp project, but I don't think most projects require the same structure as a large website. Please correct me if I'm mistaken.
> 
> I'd appreciate any suggestions, pointers, or advice that anyone might have.

For wigflip.com, I make new projects completely separate directories
with their own version control, source files, static files, and
foo.asd system. I have a dummy system called "load-wigflip" that
:depends-on each of the projects that needs to be loaded.

Each of the projects depends on a "wigflip" system that adds
convenience functions for carving out a portion of the URL
space. There are also convenience functions to register the project in
a way that makes a link to the project url space appear on the front
page.

There are probably a zillion ways to structure a site. This has worked
out for me so far. I can independently start up new subsections of the
site without worrying too much about synchronizing them with the
"main" site.

Zach



More information about the Tbnl-devel mailing list