TitanicLinux.Net :: PHP4 vs PHP5 and other considerations.

PHP4 vs PHP5 and other considerations.

Posted by anonymous 12.11.2005 00:15

Your simple little web app has become a primary tool for me as I am learning java. I would like to make a few suggestions:

1) You should have PHP5 code generation... currently you are using limited and deprecated object functionality from php4. PHP5 is almost as elegant as Java at this point, and porting java to php5 is a snap.

2) You should allow people to download a 'schema generator" tool that would allow for the easy and fast modeling of someone's existing database... creating one XML per table when given a database DSN.

3) You should consider creating a superclass for all DAO object that contain common and redundant code - including the storage of the connection object itself.

Re: PHP4 vs PHP5 and other considerations.

Posted by anonymous 27.01.2006 23:51

If you look up the J2EE Data Access Object pattern specifications from Sun you will find a nice solution using the Factory pattern. By creating a DAOFactory you can encapsulate all of the database access code in one location and generate all of your Data Access Objects from this one instance.

This is a nice little utility however for the most part I tend to write my DAO's by hand... it would be nice if the source code from DAOGEN was open-source just like the generated PHP is supposed to be :)

viimeisin päivitys: 27.01.2006 23:51 Author: TitanicLinux.Net
Copyright TitanicLinux.Net 2003-2010