Thanks for your help guys,
if I get this sorted I’m going to put into a Doc for other newbies like myself!
I found how to reverse engineer an existing database and generate a schema in the docs
http://svn.modxcms.com/docs/display/xPDO20/xPDOGenerator.writeSchema :
# $xpdo= new xPDO(’mysql:host=localhost;dbname=myolddatabase’,’username’,’password’,’mydb_’);
# $manager= $xpdo->getManager();
# $generator= $manager->getGenerator();
#
# $xml= $generator->writeSchema(’/path/to/my/new/packagename.schema.xml’,’mypackage’, ’xPDOObject’,’mydb_’);
Let’s face it most Php web apps are just about CRUD operations on a database - you’d think that by now that this stuff would almost be automated or you’d be able to buy some sort of GUI that mapped right from your HTML forms through to your database and handled the code generation using an MVC design pattern, DAOs, Value Objects and Logic Classes etc. I’ve looked at most Php code generators out there but they seem to be aimed at people who "don’t even have to program a single line of code" - and they seem to generate very procedural code too - not fully OO and not easily integratable into exisiting code.
I’m from a Java background myself and have been surprised with Php that the equivalent of things like the Spring Framework, Hibernate etc have not yet been fully embraced by the Php community - or am I wrong?? Like there’s no defacto standard for ORM?
Thanks
Peter