Hi,
Today i would say i started to use agavi really. I created some
different Modules and Actions. In doing so i recognized that I create a
lot of files, which makes the maintaince quite difficult. By itself
its build up very logical like, every action has an corresponding view
and template:
IndexAction.class.php
IndexSuccessView.pho
IndexSuccess.php
But if you have like 3 Modules echo with 4 Actions, its about 36 Files.
In my I it seems to be to much.
I though a little bit over this problem and found the conclusion that
it would be nice to have one controller respectively action which manage all
the controlling stuff.
I.e: MainAction.class.php which could look like this:
public function execute() {
$oModel = new $sAction . $sModule . "Data";
$aValues = $oModel->execute();
$this->getContext->getRequest()->setAttribute('aValues',
$aValues);
return View::$sView;
}
I have that feeling that this certainly could be realizable with agavi,
but I could't figure it out how to do this...
The Params of the URL decide which action will be called. And here I
have to turn around it to a central Controller/Action where I
could manage the contronlling of my models and views.
In my Eyes this would minimize the amount of files at least about 9
files - it's an beginning :)
How do you manage this?
Perhaps has my aproach as well some failures that I didn't recogize,
but with the actual situation with one Controller for each action i'am
not relly happy.
Any alternative ideas?
Regards Erik
--
J. Erik Heinz
Keyboard-samuraing in process
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev