Tagged with CakePHP

Cake PHP framework

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.

New features brewing for DebugKit 1.1

So I’ve been working away on DebugKit the last few weeks. And I think its at a level where I can suggest other people give it a whirl. Its not at a stable release point. But if you are feeling adventurous and don’t mind using beta code give it a try. There are a few notable features have been added, so in no particular order here they are.

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

The new face of CakePHP's API

If you’ve been to the http://api.cakephp.org today you may have noticed a few changes. First its no longer powered by doxygen. Doxygen has been giving us a few headaches in the last few months. So gwoo and myself have taken it upon ourselves to write our own Api generation tool. We called it ApiGenerator you can see it running at api.cakephp.org.

Paginating long lists in the CakePHP Console

I’ve recently been doing some work on some CLI tools, and I came across the need to “paginate” a long list of file. Instead of dumping out 40+ items to the screen all at once, which would be confusing and hard to read, I wanted a more elegant way of showing only a section on the huge list at once.

CakePHP RC4 released

Earlier this evening the last 300 changes to CakePHP were merged into the trunk forming CakePHP RC4. It should be a painless update for all, and it brings us one step closer to a final stable release of 1.2, something we all look forward to.

Testing CakePHP Controllers the hard way

By now you already know or should know about CakeTestCase::testAction() and the wondrous things it can do. However, testAction has a few shortcomings. It can’t handle redirects, it doesn’t let you use the power of Mocks, and its impossible to make assertions on object state changes. Sometimes you need to do things the hard way, stick your fingers in the mud and work it out.

CakeFest Argentina after thoughts.

Well I’m finally back in Canada after a somewhat hairy experience at JFK airport in New York, I’m home in the great white north. I had an awesome time at CakeFest and would like to thank all the sponsors and all the people who came out. It was a really great experience for me, and a pleasure to finally be able to put faces to the names and lines of text/code speak to / read each day.