Next Series of Articles

I've started putting together the code that will form the basis for my next set of articles for .Net magazine. The articles will focus on exploring the MVC pattern and will ultimately lead to the creation of a calendar application (because the world needs more of these)

One of the early design choices is to decide how the controller will be implemented. Coming from a Java background, it would natural to try and apply the pattern I've seen in WebWork and the J2EE spec, where certain URLs are handled by a central dispatcher which delegates to specific actions, the results of which are forwarded to the expected view (the Front Controller pattern) However, PHP applications are normally coded with a series of individual pages interacting with the model (the Page Controller pattern)

For the sake of providing a clearer demonstration of how a controller works, I might well end up plumping for a basic front controller based framework. Things are made slightly easier by Apache's content negotiation facilities (especially MultiViews) which provide a simple mechanism to route non-existant file requests to a central handler. For the sake of completeness, I should also probably add a handler for when MultiViews aren't available or activated (such as when the user insists on using IIS)

This should be interesting. For me, at least. I'll try and develop it using a TDD approach and see how far I get today.


Simon Stewart on Wednesday, 24 March, 2004

Posted in: /tech/php

You may comment...


Categories