[Catalyst-dev] Plugin or controller?
Matthias Dietrich
mdietrich at cpan.org
Mon Jun 1 13:47:18 GMT 2009
Hi,
Matt S Trout redirected me to this list to discuss a "new" plugin for
Catalyst. But I guess I need to reach back a bit.
I surfed on CPAN yesterday and found the module
Catalyst::Controller::RateLimit. One of my first thouhgts was, this
module should has been written as a plugin, not as a controller
because it extends an application with functionality which is neither
business logic nor controller actions.
I then contacted the author and stated my thoughts. Andrey Kostenko ( http://search.cpan.org/~gugu
) answered that he first wrote it as a plugin, but the list
suggested to find another namespace. So he has chosen the Controller
namespace. He suggested to rewrite the module so that it is based on
Algorithm::TokenBucket instead of Algorithm::FloodControl and file it
under the Plugin namespace.
To my module proposing Matt answered:
> It's normal for Catalyst plugins to be rewritten to become controllers
> - trying to go the other way round strongly suggests a design
> mistake to me.
In my opinion, the module Catalyst::Controller::RateLimit should be
Catalyst::Plugin::RateLimit. But may be I'm wrong. What does the
list think about this?
Thanks,
matt
--
rainboxx Matthias Dietrich
Freier Software Engineer
rainboxx | Tel.: +49 (0) 151 / 50 60 78 64
Tölzer Str. 19 | Mail: matt at rainboxx.de
70372 Stuttgart | WWW : http://www.rainboxx.de
XING: https://www.xing.com/profile/Matthias_Dietrich18
GULP: http://www.gulp.de/profil/rainboxx.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: Signierter Teil der Nachricht
Url : http://lists.scsys.co.uk/pipermail/catalyst-dev/attachments/20090601/dc950937/PGP.pgp
More information about the Catalyst-dev
mailing list