News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPit.net:
Building a simple MVC system with PHP5
August 22, 2006 @ 07:08:54

On PHPit.net today, there's a new tutorial that focuses on one of the hot topics floating around the PHP community these days - the Model/View/Controller design pattern. It shows you how to create your own complete system in a PHP5 environment.

In this tutorial I'm going to show you how to build a simple Model-View-Controller system, which is the most common design pattern for big web applications. I'll take you through all the steps necessary to start from scratch to a full-blown MVC system.

The tutorial starts with creating the "one point of entry" (to the main controller) before setting up the startup tasks and a Registry class to help pass data around between objects. They include plenty of code examples on how to use it.

Next up is the creation of the model, a hook into the backend database (in this case, a MySQL one). The Router class is created to handle getting things to the right places, and an example controller is constructed to handle those requests.

Finally, the last step in the puzzle - the view, including some security measures and the link to download the complete code for the entire MVC system they've created.

0 comments voice your opinion now!
model view controller simple tutorial php5 model view controller simple tutorial php5


blog comments powered by Disqus

Similar Posts

Christian Wenz's Blog: Zeev on PHP

Jared White's Blog: Developer Preview 2 of Willowgarden has been released today

PHPit.net: Building a simple MVC system with PHP5

HowTo Forge: Installing Lighttpd With PHP5 And MySQL Support On Mandriva 2008.0

NETTUTS.com: How to Paginate Data with PHP


Community Events





Don't see your event here?
Let us know!


introduction opinion interview bugfix laravel install deployment release podcast symfony series package list library voicesoftheelephpant language api framework community tips

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework