[TYPO3-ect] Registry-Pattern for lib/div?

Joerg Schoppet joerg at schoppet.de
Tue Aug 14 09:08:14 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I work with TYPO3 since version 3.5 and have actually created two
frameworks for my own extensions to include the MVC-approach in my
development process.

Now I want to migrate completely to lib/div, because I see the benefits
of a community-driven framework, which have the possibility to change
the way extensions are developed in a extrem positive way.

When I look into the sources of lib I see a lot of object-references
(-copies). I mean, the controller creates the different objects
(context, parameter, configuration) and "copies" itself to all of these.

I made this also in my first framework, but after a while I found it
annoying, think e.g. at a var_dump of a controller-object, which will be
unclear, because the dump of the controller-object is repeated again and
again.

Amongst other things I created a new framework, which included the
Registry-Pattern in such a way, that I can register objects and call
them from every place I need to.

I think such a technique can be usefull for the controller, too. As soon
as the controller is initialized it registers itself e.g.
(tx_registry::register('ctrl', $this);), after this, it can be called
from everywhere (tx_registry::retrieve('ctrl')->doControllerMethod();).


What do you think about this?

Regards

Joerg Schoppet
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGwVTeq5Me6rRDqPURAidoAJ0VqemPhYnyp5Wq8JjZKSnSf7/KpgCghzeL
yYE2VVkpDbXCPQGHYNQHmQY=
=B3Rz
-----END PGP SIGNATURE-----


More information about the TYPO3-team-extension-coordination mailing list