As long as you design it with a consistent interface I don't see a
problem.  The whole point of creating abstractions like this is so
when you're writing the rest of your code you don't have to think
about the gritty details behind the scenes (like PDO or non-PDO).  If
you design the class so that the programmer using it just has to think
"I'm using a 'data source', and this is how I use it", then you did it
right.

Also, keep in mind that its not about what we think about your idea,
but what works for you in practice.  Your idea is sound.  Now when it
comes to implementing it, you could get it completely wrong.  Then you
need to care what we think.  Good luck.

Mike

On Sat, May 23, 2009 at 11:46 PM, kranthi <kranthi...@gmail.com> wrote:
> is this a bad practice?
> i want to create a database class, with a particular definition when
> server supports PDO and a different definition if  the server does not
>
> comments please.
> Kranthi.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to