Question:
What is Page Controller? What is Front Controller? From what I read, page controller means a controller that is embedded in the html/jsf facelet page.
However in Front Controller the controller and the view are separate. (I know how the laravel MVC works, if you could give an example with laravel, possibly you would understand the patterns better)
I read Martin Fowler's definition, however as the level of abstraction is very large I have a lot of difficulty in understanding…
Answer:
MVC
is a general pattern. The idea is to separate three aspects (Modelo, Visão e Controle)
of an application from each other. Now, this idea can be realized in different ways according to the details of a situation/application. One way is to have many controllers, each responding to an action or a set of actions. Another way is to have a main controller that receives all the actions and then dispatches them to different controladores
, this is called Front Controller
. So the Front Controller
pattern is an MVC pattern . For example, in the Spring Framework
, laravel
uses the Front Controller
pattern to perform MVC
.