NYCPHP Meetup

NYPHP.org

[nycphp-talk] DataObjects generator

Kenneth Downs ken at secdat.com
Fri Nov 18 18:35:51 EST 2005


Have you considered simply dumping out associative arrays that describe
each table, and then having  single library of code that handles them? 
This gives you the flexibility to see the code's efficacy in real-time as
you work on it -- without having to run the generator for every little
tweak -- and then having it save cached chunks of HTML as it goes.

> I've developed a tool that creates a DataObject for each table I have in
> my
> MySQL database. When the script is executed against a particular table it
> generates a script containing OO code with a number of methods defined by
> default e.g. set_/get_ , getAll, get, insert, delete, update, and a error
> method.
>
> It has also been fun finding ways to use the DataObjects. As a result, I
> have put together a couple of examples;
> Using a single DataObject : http://cthorn.com/oodbigen/usingdataobject.php
> MVC wrapper for the DataObjects :
> http://cthorn.com/oodbigen/mvcwrapper.php
>
> Hope someone finds this useful. Feedback welcomed..
>
> Chauncey Thorn
> PHP App. Developer
> email: chaunceyt at gmail dot com
> url: http://www.cthorn.com/
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org


-- 
Kenneth Downs
Secure Data Software
631-379-0010
ken at secdat.com
PO Box 708
East Setauket, NY 11733




More information about the talk mailing list