Questions tagged [front-controller]

The Front Controller Pattern provides a centralized entry point for handling requests in web applications.

Front controllers are often used in web applications to implement workflows. While not strictly required, it is much easier to control navigation across a set of related pages (for instance, multiple pages might be used in an online purchase) from a front controller than it is to make the individual pages responsible for navigation.

144 questions
0
votes
2 answers

Simplify front controller route regex

I'm having a lot of trouble making one single regex of my own to match my needs. It's an application that I'm trying not to use a framework, except Doctrine, but in that case doesn't matter. I'm using Front Controller pattern and I mapping my…
Rafael Fontes
  • 1,195
  • 11
  • 19
0
votes
1 answer

PHP Front Controller Flow Confusion - Switch statement only tested once

I am new to php and confused on the flow of this. It seems to me that switch($action) would need to be evaluated more than once when the $action variable gets a new value. But I don't see the switch($action) being evaluated but just once. I used…
dman
  • 10,406
  • 18
  • 102
  • 201
0
votes
2 answers

Prestashop 1.5 Override FrontController

I'm trying to create an override for /classes/controller/FrontController.php. For testing purposes, I got the original method written like this: protected function canonicalRedirection($canonical_url = '') { die('Original method'); ... and…
Korpsa
  • 37
  • 2
  • 6
0
votes
2 answers

Nesting controllers with the Front Controller Pattern and MVC

I'm developing a web application in PHP using an MVC-approach (not using any framework, pure PHP). As is often the case with MVC, every request arrives at a front controller which routes it to the corresponding controller, and executes the requested…
user1440560
  • 163
  • 1
  • 7
0
votes
1 answer

Routing CSS and JS requests to front controller (Performance Measurement)

I have build a simple MVC library. There is a front controller. htaccess file sends all requests to front controller except images, js, and css. But I have a problem which is I want to build JS and CSS files with PHP. (Not every time though some…
tcak
  • 2,142
  • 1
  • 16
  • 23
0
votes
8 answers

Php site structure

I'm currently in the process of setting my website, largely with php. Though this is my first time using it so I'm running into some problems. I've got the basics of the site down. Registering, login-in, profile page e.t.c. However this is where I…
Chris Salij
  • 3,096
  • 5
  • 26
  • 43
0
votes
1 answer

Spring MVC with Front Controller

I'm developing a web server using MVC with multiActionController. However, now I want to handle any request (/*) with a Front Controller. After that, this Front Controller will forward this request to the View in ModelAndView. However, after many…
0
votes
0 answers

ZF - dynamically change default controller

I need to load different controller as the default one in case request comes from mobile device. I was trying to get front controller instance in plugin and set default there based on device detection but it doesn't work. Is there any way of…
Adam
  • 873
  • 7
  • 33
-1
votes
1 answer

How to tell which class handles a request in Java Server Faces?

I'm taking over a project which is based on Java Server Faces (project created circa 2009, so JSF 1.0?). I haven't worked out how JSF handles the front controller logic, i.e. how the Faces servlet determines which Java class to forward a GET or POST…
Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213
1 2 3
9
10