[Catalyst] Instant CRUD with DBIC::Schema

Peter Karman peter at peknet.com
Wed Mar 12 16:06:59 GMT 2008



On 03/12/2008 10:27 AM, Zbigniew Lukasiak wrote:

> If you'd make them to use the same db connection than indeed this
> would be like the ModelAdaptor. But then again you should have just on
> adaptor per model type - not per table (for models with tables).
> 

certainly if you think CX::CRUD::Model::DBIC should be implemented that way, I encourage
you to do so. The RDBO approach is 1class=1table, so the RDBO Cat Model follows that. All
the classes can share (or not) a single DBI connection; that's up to how the underlying
RDBO classes are configured. The db connection information is not part of
CX::CRUD::Model::RDBO. It is only the DBIC model that requires that information. RDBO uses
a separate class (Rose::DB) to implement DBI handle management, and that information is in
the (non-Catalyst) RDBO classes.

CX::CRUD::Model is completely agnostic about storage, connections, etc. It's up to the
implementation to handle that part.

>>  If you like the model_adaptor() syntax in the Controller API, how would you implement a
>>  ModelAdaptor class and how would you change the Controller API to use it?
>>

You've left this part of my email unanswered... :)


-- 
Peter Karman  .  peter at peknet.com  .  http://peknet.com/




More information about the Catalyst mailing list