PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

VideoPHPBlog.com: Create your own MVC

Note: This article was originally published at PHPDeveloper on 8 July 2011.
PHPDeveloper

On VideoPHPBlog.com they've posted about a screencast getting you familiar with MVC and how to create a simple model/view/controller application in three parts.

Beautiful new screen cast from #JREAM about creating the base essentials of your own PHP MVC application. High quality and good speaker.

The tutorial starts with the basics - making a front controller, some simple routing and making a few controllers to handle the requests. With this base in place, he adds some handy features like default actions, bootstrapping, views (with some jQuery fuctionality), templating and adding models. The last part of the tutorial set includes setting up database connections, autoloading, session handling and user logins.

These are a great reference for anyone wanting to see first hand how an MVC application (framework) is structured. It doesn't follow some of the best practices it should, but it's a good example of how it all flows. Note: do not use the end result from these examples in production - there's lots of other frameworks for that.