2008年9月3日星期三

Re: [fw-db] The best way to approach the database

jjsanders wrote:
>
> Can someone please help me out and thell me what the best thing is to do?
>

That reminds me, I want to build something in my garage.
Should I build it out of wood or metal? Should I use a hammer or a drill?

I'm being facetious, of course. Asking which is "better" without giving the
context of what you're trying to accomplish assumes that there's a uniform
answer to the question.

Programming with the Zend_Db_Table interface has some advantages, such as
supporting a model for object-oriented encapsulation so you can implement
custom logic such as data validation or transformation.

On the other hand there are some types of queries that it the table gateway
pattern isn't so good at. For instance, anything involving a JOIN is still
more straightforward to do by using a SQL query, in my opinion.

Choose the right tool for each task. I think most people use a mix of Table
classes and straight SQL queries in any non-trivial application.

Regards,
Bill Karwin
--
View this message in context: http://www.nabble.com/The-best-way-to-approach-the-database-tp19289843p19296610.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: