[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] CGI::Application::Light 0.1


On Thu, 2003-02-13 at 23:13, Sam Tregar wrote:
> I've got a prediction to make about these modules.  I'm sure you won't
> believe me now, but maybe later on you'll look back and find that I was
> right (or not).  I predict that over time you will end up adding back most
> of the features you have removed from CGI::Application.
> 
> For example, your replacement doesn't allow for parameters to be passed to
> new() in the instance script.  How long will that last?  I predict that it
> will last until you need to use a CGI::Application::Light module in
> multiple contexts with different settings.
> 


I completely agree that most features will be re-enabled (such as
passing parameters via the instance script, and changing the default
name of the runmode parameter). As I mentioned, I've been using the
::Light for a few months and I haven't run into any limitations... yet. 
Maybe that is because I'm designing around them though... Do you have an
example of what you mean by multiple contexts with different settings? 
I think what you mean is for a runmode to get its some information from
somewhere outside the application (ie, the server environment). 
CGI::Application runmodes are CGI-information based.  What would prevent
you from using the following?:

	my $app = new LightApp;
	my $cgi = $app->cgi();
	$cgi->param( 'path' => $ENV{'PATH'} )
	$app->run();


This does add a bit of ugliness to the code, and I do see your (well
made) point though.  I suppose that most of my changes are adaptations
to how I think a CGI Application should be written, but aside from
redefining the API - I have tried to keep everything that is excellent
about CGI::Application. 

I'm still of the opinion that removing the HTML::Template support
directly from CGI::Application, and adding a cleaner interface to it
through a subclass is the right thing to do.  It makes for simpler code,
easier to maintain, release, update, etc.

I really do appreciate the comments though!  My gut is wrenched in
nervousness over putting my code up for peer review (my first time for
something that isn't a minor patch), but I'm growing because of it.

> If speed is really your number one goal (and I'm not saying it should be),
> consider dumping Template Toolkit and switching to HTML::Template.  And if
> you're ready for some real excitement, give HTML::Template::JIT a try.

I hadn't seen this yet, but I like it after a cursory inspection.  TT2
is an admittedly bloated beast (even with caching), and any relief is
welcome in my home.  The reason I chose it over HTML::Template was
flexibility, not speed.  The trade-off here is a large one, and I've
deliberated over it for a long time.  This weekend will be a good time
for me to make a true analysis of what I'm actually using in the T::T,
and if I can implement them using HTML::Template.

Thanks,
Shaun Guth

Attachment: signature.asc
Description: This is a digitally signed message part

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
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.