[TYPO3-dev] Refactoring TCEforms

Andreas Wolf typo3ml at andreaswolf.info
Mon Aug 25 19:27:25 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Dmitry!

Dmitry Dulepov [typo3] schrieb:
> Sounds good. However I have a question (as usual) :)
No problem, I asked for questions :)

> How do you plan to preserve compatibility? For example, if an
> extension uses t3lib_TCEforms now, will it break?
Well, I think it will be possible to ship the old TCEforms for one or
two T3 versions, also I thought about a way to rewrite this class as a
facade. There are possibilities to make this completely transparent. Of
course it would require quite some work and perhaps also make people
lazy when it comes to adjusting their code to the new TCEforms.

> I am +1 for making these definitely positive changes to TCEforms. But
> we always care to stay compatible in some way. Or at least we have to
> provide guidelines how to change the existing code in extensions if
> they use TCEforms.
I am +1 with you here (or to say it non-geekish ;) I agree with you), we
can't let people be on their own when we tear down this central component.

> Also it would be very nice to add one more point to the rewrite: make
> it easy to use TCEforms in BE modules. Currently alt_doc is almost
> the only way that uses TCEforms. Using them from extensions would be
> great. Making them useful in FE would be just perfect. (Am I looking
> too far?)
This is one thing I'm thinking of, making forms more flexible. You will
be able to create your own form objects, inherited from
t3lib_TCEforms_AbstractForm, with ease, so you can adjust them to your
needs. You may also easily subclass the existing concrete forms to
enhance them.

Styling of the forms will perhaps be done by some external classes which
are attached to the form and element objects. I have not thought this to
the very end, it's also not available in the UML diagram right now.

>> [1] http://www.andreaswolf.info/typo3/tceforms-uml/
> 
> Palette is a containment inside form element. This is ok for global
> palette but what about fields that can have attached palettes?
Well, I have to admit I don't quite understand your concern. The
palettes are always attached to one specific form element and contain
some more form elements, which are rendered differently. Or did I get
something wrong here?

The form object will always be aware of all child fields, no matter if
they are on a sheet or a palette or in some other container.

> I did not look to the code, just wondering how that will work with
> such containment.
There will be a common interface for all containers, so they implement
the same methods and we will be able to iterate over a complete form. I
also think that the Javascript code of TCEforms needs some heavy
refactoring, making it more object oriented and easier to extend
(especially with AJAX calls e.g. for IRRE). But I'm afraid I'm no JS
expert and I won't have time to dig really deep into it, too. So, I
would be happy to have someone taking over the JS part.

Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBSLLrfAJFrtzcYmY6AQhWBA/+NMT3CDaMNXl0aWzDJB31I53+KtEcRBvU
nRSX1j6N5HUopJCRtZ+zhkoXlgOlxQWDYhAnu0tFhsGoYlXl6eVajsC/l9I5d+Qm
T5KwBosu0oToIWolwD/hikeMkIYm4BCLJTRyZ4tZDK7I4kl2x08HdwtbEp5yzbSY
8HGT2Z6xxtXjKtce69KqCvZ6U5gR6WZu5kWKofD2D/0ZxnlJdzoje/pkrDEdhOD7
6CPi1ksPBy6BF9qgL0cpuOuSjZ7UGIyrjcenrdjuMb0lkQ7oCmTPdL+ueZ8SmIFF
itJPFX92a6JWVu1TBQVayh37g01BisJg5JKTo9qyNoxsILzzCG1wqVNQbQKSv5Ky
RB3fMF2O7m23YYEpolXuLk/LvMidwqF05ptFu8F3UIaZ6wmVlTjz0zoSsLDuB+hE
vUk9qpnISPEpJctezfOtMC+5vx6cg91W5M1gZlPQEZO3B0g6fDfX4azlLeEazlnH
J7RTrDAlw1OGs/jQp9DZWlR116lcLFCjHdO7GRVXvZD9u44X48rgY70rsRricf5j
E6nKugEDrxlHyw/AM38cOTEHyo4n/tqhkoKmN1Wom1p/EuacYweZ2FNCGMCGzdkm
GV/xZlJ1vwxX2AgkZgDSxLhOTtpzoScE4BzHXVzWIGPEbVoMseHfRTRxZY8pgxK0
XmFDrAolbaM=
=p/1d
-----END PGP SIGNATURE-----




More information about the TYPO3-dev mailing list