How using requestAction increased performance on my site

So originally when I built this site, I was in the “requestAction is bad” camp. So much so that I created a convoluted Component to assist in the creation of the sideboxes featured on this site. A sample of that code is as follows:

Show Plain Text
  1. //Recent Posts
  2. $options = array(
  3.     'position' => 5,
  4.     'type' => 'list',
  5.     'format' => array(
  6.         'title' => '{n}.Node.

5 signals that can indicate its time to re-factor

Re-factoring code is a part of any programmers life or should be. Very few people write beautifully clean and well factored code from the start, and I am certainly not one of them. Most times my code starts out a sprawling tangle that takes an additional pass or two to look like something I would consider clean. I find that when programming and designing I start with a rough idea or sketch of what I want to accomplish.

Using the PHP Reflection API for fun and profit

When PHP got a real object oriented system in 5.0, it also got a neat feature taken from Java land. Reflection allows you to introspect & reverse engineer functions, classes, and extensions. In addition you can use reflection to extraction of documentation from classes and functions. In PHP Reflection is done using a number of Reflection classes.

Year one of baking CakePHP

Today is the one year anniversary of my first commit to CakePHP, amazing how time flies. It seems not too long ago that gwoo and nate approached me to join the core team and help with writing the tests for 1.2. What started with test cases soon bloomed into full blown commit access and had me working on all parts of the core. Year one also saw the creation of DebugKit which is nearing its 1.

Calculating Documentation Coverage with ApiGenerator

Generating code coverage for test cases is a handy feature, it gives you a quick and easy way to determine how much of your code is running during your tests. It doesn’t ensure that the tests are good or that you have enough assertions, but code that doesn’t run definitely has not been tested. Before code coverage was created it was very difficult to determine how much code was being run.

Creating Deployment ready Javascript with Sprockets

If you’ve ever worked on a medium to large Ajax application, you know the headaches that Javascript can give you. On one hand you want to serve as few as possible Javascript files to users, but on the other you want to keep your sanity and work with lots of smaller files. This is where a build process comes in. It allows you to transform lots of files into one big file! You can even minify the big file for additional savings.

Generating vCards with CakePHP using extensions

vCards are a nice added touch for an application that acts as a Address book, or contact management. vCards are easily used by most mail clients, and are a plain text standard making them nice and easy to implement. While hCard and other microformats are gaining popularity, the widespread support still doesn’t exist. Leaving vCard as the primary format to transfer contact information out of a web application