[Catalyst] CatalystX::CRUD

Christopher H. Laco claco at chrislaco.com
Mon Sep 24 14:30:30 GMT 2007


Matt S Trout wrote:
> On Fri, Sep 21, 2007 at 08:57:35AM -0500, Peter Karman wrote:
>> I've been thinking the last couple days about ways to expand
>> Catalyst::Controller::Rose to play more nicely with other models besides
>> C::M::RDBO. This is per mst's request to open up the RHTMLO goodness to
>> non-RDBO users, and because I now find myself wanting the same thing. I =
have a
>> model that isn't RDBO that I'd like to use in a project.
>>
>> So I'm proposing the following -- comments/criticism welcome.
>>
>> * CatalystX::CRUD::Model (CXCM)
>>
>> A base class for CRUD-like models. CXCM isa Catalyst::Model. Any CXCM su=
bclass
>> could be used with the C::C::Rose classes (or any other controller that =
decided
>> to adhere to the CXCM API). C::M::RDBO would become a CXCM subclass.
>>
>> CXCM subclasses would need to implement at least the following methods:
>>
>>  * new_object  - returns CatalystX::CRUD::Object->new()
>>  * fetch       - returns CatalystX::CRUD::Object->new()->read()
>>  * search      - returns zero or more CXCO instances as an arrayref
>>  * interator   - like search() but returns an iterator
>>  * count       - like search() but returns an integer
> =

> Have you looked at the way the Handel storage stuff works? That already
> supports both DBIC and RDBO so might be an interesting start.

/me runs and hides.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070924/aaed=
2b6f/signature.pgp


More information about the Catalyst mailing list