php - Is the front controller responsible for deciding which controllers/modules to load? -


I am working on a website script, and currently I have a front controller, which determines that What to load (for example, module / extension and controller) depending on the URI. Is this a good way? I'm using PHP if it matters, I'm just thinking that it's not the front controller's work ...

method I actually included two controllers.

There is a front controller that controls the initial arrival of the request. Then the page controller is specific to the current page (depending on the URI). The front controller handles the correct page controller loading.

The page controller's work model (for DB access) and other sections to create data for page views.

I would say that Front Controller should never do anything that is specific to the URI, and should be as normal as possible so that it can be effectively used again.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -