Maximum level reached. You cannot reply to that comment.

CakePHP Digest #11 - Food Metaphors

Posted by Matt on Mon, Apr 06 2009

News

New Book

Chris Hartjes released his book, Refactoring Legacy Applications Using CakePHP. The first review of it popped upwithin 24 hours. I've read it and will be posting my review sometime this week. My biggest critique (which could also be construed as a compliment) is with the name. I think by calling it "Refactoring Legacy Applications Using CakePHP" Chris limits his audience, as the book is really about adapting "spaghetti" style PHP code to CakePHP. You don't actually have to be refactoring anything for the book to have value. He could have even gone with a foody title like "From Spaghetti to Cake - Hmmm Hmmm Good" or "You Spaghetti Sucks - Eat My Cake."

CakeFest Again

This piece of news got mentioned in the last digest (where I did a poor job of detailing it), but there is now an official Bakery announcement: CakeFest III in Germany. Buried in the article is the announcement of cakephp.de, the German translation of cakephp.org. The article also teases that "there are expected to be some very exciting announcements about the future of the CakePHP project."

CakePHP 1.3 Wiki

I hadn't seen this before, but there's some interesting stuff in the CakePHP wiki on The Chaw about the direction of version 1.3. First is a hit list of potential changes for 1.3. As items are finished information gets added to the 1.3 migration guide. Also, for the larger changes there is an RFC section which goes into greater detail.

Confusion in 3, 2, 1...

The Cookbook flipped the navigation to the left side sending twitters everywhere into daze (1, 2, 3, 4).

In The Blogs

Tutorials

Lots of new tutorials this week. The first is a series of posts be ibernat over at smashingmagazine.com's forum.

The colorfully named actionshrimp.com posted two parts of 72 part tutorial (I just made up the 72 thing, although now that it's out there they should feel obligated to complete it or I will feel let down). Check out part 1 and part 2.

ACL Tutorials

I'll be honest, I didn't read either of these. I have the attention span of a three year old these days. The posts are Getting Started with ACL in CakePHP and CakePHP ACL Tutorial - What and How. I'm not sure if either of the tutorials mention this, but what really helped me understand Cake's ACL was going right to the database. After every grant or deny command I would check the aros, acos and aros_acos tables to see the changes.

"Dynamic" Javascript

I'm sparked by this post from Teknoid, but he's certainly not the only one who pushes this concept. Also I'll mention teknoid's blog is awesome and I just happen to disagree with this one post. In fact I still wake up reaching for my shotgun (conveniently nearby in The Backup) after nightmares that this "bug" isn't a bug.

What is the obsession with putting PHP in JS files? Leave your functions static inside the JS files and set the variables they act on in your views/layouts with PHP.

<script type="text/javascript">
alertMe("<?= $session->read('User.username'); ?>");
function alertMe(msg) {
  alert(msg);
}
</script>

Ok, no one would ever do that, but imagine that username is actually a data array (which can conveniently be converted to JS with $javascript->object()) and the alert function is actually a function that makes ajax requests to your cloud servers and returns rounded corners. Whatever, you get the point. Your JavaScript files can be crushed and served super fast by your webserver (or CDN) which doesn't need to invoke PHP and you still have the flexibility for dynamic craziness.

The Rest

There really were a lot of good posts these last two weeks. You've probably all seen these since @cakephp has been sending out the same links (although @cakephp's twit rate is declining after only two weeks - unless you count the tweets that are mistakenly posted on @cakephp instead of the devs personal accounts. *zing*).

CakePHP desktop wallpapers. Someone should do A/B testing to find out what type of desktop wallpapers hurts your chances with the ladies more: half naked super model or CakePHP themed.

Displaying custom error message with the right HTTP response code

Paginate associated model’s data in CakePHP

In The Wild

recipestar.com

Matthew Inman, who created the (formally) CakePHP based dating site mingle2, launched his latest project: recipestar.com. It's almost as if Matt's sites are following the progression of his life. First he was looking for that someone special, but now he's found her/him and settled into that daily routine where you have to deal with the "what the f is for dinner" question ever night. Look for futures sites (in this order) on weddings, parenting and relaxation techniques when you feel like launching a three state killing spree.

soonerquotes.com

@ruebenramirez announced soonerquotes.com. If I gave you a million guesses as to what the site does the first one would be: "Quotes from people related to the University of Oklahoma sports teams," which would be wrong. The next 999,999 guesses would be: "Really? Are you sure?"

hotscripts.com

@aaronforgue re-launched the venerable hotscripts.com. Remember when it was 1999 and you first discovered this site and thought it was the greatest thing since you realized you could set the from address of emails to anything and spent days pranking your friends? Man, we were so naive then.

gamesync.com

Miles J, who you probably know as one of the more active contributors to the Google Group, announced his new site GameSync.com.

Tickets and Commits

There were a bunch of requests for new callbacks including beforeSaveAll, beforeDispatch and afterStartup. The best part of all these was Nate's comment:

It may have escaped your notice, but we currently have over 320 open "suggestions". If didn't reject any them, this framework would quickly devolve into a pile of Zend. Oops, did I say "Zend"? I meant to say "incohesive class libraries of varying quality".

Code

beanstalkd

David Persson released a plugin for the Beanstalk Queue Service, which I'd never heard of before, but seems really cool and dead simple to use. I would love to use this where I work, unfortunately the product management team prefers to just let the browser hang, with no other indicators except for the normal mouse hourglass pointer, while extensive background tasks are performed. I guess you could make an argument for either approach.

Wildflower CMS

Version 1.3 of the Wildflower CMS was released. This may be a great piece of software but the name makes me suspicious. How did the author miss such a clear opportunity to call it Wildflour CMS and be part of the cheesy baking tie-ins trend.

In The Groups

Who Has The Answers?

There was actually a fairly civil and well thought out discussion of the CakePHP resources and areas it is still lacking. I almost posted something like "The problem with CakePHP is the framework is like an 80 year old - slow and full of bloat, but the docs are like a newborn - undeveloped and constantly pooping itself" just to set the world right again.

I'm Out!

And on that note don't forget to subscribe to my feed or follow me on twitter.

As always if you think I missed something leave a comment. Or if you do something interesting and want it included in the next digest, send me an email.

Posted in CakePHP Digest

10 Comments

Miles J said on Apr 06, 2009
Thanks for the mention in the article, much appreciated.
Mark Story said on Apr 06, 2009
Fun thing about all the callback tickets was they were all opened on the same day, by different people. Thanks again, for the mention :)
C. James Callaway said on Apr 06, 2009
I stayed up pretty late reading Chris' book. It was impressive. Thanks for mentioning the review.
Ivan said on Apr 07, 2009
OMG, thanks for mentioning me :-) Hope to meet you in Berlin ;-)
Andrew said on Apr 07, 2009
Hey we just launched a new CakePHP site. Check my link ;)
Matt said on Apr 07, 2009
Cool. I'll check it out and include it in the next digest.
ics said on Apr 07, 2009
Matt, your 'CakePHP ACL Tutorial - What and How' link is broken :-)
It should be http://komunitasweb.com/2009/03/cakephp-acl-tutorial-what-and-how/, right?
Matt said on Apr 07, 2009
Yup. Fixed now. Thanks.
poLK said on Apr 07, 2009
I really like your CakePHP digest, good work!
teknoid said on Apr 07, 2009
Thanks, your digests are always entertaining and informative!
Great job.

Add new comment