MVC Love

I started using frameworks about four years ago upon being introduced to Spring in a Java shop. At first it felt like that ill fitting pair of pants. What it did though was change how I looked at my PHP development. I built the content system behind this web site using the CodeIgniter framework. As a home grown solution, it does not have all the bells and whistles that larger content systems offer. I kind of like that. With my goal of writing more posts however I saw that I needed to add a hyperlink to the blog posts titles and call a new get by post id method.

No problem because here is where frameworks, let alone OOP, shine. All I had to do was take a quick look at my get by tag controller and model methods. Since I am using a view structure with a main page view and a by area of site content view all I had to do was add the post id to the controller passing the blog content. Then add a link tag around the blog header to the new get by post id method. In less than 13 minutes I had the links on my page. With testing 25 minutes.

Posted in php

Leave a Reply

Your email address will not be published. Required fields are marked *

*