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
As most people know TextMate is a pretty amazing text editor, probably one of the best for MacOS. What you may not know is that CakePHP has its own textmate bundle. this bundle is maintained by Joël Perras who is also a recent addition to the CakePHP core team.
This is a quick trick I learned from master baker gwoo. If by chance you have multiple projects, and those projects share multiple plugins. You are in a bit of a pickle.
So much like the last one , this article is going to focus on a piece of the javascript language that I had trouble understanding, and may be a point of confusion for you. Today I’ll be looking at closures and lexical scoping. Last time, I mentioned that Javascript has more in common with functional languages, than classical languages.
The release of the new API at http://api.cakephp.org wasn’t quite as smooth as I would have liked it. However, since the initial release things have constantly been improving. The search is now much more effective, and global functions are now in the index. So things are looking better each day. I hope to answer a few questions surrounding ApiGenerator today.
My current work at CakeDC allows me to be on IRC a lot – like all day. And while I’m often quite silent during the day, I do scan through a few PHP related channels and I’ve noticed a trend of PHP developers who just don’t get Javascript. Either they don’t have the experience, or they do have experience and think its icky.
Well its been a while coming but today, DebugKit officially left GitHub. As noted in the past by some, the CakePHP family of projects were a bit scattered. So in an effort to consolidate everything, DebugKit has moved over to thechaw alongside other fabulous CakePHP projects like CakeBook and ApiGenerator.
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.
I recently wrote an article about testing CakePHP controllers the hard way where I covered testing controllers by running their methods manually. I hinted at some additional tricks that could be performed by using Mock Objects. Today I’m going to spill the beans on Mocks, and how I use them when testing my Controllers.
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.
Creating meaningful semantic HTML identifiers is something I always aim to do in my markup. I also thought this was something that other designers did as well. This past week I’ve found out just how wrong I was in that assumption.
Well another year has begun, and often this is the time that people mull over the past and make plans for the future. Well this post will be no different.
Looking to the past
Personally, my wife and I decided that it was high time we abandon the renter’s life and make a concerted effort to tighten the belts and try to purchase a place. We did so in september, and I’ve never been happier.
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.
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.
I’ve been working hard over the last few weeks to improve the DebugKit and have added what I think are some pretty cool features. First up is FireCake
. FireCake
is a fully functional FirePHP library built specifically with CakePHP in mind.
I’ve uploaded the slides from the talks I gave at CakeFest Argentina. Both unit test talks are one file, as that is how it was originally written. You can find them in my Downloads area. Hope you enjoy.
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.
Cakefest 2 Argentina is quickly approaching. If you are sitting on the fence on going until the last minute then get off and come on down. Its going to be a good time with lots of great talks. I’ll even be there! I’m giving two talks one on Unit Testing and the other on plugin development. Hope to see you there.
To find out more about Cakefest follow the link.
If you’ve ever tried to subclass a PHP4 static class you may have come to same conclusion that I have its a total pain in the neck. However, I think I’ve come up with a not too terrible approach.
Often times you will need to query a distant table based on a condition on a close table. For example we have a store that has a table structure like the following:
Now we want to find the Division that a particular Item belongs to. In normal SQL we could do