RE: [PHP] Doubts concerning a general Insert method

From: Date: Tue, 14 Jul 2009 17:18:01 +0000
Subject: RE: [PHP] Doubts concerning a general Insert method
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-295381@lists.php.net to get a copy of this message
Ok... according to the above posts, I've started to create my generic CRUD class however, I'm wondering: Any of you have already used a DAO design pattern in conjunction with a CRUD generic class? Know that I'm trying to create a generic CRUD class on a DAO Design pattern, it seems that it makes no sense at all. Is there an advantage on doing this? My thought: On a "insert to database" scenario for example: Without the CRUD generic class: to do an insert, we instantiate a DAO class and then call the insert method. Nothing more. Done. With the CRUD generic class: maybe we will have less code on the DAO site but, at the end, to insert a record, we still need to instantiate a DAO and call a insert method SO... I see not big advantage on using both... Can I have your advice on this please? Thanks, Márcio

« previous php.general (#295381) next »