We don't bite newbies here... much | |
PerlMonks |
Re^2: Moving A Template Module Namespaceby Rhandom (Curate) |
on May 23, 2007 at 19:48 UTC ( [id://617099]=note: print w/replies, xml ) | Need Help?? |
No offense taken whatsoever. At times I have asked myself the same thing. I'm sure in the future I may also ask the same thing.
I will continue to help out the Template Toolkit in anyway that they will receive the help. The TT mini-language is a great thing and has done much good for the perl community. I applaud Andy Wardley for having such foresight in his design of the Template::Toolkit module. I have tried to contribute and have emailed Andy directly about CGI::Ex::Template. He is aware of CGI::Ex::Template and has read at least some of the code. He has a living to make. He controls the destiny of the Template::Toolkit dialect. He has to make the best decisions that he can for what he has time to work on. If he would like to use some of the code that is great but if not that is fine too. Let me quote a little of the CGI::Ex::Template POD. CGI::Ex::Template happened by accident (accidentally on purpose). The CGI::Ex::Template (CET hereafter) was originally a part of the CGI::Ex suite that performed simple variable interpolation. It used TT2 style variables in TT2 style tags "[% foo.bar %]". That was all the original CGI::Ex::Template did. This was fine and dandy for a couple of years. In winter of 2005-2006 CET was revamped to add a few features. One thing led to another and soon CET provided for most of the features of TT2 as well as some from TT3. CGI::Ex::Template is a full-featured implementation of the Template::Toolkit language. I didn't start out to have a full, from scratch rewrite of Template Toolkit. I started a template engine back in 1999. It was custom and proprietary and by the time it was done evolving it had a lot of the features that Template::Toolkit had. We had rolled our own because Template::Toolkit barely existed at the time and wasn't widely known, and because we had an extremely custom need. That company did and does today (though I'm no longer there) serve millions of dynamic hits each day (even their banner treatment is templated). Those hits are customized based on the preferences of a couple hundred separate companies and on the user preferences. The system had to be extremely granular and recursive. And it had to be extremely fast. Template Toolkit is "fast enough" for most applications - and is always fast enough if it is in a mod_perl environment. But I did and still do work in hybrid CGI/mod_perl environments. Template Toolkit sometimes is the bottleneck. Well, anyway - back to CGI::Ex::Templates story... CGI::Ex::Template (CET) began simply as the perldoc mentions. It grew until it encompassed all that TT can do. But CET has always done it "lighter" (for whatever definition of lighter) and "faster" (for whatever definition of faster). In some discussions with Andy he mentioned that CGI::Ex::Template didn't use a regex based grammar. I originally had intended to - but micro-optimized myself out of it. After rereviewing it, I rewrote everything and ended up with the current parsing engine that is all regex based. I then realized that I could layer other parsers easily on top, and so just recently I added the HTML::Template::Expr dialect. My current goal, is that within a few weeks it will be able to do TT1, TT2, TT3, HTML::Template, HTML::Template::Expr, ASP style, Velocity, and Text::Tmpl style -- all from the same engine/parser/runtime. Some of the motivation for this is "simply because I can." My other real motivation is I work at a shop right now that has HTML::Template::Expr templates as well as Text::Tmpl templates and since I've begun working there has Template::Toolkit templates. Some of the problems this brings is that we have to modify the same html in various template syntaxes, we have to use HTML::Template::Expr which is heavy and slow but at least brings advanted features to HTML::Template, and we have to load all of the various engines into memory. There is a lot of duplication in features between the various engines. So while it wasn't always my goal, now, by adding one more templating system, I can handle all of the various dialects with one set of configuration and with one set of compiling and caching options. I can even including templates from the various dialects in other dialects. I can maintain one header in one dialect, compile it, cache it, and use it in all of the other dialects. I don't do a lot of marketting for my modules. If people would like to use my modules that is great. If other projects can use my modules that is wonderful. I'll try to document them and make them as easy to use as possible. I think CGI::Ex::Template is a good module. My opinion is that it has a lot to offer to the other templating project camps. CGI::Ex::Template may always play second fiddle, but that is fine. I'll try to let people know about my modules, and if they have enough motivation to use them that is great. But in the end, I am a consumer of my goods and it is good enough for what I am looking for. As a final note - it is all sort of funny. I think I have a very good template module in a very crowded template world (CGI::Ex::Template). I think I have a very good application framework in a very crowded application framework world (CGI::Ex::App - which nobody has heard of - but that's fine). I think I have a better form filler than the defacto standard module (CGI::Ex::Fill - that nobody nor their dog has heard of - but that is fine also). I have an ok generic server engine (Net::Server) which gets more attention even though it is old crufty code and I put only a little time into it. But all of these projects only offer cursory support my current work projects which provide for my living. The module I want to write is large, and world changing, .... and always on the shelf (the funny thing is I have a name picked - but it is meaningless). Gee - I think you touched a nerve. Sorry for the long response. ++ for your very good question.
my @a=qw(random brilliant braindead); print $a[rand(@a)];
In Section
Meditations
|
|