On Fri, May 22, 2009 at 04:56:01AM -0300, Manuel Lemos wrote:

> Hello,
> 
> on 05/20/2009 11:09 AM Paul M Foster said the following:
> > Both this class and Manuel Lemos' form generation class (from
> > phpclasses.org) will create beautiful forms for you. However, you may
> > find that the amount of [repetitive] typing you do will be equivalent or
> > greater than simply creating the form by hand.
> >
> > The best solution would probably be a form you fill out which asks you
> > about all the fields you want, and then generates the code to paint the
> > form. There are commercial solutions which do this, and some (not that
> > great) free solutions. I'm working on one myself, which will eventually
> > be a sourceforge/freshmeat project.
> 
> Thank you for mentioning my package, but I am not sure what you mean.
> 
> The Forms Generation and Validation package seems to do exactly what you
> describe and more.
> 
> 
> IMHO, creating forms by hand is by no means simpler, especially if you
> want to include browser side (Javascript) validation.
> 
> I mean, I am not masochist to create something that will give me more
> work in the end to develop PHP forms based applications than if I would
> type HTML manually.
> 
> Furthermore, the plug-ins that come with the package dramatically reduce
> the amount of code you need to type to achieve the same generating
> common HTML inputs manually.
> 
> Anyone can judge by yourself by going here and see several example forms
> and the actual code that it takes to generate them:
> 
> http://www.meta-language.net/forms-examples.html
> 
> For instance this scaffolding plug-in generates CRUD forms that you
> often need to manage data stored for instance in databases.
> 
> http://www.meta-language.net/forms-examples.html?example=test_scaffolding_input
> 
> For those interested to check it out, the actual class package can be
> downloaded from here:
> 
> http://www.phpclasses.org/formsgeneration
> 
> Here you may watch an extensive tutorial video that covers practically
> all features:
> 
> http://www.phpclasses.org/browse/video/1/package/1.html
> 


Here's what I was talking about. Assuming you simply type out your form
fields like this:

<input type="text" name="address" size="30" value="123 Main St."/>

Now, if you do it with a class like yours:

$arr = array('type' => 'text',
            'name' => 'address',
            'size' => 30,
            'value' => '123 Main St.');

$form->AddInput($arr);

(I haven't looked at your class in a while, so I may have invoked it
slightly incorrectly.)

If you compare the typing involved in the first case with the typing
involved in the second case, you can see that it's more in the second
case.

Yes, your forms generation class includes a tremendous amount of proven
code, including a bunch of Javascript validation, all of which the
programmer doesn't have to develop himself.

The only real complaint I have about your class is that the class file
itself (forms.php) is 158+ K bytes, which must be loaded every time you
surf to a page for the first time.

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to