On Wed, May 23, 2001 at 02:48:30PM +0800, Stas Bekman wrote:
> won't html.table(), html.tr() shorter? Or have you reserved the first
> level for some other functionality?
Yep, but they can just be delegated to it via AUTOLOAD.
> But this only talks about simple rendering. But take for example something
> like a date widget. When introduced in the <FORM> we want the date widget
> to appear as [YEAR][MONTH][DAY] (3 elements), whereas for usual user
> display mode it should automatically know to render itself as %d-%M-%Y
> strftime string and similar. We are talking about "inteligent" widgets,
> doing different things in different contexts.
Yes, so you have one view which is 'form_view' and another view which is
'display_view'. If you present the XML via one view you get a form, via
the other you get a display. You can even switch views half way through
the process if you like.
> I suppose it might be a mistake to try to provide TT-specific widget
> library, and it should be a more abstract thing with glues to various
> backends (TT/CGI/...) and frontends (CGI/Apache::Request/...).
I'm concerned that if you don't tie it down to one particlar language or
widget set then the only "portable" way to do it is in Perl, and then you
lose the benefits of having a template language.
> Gunther has started this thread on the mod_perl list, it seems that such a
> beast doesn't exist in Perl domain, and there are people willing to give
> hand, but so far nobody has offered to start a new Perl project and lead
> the effort. Hmm, may be someone on this list needs the same kind of
> functionality and have the interest/resources to start the project to
> implement smart widgets in Perl.
I haven't checked my mod_perl mailbox for a while... will do.
> Whoah, this means that just like with DBI plugin you can write simple cgis
> with almost no perl side code to interact with DB, you will be able to
> write simple cgi scripts with no perl code at all :)
>
> > Sounds good. Who wants to write it? :-)
>
> I'd definitely do that if... I won't need to port our old ADT HTML-in-Perl
> implementation to use TT and separate views from the code on the way.
>
> This looks like a great project to learn TT guts, so probably somebody on
> this list will be glad to jump on this challenging problem, implement it
> and enjoy the gratitude of fellow perl/tt coders.
And I'm happy to give any help and guidance to the brave soul(s) who take
it on. Otherwise it's likely to languish in my TODO list for ages...
A
--
Andy Wardley <[EMAIL PROTECTED]> Signature regenerating. Please remain seated.
<[EMAIL PROTECTED]> For a good time: http://www.kfs.org/~abw/