Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev
Plugin or controller?
 

Index | Next | Previous | View Flat


mdietrich at cpan

Jun 1, 2009, 6:47 AM


Views: 1603
Permalink
Plugin or controller?

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
Attachments: PGP.sig (0.19 KB)

Subject User Time
Plugin or controller? mdietrich at cpan Jun 1, 2009, 6:47 AM
    Re: Plugin or controller? bobtfish at bobtfish Jun 1, 2009, 8:42 AM
        Re: Plugin or controller? mdietrich at cpan Jun 1, 2009, 8:50 AM
            Re: Plugin or controller? jshirley at gmail Jun 1, 2009, 9:13 AM
            Re: Plugin or controller? bobtfish at bobtfish Jun 1, 2009, 10:10 AM
            Re: Plugin or controller? dbix-class at trout Jun 8, 2009, 12:02 PM
    Re: Plugin or controller? mdietrich at cpan Jun 1, 2009, 9:46 AM
        Re: Plugin or controller? jshirley at gmail Jun 1, 2009, 9:56 AM
    Re: Plugin or controller? mdietrich at cpan Jun 1, 2009, 10:11 AM
        Re: Plugin or controller? jayk at ion0 Jun 1, 2009, 2:42 PM
        Re: Plugin or controller? kiki at bsdro Jun 2, 2009, 2:48 AM
        Re: Plugin or controller? pagaltzis at gmx Jun 2, 2009, 3:31 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.