↓ Skip to main content

Layout

Extending the V in MVC - revisited

This post is an re­vised ver­sion of ‘Ex­tend­ing the V in MVC on the web’ of Novem­ber 9, 2008. When I first star­ted work­ing with the MVC method it was with my own frame­work. After no­ti­cing that main­tain­ing my own frame­work would be very time-comsuming I em­barked on the search for a free, fast and widely sup­por­ted PHP web frame­work. The one I found that time was ‘CodeIgniter’. After work­ing on dif­fer­ent pro­jects I no­ticed that most web­sites present the same data to the vis­itor in sev­eral dif­fer­ent formats. Think of RSS/Atom for blog posts for use in an RSS reader to­gether with the (x)html ver­sions. While es­sen­tially provid­ing the same data to the vis­itor the pro­gram­mer of the web­site has to put siz­able amount of work to add little ex­tra func­tion­al­ity in the form of an RSS feed. Re­peat­ing a lod of code for in­put val­id­a­tion, data re­trieval from the data­base and cre­at­ing ex­tra routes into the ap­plic­a­tion. As you can ima­gine this could grow into a te­di­ous job. I’ll be de­scrib­ing tech­niques known and in use today, but re­in­ven­ted each time again as a (new) de­veloper starts work­ing on an web ap­plic­a­tion. Here we’ll be giv­ing them name and be de­scrib­ing them.