Page 1 of 1
PHP Code Generator
Posted: Tue Dec 07, 2010 10:01 am
by JohnBoy2
I have built a code generator for Java that, given an object definition, will create for you:
- DDL statement for your MySQL table
- Value Object class to represent rows in the table
- Full CRUD persistence layer
- Full CRUD, working web-based AJAX GUI prototype
This gives you a tremendous jump-start in developing any new feature that requires a new table in your database.
I've also extended the generator to create some PHP code, although I have not yet extended the PHP code to do the GUI portion. I'm looking for volunteers who want to be a part of this important project, as I am sure there are thousands of PHP developers that will benefit from using this code generator.
Get the full details here:
http://www.timechannels.com/WhatIsPOJOJenerator
Please contact me:
john@timechannels.com if interested. I think you'll find it an interesting and rewarding endeavor.
Cheers,
John
Re: PHP Code Generator
Posted: Tue Dec 07, 2010 10:39 am
by Weirdan
You're are aware of other similar tools, like those
built-in in Symfony, right?
Re: PHP Code Generator
Posted: Tue Dec 07, 2010 3:54 pm
by JohnBoy2
No, I'm not aware of them, as I know next to nothing about PHP. I took a look at that page on Symphony (thanks), It looks comprehensive, but also very complicated.
Does it generate actual code that can be built immediately to produce a complete and working prototype, from the data model all the way to the front end? Full CRUD capability? Using modern AJAX techniques?
John
Re: PHP Code Generator
Posted: Wed Dec 08, 2010 1:35 am
by Christopher
I'd be interested to know more. After looking at the web page for it, I am not sure how if it would translate that well to PHP.
Re: PHP Code Generator
Posted: Wed Dec 08, 2010 4:03 am
by Weirdan
JohnBoy2 wrote:
Does it generate actual code that can be built immediately to produce a complete and working prototype, from the data model all the way to the front end? Full CRUD capability? Using modern AJAX techniques?
I don't know if they use ajax in their generated management interface, but the answer to other questions is yes - it's possible to create a fully functional application (the functionality would be quite basic of course) in symfony just by editing schema definition files and running their command-line tools.
Re: PHP Code Generator
Posted: Wed Dec 08, 2010 6:59 am
by JohnBoy2
Yes, the "What Is POJO Jenerator" page does not talk at all about the PHP code it produces, and of course the name of the tool strongly suggests it's a Java-only thing. (POJO = Plain Old Java Objects).
But I believe the concept can be extended to other platforms, and I started this myself by doing the value object and simple DAO (persistence) code for PHP, which the tool produces now. Taking it to the next step and completing the UI portion is what I'm interested in, but I lack the PHP skills to do it. If done right, I believe the result would be much simpler, faster, easier, perhaps more elegant than what I can see of Symphony, but I really don't know.
If you want to see a working demo of what POJO Jenerator produces for Java, you can go here:
http://www.timechannels.com/EmployeeDisplayRecords
This was generated for a simple "Employee" object for demonstration purposes. Go ahead and add records, edit records, delete them (just please delete the records you add, so others can experience the same demo after you).
The AJAX techniques are really simple and easy too, which is a big part of the allure of this approach, to me. It produces a modern UI, albeit very basic. But it's very easy to extend & customize for the specific needs of each project/feature.
Re: PHP Code Generator
Posted: Sun Dec 12, 2010 1:58 pm
by JohnBoy2
So I guess the next logical question would be: after checking out that working prototype (link in previous post), how long would it take you to replicate something like that using PHP (and any tools such as Symphony)? If the answer is anything more than 10 minutes, then I think it's really worth it to extend the POJO Jenerator tool to produce the same thing for PHP. Because that working prototype took
less than 10 minutes for me to create using POJO Jenerator. (Honest!)
All I need is some volunteer(s) to help produce a working replica of that in PHP, and then we can use that as the template to include into POJO Jenerator, and then voila! - you'll never have to write anything like that again, for any entity/object/table, because the generator will do it for you.
I would have to think that would be a worthwhile endeavor. Email me if interested:
john@timechannels.com
John