[Zope-Moz] Templates anyone?

Rik Hoekstra rik.hoekstra@inghist.nl
Tue, 29 Feb 2000 21:32:31 +0100


[SC:]
>  (snipped: descrbing a possible approach to pattern objects)

[RH:]
> Well, OK, but that's just about the same as my external method worked
> when I tested it... Not that I want to push HTMLgen; it was just a
> thought.

[SC]It's always good to have all ideas out in the open. If we had something
like a python method to do it - it would be as good and even editable
through any client. Probably we could have even both ways of doing
it. (Just like dtml and python).

Implementing "dtml producing dtml" would be tougher than providing
a python facility.


[RH] Yes, quite so. But even then...

[snip]

>
> I like this idea. On the other hand, you will still have to deal with
> people whining about wanting to use wysiwyg editors. I gather this will
> not be easy to reconcile with you structured approach, unless they are
> objects. DO you have a solution in mind for it?

[SC] If fact why I proposed this is because I feel it fits well with
with wisywig editors and the like. " They" are objects.

[RH] A, I did not understand this, but I agree that it seems the right way
to go.

(Following is less than half baked idea, so tread cautiously :)
When people want to create a webpage they
think "Aha! an 'HTMLPageDoc' object" and create a new one.
For constructing a HTMLPageDoc they think of other objects
they want to drop into it. These could be a 'DBTable', a
'navbar' template they've already created etc. When they want
to do heavy duty processing of form data, they think
'BackendObj' which doesn't have any html - it just returns
another HTMLPageDoc when done processing. When they
want to send mail they grab 'MailerObj' and drop it into
the 'BackendObj'.

Most of these objects are just plain old DTMLMethods and
tags with new 'labels' on top of them. But it looks better this
way, I think.



Some of this might be possible entirely in the UI without
changes to Zope. Some might require patterns, the component
tag, and other similar bulbs.

[RH] Yep. This seems very promising (and exiting I may add).

[RH::]
> The ZDP also has a ZSnippets project started, which are in
> fact (mini) patterns of 'this way we do such and such a task in zope'.
> Might be a source of pattern objects.

One more thing for me to check out!

[RH] not much there yet! But keep on checking regularly!

> >
> > [RH::]
> > >              You would still be left with custom dtml written by
people.
> >
> > Yes. Any solutions you have in mind?
> >
>
> Nope. I don't think you will be able to circumvent this altogether.

[SC]
Some custom dtml will always be there - should it be looked at
as a 'problem'?

[RH] No, I think the component tag could take care of it if you want to make
pattern/templates object based. On the other hand, a mix could be a good
idea as well. Hm, practice should teach us that, I think.

[snip]

>                                                                You could
introduce
> something like an 'open pattern' (which is of course a contradiction),
> but I am not at all sure this is a good idea. THe question is of course
> if you want to keep templates open or if you only want to compose them
> of objects. Any thoughts on this?

I'm not sure I get what you mean here. I would like the templates to be
open in the sense that anybody should be able to define their own templates.
This could mean, for example, that a user can 'iconize' (think ZStudio) his
own template and drag and drop it into documents, etc.


[RH] I think this is taken care of by the component tag mentioned above.
Theory is more or less covered then, leaves only an implementation (ahum
;-0)


Rik