Posts

Showing posts with the label php

PHP Frameworks

I have recently been looking at the PHP Framework CodeIgniter, and am quite impressed at its lightweight approach to providing an MVC framework for building PHP applications on. I haven't had as much time I would like to build anything meaningful with it, but on initial inspection, and every time I pick it up to look at, I am suitably impressed that I would be keen to develop something meaningful with it. Other frameworks do exist, such as Zend, Yii, CakePHP and Symfony.  But none of these are screaming out at me with the simplicity and admiration that CodeIgniter has done quickly from the offset.

$_REQUEST - Lazy?

I have read conflicting view points on whether the use of $_REQUEST in your code is good or bad. But, what is $_REQUEST, and how do I (ab)use it? - $_REQUEST, is an array of data, similar to form submission data $_POST and $_GET, which merges, $_GET, $_POST and $_COOKIE arrays into one 'easy to reference' array. Until around 3 years ago, I had never used $_REQUEST, and solely used $_POST and $_GET to fetch my URL parameters and form variables.  This was mainly due to the fact I was working on smaller scale projects, and was fully aware of the state of all the pages I was coding.  However, since beginning to work on larger projects, and utilise code written by other developers, I come across the $_REQUEST variable more and more.  Now I am not saying I am perfect, and I must admit I have been pulled to the dark side a bit and do use $_REQUEST overly much, but every time I do, I always look back on my code, and think - I should've taken the time to do this properly. Sho...