Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-20-2008, 12:40 AM
Junior Member
 
Join Date: Jun 2008
Posts: 1
Default Opinions Wanted: Routing Within Controllers

I am attempting to create an extremely modular cms with zend framework. The goal is to be able to drop modules such as "blog" or "shop" into the modules directory and have them full integrated into the website with no configuration in the rest of the application. In order for this to happen, each module contains its own config files and MVC structure.

I am running into a bit of trouble with routing, though. I do not want to load _all_ module configs on every http request, so I only want to load the config for the particular module I'm attempting to access. I obviously can't just include routing info in each module's config because I can't access that config until I figure out what module I'm suppose to be loading.

The only thing I can come up with is having all modules have a standard routing scheme ("/blog" goes to blog/index/index, "/shop" goes to shop/index/index) and then having the indexAction of the IndexController of each module handling the "routing" within that particular module. It would basically utilize the forward method to direct the request to a different action depending on the URL. This allows for "perfect" modularity, but it basically ignores a large portion of the Zend MVC architecture (routing).

What do you guys think? Is this the only really optimal solution I've got? Is this efficient? Any other suggestions?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:05 AM.