Building a MVC Framework - An Introduction
As promised, we'll take a complete tour through the process of building a bare bones MVC framework in PHP. The goal of this series of articles is to explain MVC principles and design patterns in a useful way. This information is aimed at PHP programmers who are familiar with object oriented PHP, and have heard of, or poked around frameworks, MVC basics, and other design patterns, but are unsure how it all ties together. With all that out of the way, let's start with examining the concepts we'll cover.
Design patterns we'll cover in this introduction:
Why should I use a framework?
A lot of up and coming PHP developers are intimidated by the size of frameworks. Used to coding small applications that provided some base functionality, they may not understand the benefits a framework can provide to their larger, more ambitious projects.
I definitely wouldn't recommend always using a framework. One of PHP's strengths (or weaknesses, depending on who you ask) is its ability to get things done quickly. It's an excellent language for quick prototyping of concepts, and it'd be foolish to suggest that you need the overhead of a framework to release the next great "Hello World" application.
However, once you've been coding more and more projects, it's not uncommon to realize a lot of the code you write is remarkably similar to previous projects. This is the point in which many developers start hoarding a small library of common functions they may use over and over. Often they are tools designed to handle things like validation (Is this email address / website URL legitimate?), pagination (Oh right, I want 10 entries per page...), or even database access (If I create a function that uses mysql_query() and mysql_fetch_object() I won't have to write so many lines each query!).
A framework, then, is really just doing that on a larger scale. If you've been following other technologies the past few years, you'll immediately recall what the power of frameworks can do. Take Ruby for example, a neat little language that languished, largely unnoticed for years, being the playground of a select few enthusiasts. Once the Ruby on Rails framework was released, an explosion of interest propelled Ruby to it's current stature as a fully functional web development alternative.
Ok, what's MVC then?

