[TYPO3-ect] Controller for Typo3

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Thu Mar 23 22:34:50 CET 2006


Michael Scharkow schrieb:
> Hi you both ;)
> 
> Elmar, you're already working on too many issues simultaneously, like
> models or different view methods. Why not concentrate on a reliable
> controller that
> 

I am neither working on models, nor I am working view methods. I am
precisly working on a flexible but fully standardized interface
between them.

This interface has already been defined by Marcus Boerger:

http://www.php.net/~helly/php/ext/spl/classRecursiveIteratorIterator.html

( In fact I am thinking of a simple list of such
RecursiveIteratorIterators.)


* It is a PHP standard.

* It has an builtin interface for foreach-loops.

* It can transport more complex data then a simple result set, just a
tree of sets (comparable to xml structure)

* Such a tree of sets can result from join queries. It represents
still a single result complex, reorganized by relations between the
objects. Multiple results can return more than one of this objecttrees.

* If to complex for beginners or simple applications, then just use a
single object like any resultset.

> a) is easy to deploy and extend (by using hooks for actions and
> "controller recursion")

I currently have no idea about hooks in controllers. I guess you have,
so this is yours.

> b) uses a class naming and autoloading scheme so we get rid of require
> and include crap.

It has. For the longterm vision of loadable pathes see the postings of
Peter and me from yesterday. It's PEAR.

> c) works in BE and FE

Read my post about "Inversion of control" for the BE from yesterday
specially for you. I think we need a container first.

http://www.martinfowler.com/articles/injection.html


> 
> That is easy simple enough but needs to be done before we think about
> views (I'd like a smarty view though ;)) and models.
> 
> Two questions still:
> 1. Joerg, where is your code?

I have already seen it. :-)

> 2. Elmar, what's the difference between front and action controllers?

The Zend style answer to "controller recursion"? See the mentiond
article.

[1] http://framework.zend.com/
[2] http://phparch.org/zftut

* The action controller dispatatches the action parameter to action
functions in the same class.

* The front controller dispatches an additional controller parameter
to action controller classes.

It's a meta level for bigger projects. You can add new actions by
placing in an additional action controller classes. No need to inherit
or touch the existing class.

> Why bother with PHP4?

I still have customers that run on php4 and I can't forsee when they
will upgrade. A lot of people think "Never change a runnig system".

So I still need to build PHP5 "stylish" PHP4 extensions.

> 
> Greetings,
> Michael
> 
> Greetings,
> Michael

Regards

Elmar





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