Code Critique Please :)

From: Date: Wed, 21 Nov 2007 19:05:04 +0000
Subject: Code Critique Please :)
Groups: php.general 
Request: Send a blank email to php-general+get-264943@lists.php.net to get a copy of this message
Hello, I am trying to increase my knowledge and understanding of OO and OO Design Patterns. I'd like to request a critique of a program that extracts MySQL table information and translates it into XML. In the program, I tried to accomplish a few things: 1. Correct use of ADOdb 2. Closely match the PEAR coding standards - I encode my scripts in UTF-8 - Not all indents are 4 spaces, but I have switched my IDE to treat tabs as four spaces - My phpDoc comments could probably use some tweaking 3. Object Oriented principles 4. Strategy Design Pattern - Interface used for column attribute parsing My overall goal is to use these xml files as a starting point to write a DAO with the Data Mapper Pattern. Here are the related files to peruse: http://simeons.net/code/datamapper/sql/photo_portfolio.sql - SQL dump http://simeons.net/code/datamapper/mysql_to_xml_oo.phps - Calling script http://simeons.net/code/datamapper/helpers/autoload.phps - Auto load classes http://simeons.net/code/datamapper/classes/DB.phps - ADOdb connection http://simeons.net/code/datamapper/classes/MySQLToXML.phps - MySQL extraction and parsing - XML writing Here are the outputted xml files: http://simeons.net/code/datamapper/xmldatamaps/album.xml http://simeons.net/code/datamapper/xmldatamaps/photo.xml http://simeons.net/code/datamapper/xmldatamaps/comment.xml Any comments are appreciated. Thanks, Simeon

« previous php.general (#264943) next »