Useful CakePHP Tutorial Roundup for July 03, 2009

3 Jul
2009

Week #2 of my “this stuff is useful” roundup, right on schedule! I wonder how long I can keep this up. Anyway, 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:

  • CakePHP RSS Feed Datasource (June 19, 2009)
    The guys at Loadsys have released a nice datasource for RSS feeds that allows models to use RSS feeds as a source for data instead of a database. Great for displaying, say, the latest articles from an affiliate site or the day’s top news stories, especially since you treat the feed as a standalone model rather than as part of, for example, a controller component. Its only downfall, which is really the downfall of CakePHP datasources in general, is that you need to declare a separate config array for each feed in config/database.php. I would love to be able to point to an RSS feed dynamically, but…
  • Simple tweak for model relations in CakePHP (June 30, 2009)
    A simple little trick for deleteAll() that speeds up performance (big time!) when deleting multiple records. By default, deleteAll() deletes items one by one – use the trick in this tutorial (written by the guy(s) who develop NeutrinoCMS) and deleteAll() will delete the records with one query.
  • Cake 1.2′s Set class eats nested arrays for breakfast! (February 27, 2007)
    In the “oldie but goodie” category, CakePHP stalwart Felix Geisendörfer weighs in on the Set class, which was pretty new at the time the article was written. Felix shows a few tips on how to manipulate multidimensional arrays with the various functions provided by Set. The class is very powerful, but some of the more complex functions tend to trip up newer programmers. Some of the post’s comments are also pretty useful.
  • jQuery image upload & crop (March 9, 2009)
    Thomas (‘klagoggle’) has ported over a popular JQuery image cropping/manipulation tool to CakePHP, turning it into a component and helper. Anyone who’s used this JQuery tool knows that it’s really, really cool. And it’s even cooler to have a ready-made CakePHP version! I actually needed to put the same JQuery crop tool on a website for a client, and was dreading coding my own components/helpers – Thomas is a lifesaver.
  • Uploader (File Upload Plugin) (June 30, 2009)
    Hot off the presses, Miles Johnson’s generic file upload handler – packaged as a handy plugin – is a slick, quick, and simple upload processor. It supports different file types, renaming, resizing of images and thumbnail generation, validation, etc. I’ve already built another layer on top of it for storing upload records in a database, which Miles wisely left out (since DB implementations vary so much) of the base package. If you’ve been looking for a simple but powerful way to handle your file uploads, this is it.

3 Responses to Useful CakePHP Tutorial Roundup for July 03, 2009

Avatar

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

July 15th, 2009 at 8:53 am

[...] 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 [...]

Avatar

Vinci

June 9th, 2010 at 12:09 am

” jQuery image upload & crop ” seems to be missing from the Cake bakery.. any idea if its been moved. does anybody know the upated link to that article.
Thanks in advance

Avatar

Emil

July 26th, 2010 at 12:07 pm

We appreciate you including us in the roundup, Jamie!

Comment Form

top