Message from the owner(s)
Mature PHP Code generator. Primary challenge is to make interface easier to use.
The mission of PHPCreate is to provide a collaborative tool that allows a small PHP development team, perhaps with only limited understanding of relational databases, to quickly generate a database driven web application which is reliable, maintainable and secure using functional templates and configurable business logic.
Although the concept could be applied to any (or all) relational database, PHPCreate templates currently only builds PHP scripts appropriate for interfacing with a MySQL database.
While the license for PHPCreate itself will be the GNU GPL (same as Linux), we anticipate a different license model for the generated code that will allow the developer to freely use or distribute the generated application under more flexible terms including sale as a commercial product. This will possibly involve the Apache/BSD license?
What is PHPCreate?
The generated code is completely controlled by user selectable templates. When generating scripts the PHPCreate tool internally follows these basic steps (reference associated graphic).
- Retrieves a MySQL database schema comprised of a table and field list.
- Applies the user�s rules to assemble appropriate PHP code fragments.
- Retrieves the PHP templates (one for each type of PHP Target, Add, Edit, List, etc.).
- Replaces reserved tags in each template with related code fragments.
- A separate script for each target type is placed in the location specified by the user�s workspace.
Sample Edit Template | Generated PHP Script (will open in new window)
Back to top
Once PHPCreate is configured on your web server, usually Apache, the developer might follow these steps.
- Create or select a MySQL database
- Create a PHPCreate project for that database
- Create a personal workspace within that project
- Select from one of several templates or create your own.
- Enter any relationships (foreign keys)
- Select on or more tables to build a PHP script for
- Select the fields in that table that the script/user will interact with
- Optionally modify the default rules for any fields that require special handling
- Generate your scripts.
- Optionally select a package (application framework) so your generated scripts have the required environment and libraries. You only need to do this initially or any time there is a major change in your business logic.
- Test your scripts
- Deploy your application
Back to top
There are four development roles that influence the generated scripts.
- The core development team
- The database designer / project manager
- The template designer
- The application developer
The core development team is responsible for the build engine logic that constructs the various PHP code fragments that will replace the pre-defined tags in the PHPCreate template. A user can view a list of these tags from utilities menu. The core developers populate the default/global fieldname and fieldtype rules for I/O processing which all users inherit.
In the context of PHPCreate, the database designer and project manager are synonymous due to the fact that the project manager has the ability to modify the database schema and create the SQL relationships between MySQL database tables that all project members will inherit. These relationships will control when an input field in a form may query a remote table to generate a HTML drop down select option for the end user or query that remote table to display a read only value. Project managers also can configure project level default fieldname and fieldtype rules that will apply to specific fields.
The template designer administers various templates the generated PHP scripts are based on and thereby influences the error checking and common logic. It might be said that the template designer has as much control over the generated scripts as the core developers because they can decide which tags to include or omit in their Templates and thereby have complete control on what the build engine replaces with PHP code fragments. The template designer also controls a body of related support files (collections and packages) that provide an application framework for the generated scripts. For example, a generated script for a certain template may require a common PHP include file to perform user authentication so that include file would be bundled with the other support files for that template and delivered to the user when they download their generated scripts. Click here for a list of active PHPCreate templates.
After a PHPCreate user is granted membership to a specific project (and the related MySQL database) they have control over which template they will use, which tables they will build scripts for, which Database fields will be included in each script, how that data is presented to the user and what (if any) functions are applied to the data at each stage in the client server process. A PHPCreate user can override the global or project level fieldname and fieldtype rules that will apply be applied to each database field for any of their workspaces. A PHPCreate user can also add objects to the Object library for use in their scripts or in order to allow others to use them.

Back to top
PHPCreate has a long history with Phreedom Software and its clients. We have realized that we alone cannot make PHPCreate reach its full potential. For this reason and others, we have decided to release PHPCreate under the GNU GPL (General Public License). It should be noted that the generated code it primarily based on the templates and, as such, the templates would have to be licensed under a less restrictive model, such as the BSD or Apache license, for the PHPCreate tool to have any real commercial value. The long and the short of it is that the generated code based on the initial templates will be royalty free and freely distributable. Others may provide templates under other licensing models for which an end user can debate the merits of using, or create their own templates.
While the concepts behind PHPCreate are sound, much work needs to be done of which the major areas are:
- All the generated code should be reviewed for consistency and documentation standards (PEAR?) to enhance maintainability.
- Implement the concept of modules instead of scripts of which some progress has been made.
- The interaction between the scripts should be driven by modifiable embedded state machine logic. Example: Right now after a user update a generated script might be hard coded to meta-refresh to the list script or a section index.
- Much of the PHPCreate code should be re-generated using the PHPCreate tool itself. This may seem a little strange but most of the code in the system was generated by earlier version of the tool.
- Finally, the entire application framework should be re-worked/reconsidered. In fact, we would like to adopt an existing application framework for PHPCreate to generate modules for. We are watching Binary Cloud closely for this purpose and anticipate adopting that system as the default framework to run the generated scripts/modules.
Back to top
JNash (at) Phreedom.com
Phreedom Software LLC