Re: [PHP] Forms validation and creation- easier solution?

2009-05-22 Thread Manuel Lemos
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

-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



RE: [PHP] Forms validation and creation- easier solution?

2009-05-22 Thread Angelo Zanetti


-Original Message-
From: Manuel Lemos [mailto:mle...@acm.org] 
Sent: 22 May 2009 09:56
To: Paul M Foster
Cc: php-general@lists.php.net; Angelo Zanetti
Subject: Re: [PHP] Forms validation and creation- easier solution?

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_in
put

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


Thanks manuel.

I will check out the class.

Much appreciated your response.

Thanks
Angelo

Elemental
http://www.elemental.co.za


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



Re: [PHP] Forms validation and creation- easier solution?

2009-05-22 Thread Paul M Foster
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



Re: [PHP] Forms validation and creation- easier solution?

2009-05-22 Thread Manuel Lemos
Viva,

on 05/22/2009 10:36 AM Paul M Foster said the following:
 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.

That is because you are just thinking about the typing of the generated
HTML. To generate and validate forms, you also have to consider the code
you write to validate and process the forms because the HTML forms do
not process by themselves.

You need to think about the security of your application, so you also
need to validate submitted values, discard invalid values, escape
outputted values, and so on. All that is done with a couple of calls to
the forms class.


 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.

That used to be an issue in the 20th century in the PHP 3 days. Since
PHP 4, the PHP code is no longer interpreted. The Zend engine compiles
the PHP code in Zend op codes in the first stage. In the second stage
the op codes are executed. If you use a cache extension like APC, Turck
MMCache, XCache, etc.. the first step is skipped after the first
execution and the size of the original code is not relevant because it
is already compiled in shared memory.

Anyway, the class has all that code because it is necessary to implement
all it supports.

-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



Re: [PHP] Forms validation and creation- easier solution?

2009-05-22 Thread phphelp -- kbk


On May 20, 2009, at 2:03 AM, Angelo Zanetti wrote:

We have done quite a few projects and we are looking to find better  
ways to

implementing forms.


This is fairly simple to roll-your-own.

I do it from metadata. I check MySQL metadata for data types,  
lengths, and defaults. In addition, my metadata tables contain:

 -- field captions
 -- field-use descriptions and business rules (generates CSS pop-up  
help)

 -- the type of control used
 -- the source of data for controls (I call system codes: like the  
lists of choices for comboboxes and radio buttons -- I keep almost  
all of these in a single table.)

 -- whether data in a field is required
 -- whether the data in a field are visible, editable, or new-record- 
only editable
 -- whether the data are encrypted (core data class handles the  
encryption/decryption)

 -- data entry order
 -- any non-standard user rights to the data.
 -- Simple business rules (like maximums, minimums and ranges of  
acceptable values)
 -- easy validation categories: birthdates, eMail formatting, USA  
phone numbers  postal codes, US social security #'s, credit card  
format, and the like.


The last two can generate JavaScript, too (still working on that).

 -- I also am working on more complex validation being automatic:  
across fields or tables, dependent on other variables, etc.


By standardizing the format of metadata and the means of storing  
system code values, plus core CSS class names, you can use this  
across projects.


Ken

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



[PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Angelo Zanetti
Hi all.

 

We have done quite a few projects and we are looking to find better ways to
implementing forms.

 

Forms seem to be quite time consuming and repetitive.

 

Generally are there any classes or libraries that will assist with: 

 

1.  Easy creation of forms (fields and layout)

2. Validation of specific fields within the forms (server side not JS)

3. Decrease in time required to setup the forms pages

any other comments are welcome.

 

Thanks in advance

Angelo


Elemental
http://www.elemental.co.za http://www.elemental.co.za/ 

Dynamic Web and Mobile Solutions

 

 



Re: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Olexandr Heneralov
Hi!
Zend framework has a wonderful solution to solve this task. You can download
even the demo showing how to do this task
Best regards,
Alex.

2009/5/20 Angelo Zanetti ang...@zlogic.co.za

 Hi all.



 We have done quite a few projects and we are looking to find better ways to
 implementing forms.



 Forms seem to be quite time consuming and repetitive.



 Generally are there any classes or libraries that will assist with:



 1.  Easy creation of forms (fields and layout)

 2. Validation of specific fields within the forms (server side not JS)

 3. Decrease in time required to setup the forms pages

 any other comments are welcome.



 Thanks in advance

 Angelo


 Elemental
 http://www.elemental.co.za http://www.elemental.co.za/

 Dynamic Web and Mobile Solutions








RE: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Angelo Zanetti
 

 

  _  

From: Olexandr Heneralov [mailto:ohenera...@gmail.com] 
Sent: 20 May 2009 09:08
To: Angelo Zanetti
Cc: php-general@lists.php.net
Subject: Re: [PHP] Forms validation and creation- easier solution?

 

Hi!
Zend framework has a wonderful solution to solve this task. You can download
even the demo showing how to do this task
Best regards,
Alex.

 

Thanks Alex. But would that mean that I need to implement the entire
Framework or can I just use the class to incorporate into our new projects
(bespoke applications - custom developed).

Looking forward to your reply!

Angelo

2009/5/20 Angelo Zanetti ang...@zlogic.co.za

Hi all.



We have done quite a few projects and we are looking to find better ways to
implementing forms.



Forms seem to be quite time consuming and repetitive.



Generally are there any classes or libraries that will assist with:



1.  Easy creation of forms (fields and layout)

2. Validation of specific fields within the forms (server side not JS)

3. Decrease in time required to setup the forms pages

any other comments are welcome.



Thanks in advance

Angelo


Elemental
http://www.elemental.co.za http://www.elemental.co.za/

Dynamic Web and Mobile Solutions






 



Re: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Olexandr Heneralov
Hi!
No, you should not use all the framework.
You can use just a class - Zend_Form (
http://framework.zend.com/manual/en/zend.form.quickstart.html).


2009/5/20 Angelo Zanetti ang...@zlogic.co.za




  --

 *From:* Olexandr Heneralov [mailto:ohenera...@gmail.com]
 *Sent:* 20 May 2009 09:08
 *To:* Angelo Zanetti
 *Cc:* php-general@lists.php.net
 *Subject:* Re: [PHP] Forms validation and creation- easier solution?



 Hi!
 Zend framework has a wonderful solution to solve this task. You can
 download even the demo showing how to do this task
 Best regards,
 Alex.



 Thanks Alex. But would that mean that I need to implement the entire
 Framework or can I just use the class to incorporate into our new projects
 (bespoke applications – custom developed).

 Looking forward to your reply!

 Angelo

 2009/5/20 Angelo Zanetti ang...@zlogic.co.za

 Hi all.



 We have done quite a few projects and we are looking to find better ways to
 implementing forms.



 Forms seem to be quite time consuming and repetitive.



 Generally are there any classes or libraries that will assist with:



 1.  Easy creation of forms (fields and layout)

 2. Validation of specific fields within the forms (server side not JS)

 3. Decrease in time required to setup the forms pages

 any other comments are welcome.



 Thanks in advance

 Angelo


 Elemental
 http://www.elemental.co.za http://www.elemental.co.za/

 Dynamic Web and Mobile Solutions








RE: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Jay Blanchard
[snip]
1.  Easy creation of forms (fields and layout)
[/snip]

I posted a form function several months ago that will help you with
this. Just search the list archives 

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



Re: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Paul M Foster
On Wed, May 20, 2009 at 10:08:12AM +0300, Olexandr Heneralov wrote:

 
 2009/5/20 Angelo Zanetti ang...@zlogic.co.za
 
  Hi all.
 
  We have done quite a few projects and we are looking to find better ways to
  implementing forms.
 
  Forms seem to be quite time consuming and repetitive.
 
  Generally are there any classes or libraries that will assist with:
 
  1.  Easy creation of forms (fields and layout)
 
  2. Validation of specific fields within the forms (server side not JS)
 
  3. Decrease in time required to setup the forms pages
  any other comments are welcome.
 
 Hi!
 Zend framework has a wonderful solution to solve this task. You can download
 even the demo showing how to do this task
 Best regards,
 Alex.

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.

Paul

-- 
Paul M. Foster

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



RE: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Angelo Zanetti


-Original Message-
From: Paul M Foster [mailto:pa...@quillandmouse.com] 
Sent: 20 May 2009 16:09
To: php-general@lists.php.net
Subject: Re: [PHP] Forms validation and creation- easier solution?

On Wed, May 20, 2009 at 10:08:12AM +0300, Olexandr Heneralov wrote:

 
 2009/5/20 Angelo Zanetti ang...@zlogic.co.za
 
  Hi all.
 
  We have done quite a few projects and we are looking to find better ways
to
  implementing forms.
 
  Forms seem to be quite time consuming and repetitive.
 
  Generally are there any classes or libraries that will assist with:
 
  1.  Easy creation of forms (fields and layout)
 
  2. Validation of specific fields within the forms (server side not JS)
 
  3. Decrease in time required to setup the forms pages
  any other comments are welcome.
 
 Hi!
 Zend framework has a wonderful solution to solve this task. You can
download
 even the demo showing how to do this task
 Best regards,
 Alex.

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.

Hi Paul.

This sounds Great. Thanks for the advise. Just as a matter of interest do
you know the location / path to Jay's class? I tried searching the archives
but couldn't find it/

Thanks
Angelo



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



Re: [PHP] Forms validation and creation- easier solution?

2009-05-20 Thread Paul M Foster
On Wed, May 20, 2009 at 05:10:57PM +0200, Angelo Zanetti wrote:

 
 
 -Original Message-
 From: Paul M Foster [mailto:pa...@quillandmouse.com]
 Sent: 20 May 2009 16:09
 To: php-general@lists.php.net
 Subject: Re: [PHP] Forms validation and creation- easier solution?
 
 On Wed, May 20, 2009 at 10:08:12AM +0300, Olexandr Heneralov wrote:
 
 
  2009/5/20 Angelo Zanetti ang...@zlogic.co.za
 
   Hi all.
  
   We have done quite a few projects and we are looking to find better ways
 to
   implementing forms.
  
   Forms seem to be quite time consuming and repetitive.
  
   Generally are there any classes or libraries that will assist with:
  
   1.  Easy creation of forms (fields and layout)
  
   2. Validation of specific fields within the forms (server side not JS)
  
   3. Decrease in time required to setup the forms pages
   any other comments are welcome.
  
  Hi!
  Zend framework has a wonderful solution to solve this task. You can
 download
  even the demo showing how to do this task
  Best regards,
  Alex.
 
 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.
 
 Hi Paul.
 
 This sounds Great. Thanks for the advise. Just as a matter of interest do
 you know the location / path to Jay's class? I tried searching the archives
 but couldn't find it/
 
 Thanks
 Angelo
 

You can search the archives by author, but I found it here:

http://marc.info/?l=php-generalm=123003593813003w=2

Paul

-- 
Paul M. Foster

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