View Single Post
  #1 (permalink)  
Old 04-14-2007, 01:14 PM
BobiKK BobiKK is offline
Junior Member
 
Join Date: Apr 2007
Location: Duisburg, Germany
Posts: 3
Default Site layout, modular structure

First I want to let you know beforehand that I'm not well familiar with MVC-concept and have difficulties with OOP. Nevertheless I want to make a modular and extensible site on top of ZF. That's why I'm asking you to tell me, whether I'm moving in the right direction.

In bootstrap I parse .ini to find out which modules are active and form a list with the names of these modules. Each module is an independent component with it's controller, model and view (navigation menu, 'who's online', links etc.). Then i set the controller name with the first entry in my list. In every post dispatch event in a front controller plugin I forward the request to the next entry in the list. And finally when the list is empty I call the original request.
Each module passes it's rendered output to common buffer which is divided into logical sections ( $buffer->append('header', $view->render('template.tpl.php')) ). When all request are handled, the buffer is appended to response object.

I'm not sure that's a good solution, but i have no idea how to make it otherwise.

P.S. Sorry for my english
Reply With Quote