Re: Re: Converting tables into forms
| From: | David Robley | Date: | Mon, 02 Nov 2009 11:06:08 +0000 |
| Subject: | Re: Re: Converting tables into forms | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299560@lists.php.net to get a copy of this message | ||
Bastien Koert wrote:
> On Wed, Oct 28, 2009 at 8:53 AM, Bob McConnell <rvm@cbord.com> wrote:
>> From: Ashley Sheridan
>>
>>> On Tue, 2009-10-27 at 21:07 -0700, benc11@gmail.com wrote:
>>>
>>>> I am trying to take MySQL tables and use the table structure to
>> create
>>>> HTML/PHP forms in as few steps as possible for further development. I
>>>> have a project that has hundreds of tables and requires hundreds of
>>>> forms to be created and don't want to do so field by field by hand.
>>>>
>>>> On Tuesday, October 27, 2009, Allen McCabe <allenmccabe@gmail.com>
>> wrote:
>>>> > Please explain with much greater detail.
>>>> >
>>>> > On Tue, Oct 27, 2009 at 6:12 PM, benc11@gmail.com
>> <benc11@gmail.com> wrote:
>>>> > Does anyone have a quick way of converting tables into forms?
>>>> >
>>>
>>> There is still the issue of exactly what db fields will translate
>> into.
>>> Where is a good time to use radio buttons instead of select lists, or
>>> checkboxes instead of select-multiple lists? What about text fields in
>>> the db? Should they be textareas or text inputs? Do all the db fields
>>> need to be translated as visible fields? Should you hide ID fields?
>>>
>>> There are so many questions, that you might be better off rolling your
>>> own, as a one-size-fits-all will not always work for everyone.
>>
>> I have a feeling in the pit of my stomach that your project is going to
>> create a support nightmare. Either you will have to hand code forms for
>> each table, or find a framework that dynamically creates the forms from
>> schema and create suitable maps for each form. In either case, it will
>> take weeks or months to complete and be nearly impossible to maintain
>> when tables are changed or added.
>>
>> If your solution requires you to create hundreds of forms, which could
>> take months to code, you need to take another look at the problem. I
>> don't believe you have thought it through very well.
>>
>> Bob McConnell
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
> symfony might be another option, but it will take you some time to
> sort out the yaml config.
>
>
Recent versions of symfony (at least >= 1.0) can create the schema.yml from
an existing database structure or a .sql file.
Cheers
--
David Robley
This building is so high, the elevator shows movies.
Today is Sweetmorn, the 14th day of The Aftermath in the YOLD 3175.