Austin,<br><br>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.
<br><br>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.
<br><br>For example, if the incoming request was for a "<a href="http://foo.com/users/list">http://foo.com/users/list</a>", then our *META-DISPATCHER* (which overrides the default) would look up a dispatch-table for "
<a href="http://foo.com">foo.com</a>", 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.<br><br>Hope this is useful.<br><br>-ram<br><br><div><span class="gmail_quote">On 8/21/07, <b class="gmail_sendername">
Austin Haas</b> <<a href="mailto:austin@pettomato.com">austin@pettomato.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>How does one generally structure their source files for a multi-sectioned site?<br><br>I have a site that has several disparate sections, including:<br><br>1. main page, company information, etc.<br>2. portfolio of past works
<br>3. client projects<br>4. various other interactive demos<br><br>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.
<br><br>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.
<br><br>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.<br><br>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.
<br><br>I'd appreciate any suggestions, pointers, or advice that anyone might have.<br><br>Thanks.<br><br>-austin<br><br>--<br>Austin Haas<br>Pet Tomato, Inc.<br><a href="http://pettomato.com">http://pettomato.com</a>
<br><br>_______________________________________________<br>tbnl-devel site list<br><a href="mailto:tbnl-devel@common-lisp.net">tbnl-devel@common-lisp.net</a><br><a href="http://common-lisp.net/mailman/listinfo/tbnl-devel">
http://common-lisp.net/mailman/listinfo/tbnl-devel</a><br></blockquote></div><br>