↓ Skip to main content

Writing

2009

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.

Adding COM(+) to your Delphi project

·1 min

If you’re strug­gling with your IDE to add an COM(+) ob­ject to your pro­ject you should look in the .drp file of your pro­ject. If you in­clude ‘ComServ’ in the uses list you should be fine. :) Now you’re able to add an COM(+) ob­ject to your pro­ject us­ing add->new.

Setting up CodeIgniter - Basics

·2 mins

In this post I’ll show how to set up CodeIgniter in a way that your code and con­fig­ur­a­tion (pass­words!) are safe. It will in­volve mov­ing the “sys­tem” and “ap­plic­a­tion” out­side the (pub­lic) doc­u­ment root. Seper­at­ing both <em>sys­tem</em>' and application’ has ob­vi­ous ad­vant­ages for main­tain­ance and for re­usib­il­ity. Us­ing a seper­ate `www’ dir­ect­ory en­ables you to pub­lish all your ap­plic­a­tion spe­cific JS/CSS and other pub­lic files.

Doctrine meets CodeIgniter

·1 min

Any­one who has made web­sites in the past has en­countered it. The end­less bug­ging typ­ing of SQL quer­ies, al­ways do­ing the same over and over again. This struggle is lightened by the use of frame­works or even com­plete CM-Systems. How­ever, SQL query writ­ing is still of­ten needed.

Extending the V in MVC

A re­vised edi­tion is avail­able. There is now no more need to down­load the PDF. Last year I wrote an art­icle about ex­tend­ing some of the ideas in the View sec­tion of MVC. I pro­pose to use Par­tials and to use Lay-outs. Lay-out is per­haps a term that should be bet­ter defined. I wrote this art­icle after an im­ple­ment­a­tion in CodeIgniter.