developerdave Posted April 27, 2010 Share Posted April 27, 2010 Hey guys, I've written a fairly cool MySQL CRUD, and am thinking about a PDO based one. Is it really worth it? Is there a performance hit/gain with PDO? Security is better from what I understand but PDO is a subject I haven't touched on a great deal. Any opinions are greatly appreciated Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/ Share on other sites More sharing options...
trq Posted April 27, 2010 Share Posted April 27, 2010 One immediate benefit is PDO will give you the flexibility of being able to connect to different database types. Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/#findComment-1049180 Share on other sites More sharing options...
developerdave Posted April 27, 2010 Author Share Posted April 27, 2010 Noted. I saw that in the documentation, just seems like a pretty cool feature to have instead of being stuck with MySQL. I don't personally mind MySQL but I know there are better alternatives out there. Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/#findComment-1049187 Share on other sites More sharing options...
ignace Posted April 27, 2010 Share Posted April 27, 2010 Quote Noted. I saw that in the documentation, just seems like a pretty cool feature to have instead of being stuck with MySQL. I don't personally mind MySQL but I know there are better alternatives out there. PDO indeed allows you to connect to multiple databases but it does no re-write your queries to match the DBMS which means that you have to write your queries keeping in mind the differences between the DBMS systems you wish to support now and in the near future. Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/#findComment-1049194 Share on other sites More sharing options...
developerdave Posted April 27, 2010 Author Share Posted April 27, 2010 Thats ok, I'll just modify the class so its abstract and its a case of drag and drop/defining type after that. So is it worth doing? Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/#findComment-1049195 Share on other sites More sharing options...
Mchl Posted April 27, 2010 Share Posted April 27, 2010 Depends on what you're aiming at. At one moment it might be wiser just to switch to some ORM. Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/#findComment-1049196 Share on other sites More sharing options...
developerdave Posted April 27, 2010 Author Share Posted April 27, 2010 Well I'm updating my framework at the moment, its to speed up and ease development for learners and designers without compromising on functionality for PHP tech heads. Default will be MySQL but I'd quite like the option to use other technologies. So really its a toss up between using ORM or PDO? What do people think? I'm thinking ORM but I've had a little read on PDO and it seems pretty cool and safe while staying fairly lightweight. (important to me as I've managed to keep the framework to 10-12kb so far ) Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/#findComment-1049201 Share on other sites More sharing options...
Mchl Posted April 27, 2010 Share Posted April 27, 2010 In well designed framework you could be able to use either PDO or a full fledged ORM Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/#findComment-1049205 Share on other sites More sharing options...
trq Posted April 27, 2010 Share Posted April 27, 2010 I would agree. there should be no reason your framework should be locked into any particular database interface. Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/#findComment-1049211 Share on other sites More sharing options...
developerdave Posted April 27, 2010 Author Share Posted April 27, 2010 Heh, looks like its both then release date of 1.1 isn't for another 10 days or so anyways Quote Link to comment https://forums.phpfreaks.com/topic/199888-php-pdo/#findComment-1049218 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.