On 2005-07-12, Thilo Planz <suppressed> wrote:
>
> The current AutoRunmode plugin does not support "StartRunmode", but
> since you really seem to like that feature, I guess I should try to
> implement it ...
Thanks. It may help that you have the most recent darcs repo for
CGI::App that has some minor tweaks to the start_mode() default setting
behavior.
>> AnyTemplate can figures out the file name for you, and uses the
>> template
>> engine of your choice, or if you are distributing your app, your users
>> can choose!
>
> That second part (about the users choosing the template engine) has not
> occurred to me yet.
> That is indeed cool.
I think often people are building sites for themselves, their employers
or their customers. In all cases I think talking a templating system
directly works well enough.
However, for someone distributing a web application, the religious
choice of a templating engine can be a deal-breaker for potential users.
Beyond that, Michael Graham has made efforts to add features to this
layer that add value for CGI::Applications. (With much respect to Cees,
who paved the way with the ::TT plugin).
It includes "Embeddable Components", which you can think you of as smart
headers and footers. There are also pre and post process hooks, if you
want to add standard data to your templates, or munge the final result.
He also adds some sensible defaults for each engine. In my opinion, at least
for HTML::Template, these are more likely to be what people want, compared to
the buit-in default selection for HTML::Template.
cache => 1,
global_vars => 1,
die_on_bad_params => 0,
template_extension => '.html',
(Personally, I don't use global_vars, but not doing so has bitten me in the past,
and I wonder how much benefit I get from avoiding it).
The optional auto-extension feature is another way shave off a little syntax
once you get used to it.
Here's another way to look at it:
For HTML::Template users, this is a better interface than the default
load_tmpl().
For TT users, I think they will all the best features of the ::TT plugin have been
lovingly stolen^h^h^h^h^h^h ported over.
And we /all/ win because we have increased the ability to share code with each other, without getting
wrapped up with which template engine is used.
That said, this isn't a miracle cure for the templating differences.
Each choice has its unique features that couldn't necessarily be ported
to another alternative without making some code changes.
My first impression of AnyTemplate was "Why add another abstraction
layer here?". I think I'm warming up to it now.
Mark
--
http://mark.stosberg.com/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.