Implementing the Front Controller Pattern in Lighttpd

One of the more common design patterns in installable web applications today is the Front Controller pattern. Unlike other web applications that have separate files to respond to specific requests, the front controller pattern funnels all requests through a single file, and that file processes the requested URL to respond as appropriate.

In typical scenarios, you'll accomplish this with Apache using a set of mod_rewrite directives. These directives first check to see if the requested file or directory exists. If it does not exist, then the request is passed on to the front controller. This allows requests for existing files - like images, stylesheets, and client-side scripts - to be requested directly rather than passing through the URL rewriting mechanism.

If you are familiar with implementing a front controller using Apache, you will recognize these directives, which are commonly found in an .htaccess file within the application directory:...

more

Rebuilt. Again.

I'm taking on some more server-management related responsibilities for work, and I'm trying to be a little proactive with getting things under control so that I still have time to code. One thing that I would like to do is have a server configuration that we can standardize on so that when something goes wrong on a server we have many benefits.

The advantages of having a pre-configured system are that we'll have a way to set up a server again quickly that we know will work with the software we already have on the system. If something goes wrong with one of them that is related to the system settings, we'll know what we need to fix on all of the servers to make them right, not guess at whether the fix needs to be applied to each.

The process of standardizing allows us to pick the tools that we want to be on the system without having to rely on them being provided by a host. This gets particularly hairy when we try to build tools on a hosted environment and we're not sure what other tools might be on the system that could be affected or affect the tool we're trying to build. There are too many questions....

more
Page:  1