[Catalyst] An initial version of a form rendering and validationmodule

Andrew Ford A.Ford at ford-mason.co.uk
Tue Nov 22 17:49:55 CET 2005


Peter Edwards wrote:

>2005/11/22, Andrew Ford <A.Ford at ford-mason.co.uk>:
>  
>
>>>Given that the module works with Catalyst I am making a first
>>>announcement of version 0.04 here.  The source code is available from:
>>>
>>>    http://andrew-ford.com/perl/cgi-formmanager/
>>>      
>>>
>
>Looks good, just the sort of thing I need.
>I've got Catalyst set up and need to make a business application. The
>ServerDB example is a good start. Now I'm trying to figure out the best way
>to build on that.
>
>Bernard FRIT wrote:
>  
>
>>Do you think that form definition data could be reasonably loaded from
>>say a YAML file or whatever in the flavor of formbuilder source
>>directive?
>>    
>>
>
>I had been thinking along these lines:
>Use an XML / YAML screen definition file that is rendered at run time into a
>TT2 template, looking up field labels, constraints and any special
>Javascript handling from a data dictionary. I guess I might need to cache
>the compiled templates and re-generate them if the code detects the
>definition has changed.
>One level above this, for each screen hold multiple definitions, say against
>user, team or company, to tailor the appearance of the application. This
>would let users pick dynamically the fields they want to see on screen.
>(Yes, I'm being bitten because of hard coded screens.)
>Based on the virtual host name vary how the app looks and works, use
>alternate dictionaries and make Internationalization easier.
>I'm not trying to re-invent ColdFusion here but save on Apache instances,
>though there might be scope for a screen definition editor later on to save
>time typing {}s for many screens.
>
>All this is a tier or two above Catalyst in package terms.
>I'm not sure where the best place is to discuss this sort of thing?
>It seems a fairly common set of requirements when writing a business system
>and I don't want to reinvent any wheels.
>  
>
That is interesting.  I have tried to make the form definition format 
succinct -- perl code was the natural first implementation language for 
me because it all gets edited in Emacs.  However the definition gets 
munged into a slightly different format at process initialization time 
(to save time at request time), and I have thought that I might play 
with different formats (as CGI::FormBuilder does).  I had thought about 
storing the definitions in a database and/or reconciling the form 
definition with the parts of the database schema to which it relates.  
I'll think some more about this when I have got the basic form rendering 
and validation to a robust state.

Andrew



More information about the Catalyst mailing list