Hi All,

The concern I have is related rather programming style than the
framework itself. On the other hand, I'm not a programmer, I'm just
spending my time writing programs in different languages.

I want to display a menubar where a menu belongs to a category. I have
a menu table and a category table, both has its Model. So, in the
controller I fetch the data from both table and I have to merge them
into an array. I can do it in the controller, in the view .phtml file
and in an external library like class.

So, what is the proper solution if I follow the design patterns thinking?
- manipulating data in the controller class which can cause big, huge
methods and on the other hand, reusing the code is not possible
- manipulating in the view file. To be honest, I feel it very
uncomfortable because the data should be manipulated somewhere else,
manipulating is not part of the displaying
- manipulating in a library class, where the logic clearly separated
from the controller and the view and possible to reuse easily.

I appreciate any help and suggestion!

András

-- 
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  ""Trust in God and keep your gunpowder dry!" - Cromwell

--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to