On Wed, 08 Dec 2004 12:10:09 -0500, Stefano Mazzocchi <[EMAIL PROTECTED]> wrote:
> Now, let me tell you a story about templates. As the sound of the theme music from Beverly Hillbillies rises in the background? <snip>story</snip> > > I like the name (and the concept) of lenses. > > We have identified the need to have "isolated and reusable programmatic > artifacts that know how to transform something into SAX events". They > were named 'taglib' because the syntax normally used to identify them is > a namespaced element (a 'tag'). > > The problem with the name is that it has been used (and abused!) in too > many systems and brings memories of abuse and FS. Like the infamous <if> > tag (also abused by XSLT) > > I think we should call our CTemplates taglibs "lenses" instead. > > WDYT? For our internal templating system we're currently implementing a concept we call "filters" that lets one declaratively define conditional portions of a template/view. As I read your story (:-) I kept thinking that lenses and filters lined up pretty much the same. Then I jumped over to the Xenon description and found a "xe:filter" as part of the lens description. I won't have time to dissect everything completely, but semantically a lens as used in Xenon seems to be a filter (and filters as used in Xenon seem to be conditionals). If so, I think the idea makes perfect sense, at least for our system However, I'm not quite sure that the lens concept maps exactly to everything that is being discussed WRT Cocoon? In particular, there seems to be more of a active modifier role (ie "turn something into SAX events") to what people are looking for for Cocoon? Then again, maybe that's part of the problem and why you like the name "lens"? I'll also note that if you take the optical analogy literally, you want both lenses and filters working together as separate components and not mixed together the way Xenon seems to do. I wonder if there's some SOC in the view model that really remains to be completely abstracted? I'm not sure "lens" is an abstraction I find completely understandable... -- Peter Hunsberger
