[TYPO3-ect] my first view on lib / div
Daniel Pötzinger
operation-lan at gmx.de
Thu Sep 27 12:43:13 CEST 2007
Hello
At first thanks for the nice concepts and the work you put in!
I have some comments / questions and ideas:
1) use of subfolders in lib: Why not grouping the classes in folders
like view / controller / model / lib ?
( Later add classes like widgets / data / ...)
2) Use of functions castArray / toObjectOfObjects etc. in list views.
As I see in the examples (bananas) the view is finally some nested view
object of views - is it? Instead of using this transformations functions
(which needs some time to understand in my opinion) I would like to set
the model directly to the view - e.g.:
$view->setResultObj($model);
--
in the view itself you can access all properties of the model like:
$this->resultObj->getCount();
And if it is a typical listview the model itself has the iterator and
delivers for example listitem model objects: e.g.:
$currentListitemModelObj=$this->resultObj->current();
Hope this was understandable. In my opinion having the model Object
directly known in the view is more clear to understand. What do you think?
3) At first i liked the idea of the processors, but after playing around
I think there are some disadvantages:
- Each processor needs some class variables where they read and write.
In my opinion this increases the dependencies beetween the classes and
needs more time to understand.
- I was very interested in TYPO3 5.0. There they solve such things by
having predefined widgets. (A widget itselft contains own MVC). This way
it would be possible to have a resultbrowser by (for example):
$resultWidget=$this->makeInstance('resultBrowserWidget',$this);
$resultWidget->setCount(..);
$view->setResultBrowser($resultWidget->render());
see:
http://5-0.dev.typo3.org/svn/TYPO3/Packages/PhoneBookTutorial/Classes/Controller/T3_PhoneBookTutorial_Controller_WidgetBasedController.php
More information about the TYPO3-team-extension-coordination
mailing list