|
Posted by Kenneth Downs on 06/24/05 16:02
Peter Salzman wrote:
> Hi all,
>
> Newish PHP programmer here. I wrote a form select class to help reduce
> code
> clutter, but I don't think the effort was worth it. I was hoping to post
> my attempt and get some ideas from more advanced users on how to implement
> a select form using less lines of code.
>
> First the select form class which implements a select widget. I'll post
> only the relevent parts:
>
>
Pete, IMHO the value of abstraction of this sort in a short-transaction
environment like the web is severely overrated, to the point of being an
obstruction to productive work. Did you by any chance come from a desktop
dev environment?
My own work is all around databases. If yours is also, you may benefit from
what I did. It centers around having a data dictionary specifying what the
columns are in all of the tables (it is much more than that, but that is a
good introduction). When it comes time to generate HTML widgets, you read
the dd and look at what kind of columns you have and generate appropriate
widgets (mostly textbox, textarea, and SELECT lists).
If you can give more context about the kind of site you are working on
perhaps myself or others can give more details.
--
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec)ure(Dat)a(.com)
Navigation:
[Reply to this message]
|