Useful CakePHP Tutorial Roundup for June 26, 2009

26 Jun
2009

I read a lot about CakePHP almost every day at work, since I’m writing a CMS that will become the standard for most of our new sites. I’m constantly coming across useful tips, code, and tutorials that save me a lot of time. So I thought it might be useful to others to gather up some tutorials every Friday and just get them out there. Some are new; some are old chestnuts. I’ll try to post at least 5 each week.

Here’s what I found useful this week:

  • Better Error Handling with CakePHP – Aidan Lister (April 6, 2009)
    I’ve been planning a more useful error handling system, and Aidan’s method is probably the one I’ll employ now. He tackles the “all or nothing” approach to error handling that CakePHP uses by default: every error in development mode, no error in production mode. Aidan creates a de facto ’0.5′ debug mode, allowing errors to be logged (and administrators to be notified) while still displaying user-friendly messages.
  • Creating a community in five minutes with CakePHP – Aidan Lister (May 1, 2009)
    Yup, Aidan again. He’s good. This article is a good rundown of how to implement a simple, yet robust, user login system. Although I’ve already written my login system, I was able to take a few tidbits from Aidan’s article and strengthen my own implementation. I highly recommend this article for anyone who thinks that authenticating users with CakePHP’s Auth system is a bit intimidating (and it is, since it’s so poorly documented). Aidan runs through confirming passwords, setting last login dates, and a password retrieval system, among other things.
  • CakePHP Auth Component – Users, Groups & Permissions Revisited – Studio Canaria (June 6, 2008)
    An interesting and effective implementation of CakePHP’s Auth component that stays away from ACL, which, while powerful, is far too complex for the needs of many (most?) small-to-mid size websites. Peter’s solution allows for a good degree of flexibility – you can set permissions for individual actions as well as entire controllers – without the sharp learning curve that comes with ACL.
  • CakePHP Sequence Behavior – Neil Crookes (February 9, 2009)
    Like so many other features, I was researching the best way to handle re-ordering of records via a CMS (e.g. so a user can change the order of photos in a gallery) when I chanced upon Neil’s handy little model behavior. His implementation is pretty smart in that it only executes database queries when it absolutely needs to, rather than just updating every record in a group when any order is changed. Throw in some JQuery AJAX drag and drop that Neil also provides – I’ve been a Prototype/Scriptaculous guy for a long time, but this is easy as pie! – and you’ve got a great re-ordering system in no time.
  • Super Awesome Advanced CakePHP Tips – Matt Curry (May 13, 2009)
    A free e-book with pages upon pages of useful CakePHP tidbits. Matt doesn’t mince words and gets right to the nitty gritty, which, if you’re a developer on a timeline like I am, is a good thing. The book covers a wide array of subjects and has more than a few “why didn’t I think of that?!?” moments – merging add and edit functions is a prime example. It looks like he’s added to the book since I downloaded it, which means that it’s in continued development, which is also great.

1 Response to Useful CakePHP Tutorial Roundup for June 26, 2009

Avatar

CakePHP Digest #17 – Non-CakeFest Edition | PseudoCoder.com

July 13th, 2009 at 7:06 pm

[...] Nay has a a couple roundups on useful CakePHP tutorials (here and here). He’s trying to post at least 5 links every week, so check it [...]

Comment Form

top