Alessandro Vermeulen Alessandro Vermeulen's blog about languages, programming, Computer Science and the Web.

12Jul/091

Extending the V in MVC – revisited

This post is an revised version of 'Extending the V in MVC on the web' of November 9, 2008.


When I first started working with the MVC method it was with my own framework. After noticing that maintaining my own framework would be very time-comsuming I embarked on the search for a free, fast and widely supported PHP web framework. The one I found that time was 'CodeIgniter'.

After working on different projects I noticed that most websites present the same data to the visitor in several different formats. Think of RSS/Atom for blog posts for use in an RSS reader together with the (x)html versions.

While essentially providing the same data to the visitor the programmer of the website has to put sizable amount of work to add little extra functionality in the form of an RSS feed. Repeating a lod of code for input validation, data retrieval from the database and creating extra routes into the application. As you can imagine this could grow into a tedious job.

I'll be describing techniques known and in use today, but reinvented each time again as a (new) developer starts working on an web application. Here we'll be giving them name and be describing them.

16Apr/097

Extending the V in MVC

A revised edition is available. There is now no more need to download the PDF.


Last year I wrote an article about extending some of the ideas in the View section of MVC. I propose to use Partials and to use Lay-outs. Lay-out is perhaps a term that should be better defined. I wrote this article after an implementation in CodeIgniter.

This article introduces the concept of Partials (small views that contain parts and are reusable) and the concept of Lay-outs, used for displaying the same information in different formats.

When I first started working with MVC it was with my own framework. After seeing that it would require to much time to maintain and develop my own framework I started the search for a free, fast and widely supported php web framework. I found this framework and it’s name is ‘CodeIgniter’. You can find it at www.codeigniter.com.

Download.