Is there an example of this running? I could not find one.
Thanks,
Brian
----
Brian T. Wightman
suppressed
414.524.4025
suppressed
ls.com To: suppressed
cc:
12/10/02 03:35 Subject: [cgiapp] CGI::Application::Weblog
PM
Weblogs or blogs are very popular nowadays. I wanted to start one but
most of them are way too complicated for my needs. An exception is Rael
Dornfests' Blosxom (http://www.raelity.org/apps/blosxom/) but this, a
monolithic perl script was a little too simple and inflexible. As I am a
big fan of CGI::Application, I though about rewriting Blosxom to use this
framework. The results can be found at:
http://src.braincells.com/perl/CGI-Application-Weblog-0.9.1.tar.gz .
This is a temporary location, I will upload it to CPAN as soon as people
agree it is good enough. It can be installed like any normal CPAN module.
I would like the advice of readers of this list on several topics:
1. Does it correctly follow the CGI::Application 'way'?
There's one architectural decision I made which I'm still of two minds
about. Each runmode represents what is called a 'flavor' in blosxom
terminology. Each flavor represents a particular type of output.
E.g. the module comes with two default flavors, html for HTML output,
and rss for RSS 0.91 output. The 'traditional' object-oriented way
would be to have the base class call methods at points were stuff is
output and have each flavor be a subclass that redefines those methods for
the particular output it wants to provide. To know which subclass to use,
there would have to be some kind of factory function that maps runmodes to
subclasses. However the way I see it, this means that adding a new flavor
would require the user to modify the module which is something I don't
want to have to force them to do. Instead I have the module call 'hook'
functions for output. A flavor is a simple set of subroutines that
implement one or more of these hooks and are bundled into a file. A
parameter in C::A::Ws' constructor tells which flavors are available.
Based on that the runmodes are determined like this:
$self->mode_param('flav');
my %runmodes;
foreach (@{$self->param('flavors')})
{
$runmodes{$_} = \&entries;
}
$runmodes{'AUTOLOAD'} = \&error;
$self->start_mode($self->param('flavors')->[0]);
$self->run_modes(\%runmodes);
entries() is the function that calls the hooks and eventually returns
output. error() is a fallback if a non-existent flavor was called.
My question is am I missing out on anything by not using a pure OOP
approach? Will my design come back and bite me in the behind later?
2. How is the documentation?
Is there any unclear or missing info a user might need?
3. Is it secure?
Is my taint checking good? Are there any nasty holes I should take care
of?
4. Any optimization I could make to the code?
5. Is there anything I can do to make it work better under mod_perl?
One thing I don't need right now is feature requests, as it is I've been
desperately battling the urge to feeping creaturism the last couple of
days just to get the damn thing released. :) After 1.0 I have a lot more
things in store such as calendar, search engine, trackbacks, talkbacks
etc.
I eagerly await your feedback.
--
Jaldhar H. Vyas <suppressed>
It's a girl! See the pictures - http://www.braincells.com/shailaja/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
---------------------------------------------------------------------
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.