Automated Application Generation | |
Project milestones - Version 1.0 (Testing done on wampserver backend, std php elements, .sql driven db connection, addition, modification, and deletion)aa10.tar.gz | |
- Fixed a number of bugs from version 1.0, added file upload/download | |
- Hello world PEAR HTML_QuickForm; migration to xampp backend for PEAR support | |
- Additional bug fixes and added 1. database creation/removal, 2. more data types. | |
- Version 1.1 (PEAR HTML_QuickForm elements; generates .php files) aa11.tar.gz | |
- Version 1.1 Bug fixes, system now handles NULLs, quotes, and additional data types. aa12.tar.gz | |
Overview AAG is a system written in PHP, HTML, and PEAR. It is intended for handling standard forms-based data management tasks. There are two main objectives for this project 1. to attempt to bypass coding repetition in database programming through regex search and replace 2. to apply macro functions found in PEAR html packages. Features 1. Automatically generates a set of files at the time of table creation based on preexisting files search and replace rules: - default search pattern is varible name + ABCDEFGHIJKLMOPQRSTUVWXYZ0123456789 - default file name is selected $database underscore selected $table underscore inputfile At table creation time the script generates the following database+table specific files: (file name => function) navbar2.php => navbar for the specific table insert.php => insert entry display.php => display entry delete.php => delete entry edit.php => displays entry for edit edit_selected.php => edit selected entry 2. Basic database crud functionality - Create - Review - Update - Delete 3. Additional features - server side file upload - the blobs associated with a file is copied over to the project folder - server side file removal - all generated files are removed at the time of deletion. 4. Supported data types: TEXT TYPES CHAR() A fixed section from 0 to 255 characters long. VARCHAR() A variable section from 0 to 255 characters long. TINYTEXT A string with a maximum length of 255 characters. TEXT A string with a maximum length of 65535 characters. BLOB A string with a maximum length of 65535 characters. MEDIUMTEXT A string with a maximum length of 16777215 characters. MEDIUMBLOB A string with a maximum length of 16777215 characters. LONGTEXT A string with a maximum length of 4294967295 characters. LONGBLOB A string with a maximum length of 4294967295 characters. NUMBER TYPES SMALLINT() -32768 to 32767 normal 0 to 65535 UNSIGNED. MEDIUMINT() -8388608 to 8388607 normal 0 to 16777215 UNSIGNED. INT() -2147483648 to 2147483647 normal 0 to 4294967295 UNSIGNED. BIGINT() -9223372036854775808 to 9223372036854775807 normal 0 to 18446744073709551615 UNSIGNED. FLOAT( , ) A small number with a floating decimal point. DOUBLE( , ) A large number with a floating decimal point. DECIMAL( , ) A DOUBLE stored as a string , allowing for a fixed decimal point. OTHERS DATE YYYY-MM-DD. ENUM () Short for ENUMERATION which means that each column may have one of a specified possible values. DATETIME TIME Architecture Challenges (Design and Implementation) 1. Implementation: PEAR - installation - learning to use PEAR's html form and table features 2. Implementation: String parsing - displayed everything as strings and reg-matched - special cases 3. Design: Connecting individual features together into a system - where to split up to diff. features - where to join into common files 4. Design: finding appropriate file generation points - the project has a single level of file generation: at the point of table creation. - more creatively, a higher level of abstraction, have generated files generate additional files Limitations (Suggested steps for future versions) Because of time constraint this version only supports basic functionalities of a database. This version : 1. Supports common data types but not all - does not support data types for set or timestamp. - because MySQL does not have a represenation for bool types, tinyint is reserved for representing boolean values 2. Does not enforce referencial integrity. Does not enforce auto-increments. 3. No access control in this version. - related to acl is the fact that direct modificaiton of reserved tables is allowed in this version which is not secure. Reserved tables in mySQL are information_schema, phpmyadmin, and webauth 4. One table at a time creation (Use tools such as MYSQL Command Line Prompt to create multiple tables at once) 5. Cannot process tables containing more than 1 blob types per table (blob types include blob, mediumblob, and longblob). 6. No functionality for displaying and rendering the blobs that are stored in the database. 7. Only allows one primary key in a given table. This primary key can appear anywhere in the table, not just as the first attribute. If a composite key is used, the first primary key specified will be used. 8. Users should be careful in the case of deletions because the System does not prompt for confirmation or provide any undo features. How to install 1. install xampp server under directory C:\Program Files\ 2. untar source code into C:\Program Files\xampp\htdocs\ | |
Reference Links:
MICE
Foo
EditFoo
DeleteFoo
A text editor I found to be useful for this project: Crimson editor | |