Re: Framework Development (2)
| From: | Bertrand Mansion | Date: | Mon, 17 Jun 2002 09:02:19 +0000 |
| Subject: | Re: Framework Development (2) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7088@lists.php.net to get a copy of this message | ||
le 16/06/02 19:47, Sebastiao Rocha à rocha@i-node.com.br a écrit :
> Did some home work yestarday...
>
> I was playing with DB_Storage and think it can do what i am planning.
> That is the idea (I have that working already but want to port it to PEAR):
>
> (Historic background :)
>
> Every time we want to work with a new table, inserting or doing some search
> we had a lot of work to do. Put the htlm pages, create DB objects to
> handle the data to the backend DB, control the user input, check input,
> control nagivation, the list goes on.
>
> In a model-view-control we separate this jobs. The view take cares
> of user presentation, the model part takes care of the business (DB)
> and the control takes care of user inputs.
>
> So i did the following.
>
> I though that template together oohforms.inc (phplib), that i know that
> time, could do the View job, and db_pgsql.inc wrapped with a DB
> object could easily do the Model part.
> I did some work to put a Model class and that is working very well. It
> takes 5 minutes (checked on clock) to put the pages for a new table
> with edit, remove, list and new functions. All the SQL stuff is done
> automatically. And data is passed from the form to the db without need of
> new coding. Even complex searchs are done without adicional code. And with
> a new DB Object i could to do bath editing of several fields at the
> same time like a spread sheet.
>
> To do the same thing with PEAR all that we need is some Control class
> and some modifications on the DB_storage. ITX replaces phplib's
> template, oohforms replacing HTML_OOH_Form is natural but i have to
> understand the new work yet. DB and DB_storage can do the Model part.
> MDB also can do, i think, but that is working in progress (And i really
> like the XML stuff in it).
Did you look at HTML_QuickForm ?
Bertrand Mansion
Mamasam