[Catalyst] catalyst tutorial: MyAppDB/Book.pm vs. MyApp/Model/Book.pm

mla maurice.aubrey at gmail.com
Tue May 15 09:19:53 GMT 2007


Anthony Gardner wrote:
> Have a look at this for another angle
> 
> http://www.teambarry.com/?p=38

Ah, I like this approach very much.

It says:

"So how do you get some of the advantages of ORM and keep control over 
SQL? I employ composition and a couple basic design patterns. For 
example, I have a base model factory interface that uses chainable 
“Loader” modules (ie, DBILoader, MemcacheLoader, MogileLoader) to 
retrieve data and return concrete objects."

But what exactly are these concrete objects?

I actually like SQL and feel no need to turn it into Perl, so I
wouldn't mind a light-weight approach like this. But OTOH, as
Dave Rolsky was arguing earlier, you do want to have the
data validation in the object. So it seems like we do need *some*
type of light-weight object interface for inserts and updates.

I'd very much like to see an example of the factory and loader
classes. Radium, you on here?

Thanks,

Maurice



More information about the Catalyst mailing list