[Typo3-dev] RFC Forms, validation, etc. in 5.0
Michael Scharkow
mscharkow at gmx.net
Fri Nov 18 11:16:37 CET 2005
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! :)
More information about the TYPO3-dev
mailing list