RE: [PEAR] Pear Doubt

From: Date: Mon, 20 Jan 2003 15:22:44 +0000
Subject: RE: [PEAR] Pear Doubt
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3361@lists.php.net to get a copy of this message
> -----Original Message----- > From: karthikeyan.balasubramanian > [mailto:karthikeyan.balasubramanian@aspiresys.com] > Sent: Monday, January 20, 2003 1:15 PM > To: pear-general@lists.php.net > Subject: [PEAR] Pear Doubt > > Hi All, > > One of my friend told something about Pear which is bothering me. Just > want to Verify, can this be true. > > Is ADODB faster than Pear. > > <snip> that is correct. My own benchmarking indicate the same. The following link will give you some more insights into this: http://marc.theaimsgroup.com/?l=pear-dev&m=100793507904834&w=2 I am the author of MDB which is a merge of PEAR DB and Metabase. Go here for more information: http://pear.php.net/package-info.php?package=MDB I have made some improvements that make it almost as fast as ADODB in the benchmark mentioned in the above mailinglist post. > Well PEAR might sound like a good thing, but it is not always the best > solution. True. The silver bullets does not exist. > In the area of DB Abstraction ADODB is much more efficient and my > understanding is that the library is at least partially developed by > someone > using it for a commercial product...ie there is good reason to code it > well > and keep it maintained. That reasoning is sort of flawed and has been disproven on several occasions. How good code is maintained is not determined by the fact that something is commercially backed or not. > Not all hosting providers are going to properly setup PEAR or keep a very > current version available. I know you can do it on your own, but it's yet > another thing to keep someone from using it. The PEAR installer will soon be very easy to use. At the same time PEAR packages are also distributed the same way as ADODB is. So PEAR will only be easier to install than ADODB is and not the other way around. Actually at some point ADODB might even choose to use the PEAR installer. > Often you don't need all the weight of the PEAR libraries to get a job > done > and it can be better to write your own or at least borrow from thier work > to > make your own. I don't like to reinvent the wheel but sometimes you can > make a much better wheel to suit your needs ;-] Correct. PEAR might get ported to C at some point. Also the PEAR libraries will get a lot more lightweight once PHP5 adoption will start. > The PostNuke www.postnuke.com project struggled with the PEAR vs. ADODB > issue for a bit and choose ADODB in the end. Someone during that time ran > some benchmarks and it showed that ADODB was a bit better in speed etc. > > It is very easy to use and you can switch db's with a single line of > code...I think over 12 dbs are supported currently. I used it recently > and > found it easy to learn how things are done in ADODB and for projects that > need portability, I plan on using it. Your still better writing code for > one db if perf is your goal and not portability. MDB's database abstraction goes much further than what ADODB offers, but MDB was not around back when they made that decision. Also MDB does not have that many drivers yet. I am currently working on Oracle after that I will do an ODBC driver. Other people are working on others: MySQL and PostGreSQL are stable. Frontbase and Oracle are in development. MSSQL (Sybase) and Firebird (Interbase) are on the horizon. So your criticism is party correct, but we are working on it to make solutions that surpass ADODB in a lot of key areas. Nevertheless keep in mind that ADODB also has a different design philosophy. For example the author does not think it is worthwhile making DB schemas RDBMS independent. And he offers reasons for that. MDB does allow you to define schemas in XML so that you can use the same schema for different RDBMS. You can even export data from one RDBMS to another. At the same time ADODB offers caching and html output which are handled by separate Classes in PEAR. So be thankful for all the choice. Regards, Lukas

« previous php.pear.general (#3361) next »