Re: Invoice editing in QF/DataObject or FB?
| From: | foxmask | Date: | Mon, 21 Mar 2005 22:11:58 +0000 |
| Subject: | Re: Invoice editing in QF/DataObject or FB? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18215@lists.php.net to get a copy of this message | ||
With PHP4 :
i saw phpCodeGenie which generate form/class/action (insert/edit/delete) for you from your database, but it does not use PEAR but adodb :/
Everything is done in 3clicks :
1) choose the database
2) choose the "objects" you want to generate (form and/or class)
3) generate the code
i've asked to phpCodeGenie if there is a way to use PEAR::DB class instead of Adodb but without any responses ....
With PHP5
i saw propel which is a DAO (http://propel.phpdb.org/wiki/) th t use phing to generate all the class to access to your database... but this use Creole as database abstraction not PEAR...at this time i didnt find the gold nugget that use PEAR... let us hope that our waitings will be filled by next a post kind regards Ken Restivo a écrit :
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I need to implement the following common pattern, and I don't want to reinvent the wheel. In fact, I don't want to invent it at *all*, if I can avoid it. The most familiar example of the problem is an "invoice screen", that lets you start up a new invoice, enter the information that goes into the "invoice" table, then also shows a summary (HTML_Table or frozen QF) of each of the "line items", whose data goes into the line_items table. I need to show all the line items, and let people add/remove/edit line items, coming BACK to the invoice screen when they are done (or ideally expanding/hiding the line items-- but probably not possible due to prohibition against nested forms in HTML). This pattern is needed in a half-dozen other places in my application. In fact, I'd imagine it's incredibly common in relational database applications: a million interlinked tables, that the users have to edit and deal with. A corrolary to this is the case where the user is choosing from a pop-up the linked fields (in this case using ->fb_linkDisplayFields), but more often than not needs a "NEW" or "OTHER" button to add one that *isn't* in the database: so the pop-up needs a "New" or "Other" link next to it, which will bump them to a screen to enter a new record for the linked table, then after validating and processing, go back to where the user was (with all their other data intact!) with the new record's ID pre-selected in the pop-up. Again, I cannot imagine how anyone can build a usable interface to a relational database without this, so I can't possibly be the first to bump up against this. There must be example PEAR code galore. Unfortunately, I haven't had luck finding it. Are there any examples of this kind of "invoice screen" in QF/DataObjects or FB? It's similar to a "shopping cart", so I'd assume this has been done a million times. - -ken - -- - --------------- The world's most affordable web hosting. http://www.nearlyfreespeech.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCPzcse8HF+6xeOIcRAmjKAKCG24DyML9GXLdNQ4C5FoPR2I8y3wCfR8XG fPKgv1UcNR0CgRymPusrk+U= =/K7E -----END PGP SIGNATURE-------