[Maypole] Re:/beerdb only shows directory listing

Simon Cozens simon@simon-cozens.org
Thu, 5 Aug 2004 12:12:07 +0100


Daniel R. Allen:
> (why do I get the feeling you're going to tell me that's because there
> isn't a 'factory' table?...)

Trust Maypole. Maypole is right. It can't find the factory table because there
isn't one. This isn't an invitation to create one. :)

Really, when I said try going to /beerdb/beer/list, I meant going there. I
know damned well there isn't a beer/list file. I wrote this, remember?

As explained in http://maypole.simon-cozens.org/doc/View.html, factory is a
directory used to contain templates that Maypole should look in as a last
resort - or, to put it the other way around, factory is the default set of
templates that can be customized by table-specific ones. Maypole looks for
beer/list to do a list on the beer table, and if it can't find one, looks in
custom/list, and then looks in factory/list.

I think the key here is to dissociate your concept of a URL as referring to
something in the filesystem. It doesn't any more. A Maypole URL is a table and
an action and some parameters. /beerdb/beer/list means to take the beer table
and execute the list action on it, getting a template from somewhere. I've
just finished a very crazy hack in one Maypole application that means that
the templates aren't in the filesystem at all. Ignore the damned filesystem.

-- 
Resist the urge to start typing; thinking is a worthwhile alternative.
    -- Kernighan and Pike