[Typo3-dev] RFC Forms, validation, etc. in 5.0

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Fri Nov 18 12:32:01 CET 2005


Hello Michael,

I would offer to support your efforts.

It would be very usefull if one could make use of the form libraries not 
only from the BE.

It would speed up productivity of tools, if FE Forms could be generated 
based on same $TCA configuration. I already did some studies on this.

regards

Elmar




Michael Scharkow wrote:
> Hi *,
> 
> as Sebastian Kurfürst just proposed a refurbished evaluation API for 
> TYPO3, I'm jumping in here and propose some bigger changes for T3 5.0:
> 
> Problem: TCEMAIN is HUGE and difficult to maintain, as is TCEFORMS. 
> Forms in the BE are manually created everywhere, validation both in 
> Browser (via JS) and in TCEMAIN (when CRUD ing table rows) is difficult.
> 
> Solution: Large refactoring and more MVC and DRY (yes, I did a lot of 
> Rails recently).
> 
> 1. Create class.t3_forms to create a simple but flexible API for 
> creating *all* kinds of forms, input fields and stuff. Basically 
> implement PEAR:HTML_Quickform which we can't use for license issues and 
> because it's not flexible enough IMHO. This will be a rather low-level 
> API to be used both in BE and FE.
> 
> 2. Create a class that renders our data models (=$TCA, because that is 
> exactly what $TCA defines) into forms, complete with validation and all. 
> We can draw on TCEFORMS for that (and there's also a dozen FE extensions 
> which do this) but use t3_forms classes for actual rendering in order to 
> remove *all* HTML form that code.
> 
> 3. Validation of data is done with a dedicated t3_validate library that 
> can be accessed directly through a PHP API *and* via AJAX. This enables 
> us to get rid of most JS currently used for evaluation and have nice, 
> slim forms as seen in 
> http://particletree.com/features/degradable-ajax-form-validation/
> 
> 4. Finally, use TCEMAIN only for actual data manipulation, like new, 
> copy, move, etc. If we have a clean API for that, we can juggle with 
> data from outside the BE.
> 
> 
> I am currently working on (1) because the other tasks depend on that. 
> But since I know a lot of development is going on in hiding in TYPO3, 
> I'd like to ask if people here are working on this already, or are 
> interested in making this happen, or think these ideas are complete 
> bull... I'd rather know this before starting such a project ;)
> 
> Greetings,
> Michael
> 
> PS: Kasper, those backend forms and wizards are *really* hardcore code, 
> respect! :)


-- 
Climate change 2005: Mexico, Guatemala, New Orleans, Sahel, Bangladesh,
Spain, Portugal, Austria, Swiss, France, ...
Production of CO2 is killing people.
Production of CO2 just for fun is killing people just for fun.




More information about the TYPO3-dev mailing list