Yes, your solution solves my main gripe and seems pretty easy to adapt my existing code to. Thanks!
Zach's solution is very interesting to me, though. With his method, it sounds like one could possibly run a section standalone, or even from another lisp image, and then (if desired) merge it into the main site once it's stable.
Thanks for the input.
--
Austin Haas
Pet Tomato, Inc.
http://pettomato.com
On Tue Aug 21 12:05 , Ram Krishnan wrote:
> Austin,
>
> We used a similar approach for managing multiple client interfaces, by
> creating client-specific directories with one or more Lisp files with
> handler code. In our case, we dispatched based on the virtual host name,
> using the *META-DISPATCHER* special var.
>
> Where we differed from the approach you wrote about is that we didn't use
> ASDF (or DEFSYSTEM) in loading the client specific sections. We used a
> simple mapping from the top-level URL prefix to Lisp file, which we just
> (load)ed.
>
> For example, if the incoming request was for a "
http://foo.com/users/list",
> then our *META-DISPATCHER* (which overrides the default) would look up a
> dispatch-table for "foo.com", and the default handler in that dispatch-table
> would look for a clients/foo.com/users.[ufasl | lisp] in the file-system,
> and load that into the running Lisp image. On loading users.ufasl, one or
> more explicit handlers for the /users prefix would be inserted into the
> dispatch table for subsequent request.
>
> Hope this is useful.
>
> -ram
>
> On 8/21/07, Austin Haas
austin@pettomato.com 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.
> >
> > Thanks.
> >
> > -austin
> >
> > --
> > Austin Haas
> > Pet Tomato, Inc.
> >
http://pettomato.com
> >
> > _______________________________________________
> > tbnl-devel site list
> > tbnl-devel@common-lisp.net
> >
http://common-lisp.net/mailman/listinfo/tbnl-devel
> >
> _______________________________________________
> tbnl-devel site list
> tbnl-devel@common-lisp.net
>
http://common-lisp.net/mailman/listinfo/tbnl-devel