[Web-SIG] Standardized template API

Phillip J. Eby pje at telecommunity.com
Wed Feb 1 18:59:09 CET 2006

At 12:12 PM 2/1/2006 -0500, Michael Bayer wrote:

>On Feb 1, 2006, at 11:07 AM, Phillip J. Eby wrote:
>>>spec is about  (like what is template polymorphism exactly ?)
>>Specifying only a template's *name* in code, not its type.  In
>>peak.web, if I refer to a resource or template named "foo", the
>>system looks in the resource directory and determines the template
>>type based on extensions.  So if there's a foo.pwt or foo.html or
>>foo.gif or foo.jpeg, it determines the resource type from that.
>>When you combine this feature with skinning, it means that
>>deployers are free to change the technology used to deliver a
>>particular template or resource.  For example, replacing a .gif
>>or .jpeg with a .png or vice versa, or using a different template
>>engine for a template.
>It seems like myghty resolver does this as well...you send in a URI,
>and as it walks down the chain, it can hit FileResolver (returns file- 
>based templates), ModuleResolver (returns python callables), each of
>which are free to return whatever Component object they want if they
>have something to offer for that URI; each Component just has a run()
>method.   you can inject whatever customized rule you want to return
>something else at some point.  rules could be constructed to return
>an adapted version of any other template's template object too.

So asking for "foo" can resolve to "foo.gif" or "foo.jpeg" in the file 
system?  If you have to say in the code which it is, that's not what I mean.

More information about the Web-SIG mailing list