[Catalyst] Refactoring question

Steve steve at matsch.com
Wed May 26 20:39:06 GMT 2010

Hi all,

I'm searching for general advice on Catalyst app design.  I've been =

studying all the banter on this list for almost a year, and have finally =

gotten to the point where a real live application is underway.  Being a =

newcomer to web dev in general, and also that this application wasn't =

originally supposed to go into production, I didn't give app design much =

of a thought (controllers in particular).

The app I'm writing generates HTML invoices/statements for individual =

subscribers.  The database consists only of 4 tables: users, roles, =

user_roles, and invoice_data.  Don't laugh too hard, but I called my =

first controller 'WebUsers', and a second one 'ViewStmt'.  The =

authentication is remarkably similar to the examples I've seen :)  As =

you might imagine, the WebUsers controller is starting to bloat as it =

has to maintain users, log them in/out, and basically handle all the =

'heavy-lifting' for the application.  The ViewStmt controller basically =

handles the rendering of a statement, and is quite manageable.

There are only two roles: administrator, and individual.  Individuals =

can log in/out, and view their own statements - period.  Administrators =

on the other hand need to administer the users, so basic CRUD for that =

part.  They also can view statements for anyone, so I've got a nifty =

list that gets presented, and links to individual statements.  All of =

the logic for handling this functionality is in the WebUsers controller.

I'm wondering if I should refactor all of the user maintenance stuff out =

of WebUsers, and into its own controller, or just deal with it as * this =

application won't ever be expanded on * .

Thoughts, advice, wise-cracks are all welcome :-[
-------------- next part --------------
A non-text attachment was scrubbed...
Name: steve.vcf
Type: text/x-vcard
Size: 268 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100526/5206=

More information about the Catalyst mailing list