Recommend this page to a friend! |
Download .zip |
Info | View files (8) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2007-10-11 (9 years ago) | 62% | Total: 1,602 | All time: 2,380 This week: 1,090 |
Version | License | PHP version | Categories | |||
dbcodeassist 0.2 | Artistic License | 5.0 | PHP 5, Databases, Code Generation |
Description | Author | |||||||||||||
This package can be used to generate code for classes to access databases as objects. |
|
README The code generated by this software was deeply inspired by this article: http://www.odi.ch/prog/design/php/guide.php VERSION HISTORY Since 0.1 - Implemented phpdoc tags on all generated code - Implemented full OO code in the script and in the generated code. REQUIREMENTS There are a few things that this code will not do and there are a few things to consider when using the generated code: 1. The code require your tables to be constructed a certain way. The first column in every table should be the primary key of the table, setting the primary key on any other column will render useless code. This is a bug and it will be resolved in version 0.3. 2. The generated code does not support primary key columns without AUTO_INCREMENT set, which basically means that no id is generated in the php code, but must be generated by the db itself, this issue will also be adressed in version 0.3. 3. A VO is an exact replication of a single table row and should therefore be treated in much the same way you treat data in a table. Do not blindly insert data into it, since there is no logic to check or verify it. Use regular PHP methods to escape hazardous characters and ALWAYS verify input from forms before submitting the data to a VO. 4. The generated VOs does not contain a constructor which would allow for easier creation of VOs, and would reduce the risk of creating a defective VO. The implementation of such a constructor is planned for version 0.3, as of now the only way to create a proper VO is with the "setter" methods. |
Files |
File | Role | Description | ||
---|---|---|---|---|
result (2 files) | ||||
README | Doc. | Readme file with guidelines and important points | ||
LICENSE | Lic. | Artistic license | ||
AccessBuilder.class.php | Class | DB info collector class | ||
DAOFormatter.class.php | Class | Code generator for DAOs | ||
VOFormatter.class.php | Class | Code generator for VOs | ||
index.php | Example | Code examples |
Files | / | result |
File | Role | Description |
---|---|---|
User.dao.php | Output | The DAO file produced for the User table. |
User.vo.php | Output | The Vo file produced by the User table. |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.