CakePHP Resources

As my friends find out that I work for Cake Development Corporation, they start asking me what resources I use in order to get my work done. Since I don’t have any essays to share, or tutorials for you this week, I’d thought I’d spend some time sharing some of my favorite resources.

The CakePHP Manual is the first place I go when I need to remember how to use some pretty basic, non-advanced functionality. For all the pissing and moaning about the lack of documentation for 1.2.x, the manual is still a great resource. When will the documentation be ready? When it’s ready!

When the manual isn’t enough, I venture down into the bowels of the code and visit the online API so I can see if a particular class / component / whatever has a method I think it has and what parameters it can accept. As awesome as the API is, I think it would be very helpfull if there were examples of using a method right in the API. Next time I add something into the core I will be sure to include an example right there in my docblock

However, nothing beats actually having examples on how to do something with CakePHP. Once I found out about the Bakery, it was like I had found a chest up in an attic with all sorts of cool stuff inside it. Lots of examples, and when you’re an insider like I am (heh) you can even see articles that hasn’t been published yet. If you are looking for specific examples of doing stuff in both 1.1.x and 1.2.x then your first stop should be the Bakery.

I am on the CakePHP mailing list, where I have earned my nickname ‘GrumpyCanuck’ that I use on various IRC channels on freenode. Getting help via the mailing list and IRC comes with some baggage though. Do your research before you ask, or else you will be either flamed or outright ignored. Nobody wants that, they want answers to their questions, right? I may come across as grumpy on the list but when you show you’ve put the work into trying to find an answer you will be surprised how quickly people rush to help.

Then I start using Google itself, finding interesting information all over the web. There are very few CakePHP blogs that I go to all the time (I read a lot of aggregating feeds, so that does the work for me) but the one I find myself constantly coming back to is Felix Geisendörfer’s ThinkingPHP And Beyond. Tons of code exampes and excellent commentary. Almost as good as this blog (hah!)

But of course, I’m super spoiled because I have direct access to many of the core developers of CakePHP, such as Larry Masters (PhpNut), Garrett Woodworth (gwoo) and Nate Abele (_nate_). Without being able to talk to those guys via IM or on IRC, so many of my problems learning how CakePHP works at more than a basic level would not have been solved. So, it never hurts to suck-up to / cultivate relationships with some of the more senior members of the CakePHP community. They are usually more than glad to help you out when you have questions and can speak to them directly.

So, as baseball season starts to head towards a finish (between my long-running simulation baseball league, coaching girls baseball and playing men’s 35+ slow-pitch) I will finally have some time to give back to CakePHP. There are some tickets in CakePHP’s trac site with my name on them that I need to get to and hack away at them, along with adding functionality to my CLI console for testing things. Also, rumours of a CakeFest conference for later this year have me motivated to get a bunch of stuff done so I have something to give some talks about.

So, if you have any other resources you like to use for CakePHP, feel free to put them in the comments and if we get enough of them I will do a follow-up post.

9 Responses to this post.

  1. Daniel Hofstetter's Gravatar

    Posted by Daniel Hofstetter on 17.08.07 at 4:30 pm

    I have compiled a resources page on my blog: http://cakebaker.42dh.com/cakephp-resources

  2. Richard@Home's Gravatar

    Posted by Richard@Home on 17.08.07 at 4:30 pm

    “As awesome as the API is, I think it would be very helpfull if there were examples of using a method right in the API.”

    I think this this is more than helpful, this is critical! Real developers don’t read docs, they read code ;-)

    “Next time I add something into the core I will be sure to include an example right there in my docblock”

    +10 good guy points :-)

  3. Daniel Hofstetter's Gravatar

    Posted by Daniel Hofstetter on 17.08.07 at 4:30 pm

    I disagree with you, Richard (and Chris). What’s needed are tests, not examples in the API doc nobody maintains. With tests you have examples plus you guarantee a certain functionality.

  4. Markus Henke's Gravatar

    Posted by Markus Henke on 17.08.07 at 4:30 pm

    It was often the case that I had a problem to which I already read something on the mailing list. So I switched over to read nearly everything on the list just to learn how to use Cake. :-)

  5. Oli's Gravatar

    Posted by Oli on 17.08.07 at 4:30 pm

  6. Chris Hartjes's Gravatar

    Posted by Chris Hartjes on 17.08.07 at 4:30 pm

    @Daniel: We can agree to disagree on this idea as well. Why is the API doc not maintained? Shouldn’t the goal be to reduce the number of places you need to look in order to find information about a particular function? I agree that tests are a good place to look, but if I remember correctly the Ruby API (which is the best online API I’ve every seen) has examples of how to use every function. One place to look is better than two.

  7. Baz L's Gravatar

    Posted by Baz L on 17.08.07 at 4:30 pm

    @Richard:
    I guess that’s my problem then. I’m not a real developer. I’ve been messing with PHP for a few years, but nothing on this level.

    I’m just a guy that needs to get some things done in a limited amount of time. Usually it’s nothing fancy. This is why I thought that CakePHP would help me. I mean, I know you can do amazing stuff with Cake, but I’m not at that level yet. I thought that it was the lazy man’s framework, guess I was wrong.

    But it’s all good. I love what you guys are doing.

    Oh and Chris, you are a bit grumpy, but I’m a lot lazy, so I guess everything balances off. :D

    Baz L

  8. Aitch's Gravatar

    Posted by Aitch on 17.08.07 at 4:30 pm

    Biggest productivity gain I use is the cakephp group search plugin in the firefox tool bar, I use that every 15 minutes probably!

    I only use the group directly very occasionally, i certainly at best skim the headers, but when workload reduces i would hope to contribute more answers

    In rough order of preference:

    1. group search via firefox plugin
    2. my 4-A4 sheets per page, duplexed printout of the manual, stapled and dog eared!
    3. increasingly the “pages: frequent discussions” on the google groups homepage for cakephp
    4. online API - i find myself using this more and more now, especially for bleeding edge 1.2 features. the link to function code is so useful

  9. Chuck's Gravatar

    Posted by Chuck on 17.08.07 at 4:30 pm

    This is a good discussion via comments I mean!

    One of the fundamental reasons why PHP has become so popular IMHO, is PHP’s online documentation and the user comments which often include code and further explanations.

    No offense, but you might at well dig through the code rather than reading Cake’s API doc’s.

Respond to this post

Want to advertise on this blog? Send email to chartjes@littlehart.net
GTcars Canadian Car Audio TurboDodge Car For Sale Sign
Audi Forum Mustang Forum Dodge Intrepid Miata Turbo
GTscene Pontiac Bonneville


@TheKeyboard is Digg proof thanks to caching by WP Super Cache!