Problem with MVC architecture

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
jakubfox
Forum Newbie
Posts: 1
Joined: Tue Aug 12, 2008 8:23 am

Problem with MVC architecture

Post by jakubfox »

Hi everyone,

I've just started with MVC model and I'm tryin to create simple administrative application. I have following question: how architecture of page with 3 - level menu should look like?

Let say that structure of menu looks like this:
1 menu: configuration | page administration (chosen) |
2 menu: news | products (chosen) | articles
3 menu: add | list

It may sound silly, but this is the essence of my problem.
Choosing from third level menu causes displaying proper view. ex. choosing "add" causes displaying view with proper form. So as far as I'm concerned it should be controller "products" and his method "add_form" displaying view "product_add". But what to do before that third menu is clicked?

If somebody experienced could tell me how architecture of such system should look like I would be thankfull.
(I'm implementing my application in CodeIgniter)

Thanks for your time!
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Problem with MVC architecture

Post by Christopher »

I am not sure exactly what the question is, nor what a 3-level menu exactly is. Is this global navigation? If so you don't know what is being displayed before they make the choice you specify.
(#10850)
Post Reply