Xavier,

I agree wholly depending on ORM isn't always a great idea, I tend to always
code SQL manually for front-end (higher usage) parts of sites. For admin
systems that often have low usage ORM can be fantastically useful.

In your method returning a predictable array from each get method certainly
makes sense. My thought was to return an object for the data as well (i.e.
perhaps have a separate data access object and data object). An array is
simpler to work with, though you can enforce certain rules into an object.

Presumably methods could be prefixed with the standard CRUD terminology
(i.e. createNews, retreiveNews, updateNews, deleteNews) though that depends
on us spelling things right!

I would think that any method that updates/inserts, would also need to
populate a detailed amount of error messages to inform on things like failed
validation, failed DB insert, etc. Presumably that could all be coded into a
parent DAO class.

thanks for your thoughts,
Si

Reply via email to