CakePHP Digest #8 - ケーキに打ち勝つの世界

Posted by Matt on Sun, Feb 22 2009

News

cakephp.jp

There is a new cakephp.jp site, which is a translated version of cakephp.org (see gwoo's announcement here and here). Usually it's fun to run the non-english version of a site through Google translate to produce some crazy translations. Unfortunately, cakephp.jp failed miserably here or maybe Google translate is just getting better. For example, the main block of text re-translates to:

CakePHP is a PHP framework for fast development. Application development, maintenance, provides a scalable mechanism for the installation. And ORM, and MVC, design patterns are well known, "Terms of priority setting" with the idea of using, CakePHP will reduce the need to write code that developers and development costs.

Kind of crazy, but not very funny. The best one I could find was Jonathan Snook's quote, which re-translates to:

You will see what needs to be done automatically, ourselves document

CakeFest

Nate mentioned the next CakeFest is in the works, so keep an eye out for that.

Your Home Page is Showing

Also from Twitter: "The easiest way to tell if a website uses CakePHP (/pages/home)". Kind of scary. Check out Mozilla's Add-ons page or one of my sites.

A couple ways to fix this:

  • Delete /cake/libs/views/pages/home.ctp. Although if you upgrade Cake you may end up re-adding the file. I'd probably go with one of the other ways.
  • Create /app/views/pages/home.ctp. You can make it an empty file or put in a simple JavaScript redirect.
  • Add a route: Router::connect('/pages/home', array('controller' => 'home', 'action' => 'index')); Make sure to put it before the generic pages route.
  • Delete the generic pages route (Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));). Only do this if you aren't going to be using pages.

Anyone have a better suggestion?

Tickets and Commits

Some good bug kills the last couple of weeks, including two (#6072 and #6088) of mine (whoooo!!!). You win some, you lose some...couldn't get #6093 fixed and got scolded in the process (booooo!!!).

In all there were 32 commits in the last two weeks fixing 13 open tickets.

Twitter-dot-com-slash-quinns pointed out that there is now a 1.3 branch in the CakePHP SVN. It's password protected as the moment, so we can only speculate what is going on in there.
Based on what I've seen and heard lately, here's what I think:

  • New library independent JavaScript and Ajax helpers.
  • New ascii art helper, which will include $ascii->pedoBear() and $ascii->itsATrap() functions.
  • Unit tests for the unit tests, making Cake the best tested tested framework out there. Take that!

In The Wild

This site actually launched a few weeks ago, but the Bakery article that talked about it disappeared for a bit, so I held back mentioning it. The site is TutorialMagazine.com and it focuses on the current political crisis in Madagascar....or lists hand picked design tutorials. One or the other.

Twitter-dot-com-slash-Mark-Holt tweeted about a new CakePHP site - Dr Martens For Life. Which raises the important question: Does anyone still wear Doc Martens? Has it come full circle to the point where if I dusted of my brown DM boots (still in my closet) that it would be retro and the kids would think I was cool? At what point are Docs in the cool-and-unknown -> trendy -> overplayed -> lame -> forgotten -> retro lifecycle?

Also via twitter, Jonathan Snook announced his latest client site.

From Nick, via the Bakery, comes LifeYouMentary. <constructive criticism>Nick really dug himself a whole with this site. I've been down this path. Let's count the mistakes. 1)Witty name that only makes sense to you? Check. User generated content site with no users? Check. Should have been a Facebook App? Check.</constructive criticism>

Not exactly a new site, but luvsound.org released their source code (also via twitter) . Now that the code is available I can submit a patch adding some text about what the heck the site is. And the logo - that needs patching too. My eyes haven't been that assaulted since two girls shared one cup.

In The Blogs

John David Anderson, the documentation lead for Cake, launched a new blog at thoughtglade.com.

Mark Story, the other Cake dev who blogs (unless I'm missing someone), wrote a post about his API Generator Plugin. I tried it out and it's really cool...as cool as code documentation can be, that is.

And that about covers it for the blogs. It's like you guys are conspiring to post all at once, then leave me dry for a couple of weeks. *angry old man fist shake*

In The Groups

Where Does My Form Go?

I can not agree with this post enough. Probably because I'm a fan of combining the add and edit actions/views, but it makes sense that the default form post URL should be the current URL.

How To Create Models With Your Computer, A Barbie and a Freak Electrical Storm

Read down to the third comment, by Gwoo in this post. He explains the different ways to load a model into a controller dynamically. I knew about ClassRegistry::init, but didn't know about Controller::loadModel. Apparently this has been explained a lot, but I've been missing it. I really need to start following the various CakePHP information streams.

Going Once...Going Twice

AD7six posted a question trying to get feedback on whether the Cookbook comments should be removed. Surprisingly, he only got two responses. It's like people forgot that the internet is the place to spout off even if you don't have anything of value to actually add. Maybe everyone is just baiting him to actually do it, so they can then complain about it. I didn't respond because I don't care either way. AD7six provides some good examples of why the comments aren't working, some of which are kind of funny, so it's worth clicking through.

In The Bakery

Nick (blogging here), who won my CakePHP Application Development giveaway, posted a file upload component. If there's one thing the Bakery has, it's file upload options. As my father-in-law would say "You can't swing a dead cat in here without hitting a file upload option."

This plugin seems pretty cool - it generates dummy data to help you test your application. It uses PHP Faker as the library for generating the data. The one change I'd make is to have this run from a shell, rather then in the browser. I wonder if this plugin could be use to generate fake user content to make UGC sites look active? Hmmmm....

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

13 Comments

Heath Nail said on Feb 22, 2009
Cake takes over the world huh? Thanks for doing these digests. I usually get a laugh or two :p
Matt said on Feb 24, 2009
Thanks...I think. Considering there are 10+ jokes per digest, that's like a 10 to 1 joke to laugh ratio. You comment may qualify for my "Backhanded Compliments" coffee table book.
shun/sdozono said on Feb 22, 2009
Wow. Thank you for mentioning about cakephp.jp. I'm a regular reader of "PseudoCoder.com". "ケーキに打ち勝つの世界" sounds "the world that overcomes a cake". :-). - maintainer of the cakephp.jp.
Matt said on Feb 24, 2009
I forgot to congratulate/thank all people who worked to get cakephp.jp up and running before launching into my whole translation spiel. So, uh, congratulations!
Jonathan Snook said on Feb 23, 2009
Ah, I love the digests! I checked out my pages/home page and it turns out, it was my test page that I used when I was building the template. Now I feel like I should use it to build a secret page just for the curious. :)
Jørgen said on Feb 23, 2009
Hi there, thanks for mentioning my site, http://tutorialmagazine.com!

The
reason it wasn't in the bakery for a while was because right after I published it I noticed some typos in the text..and of course when I published it again it was sent to get approved by a moderator :D

I'll be sure to add some tutorials on fixing the political situation in madagascar ;)
- Jørgen
Matt said on Feb 23, 2009
The whole articles disappearing for edits thing is pretty common. I complained about it at the end of my last digest.
Richard@Home said on Feb 23, 2009
"New ascii art helper, which will include $ascii->pedoBear() and $ascii->itsATrap() functions."

I lolled :-D
Erik said on Feb 23, 2009
I'm glad you like the luvsound design. ;-) I'm not sure how useful the source will be to others, but in keeping the spirit of our organization we felt like it was a natural thing to do. We're a label and arts co-op based in Brooklyn and New Orleans. We hope to grow luvsound.org into a community site in some form, which will be made available on google code as we work on it. Thanks for the blurb!
Matt said on Feb 23, 2009
You should take that description ("We’re a label and arts co-op based in Brooklyn and New Orleans") and pop it right in the banner area. It's short and tells exactly what you guys do.

As for the logo (and take this with a grain of salt - I'm no designer)...it's just so distracting it's hard to focus anywhere else. Drop the 3d effect and have something.

Anyway, I think it's cool that you guys opened up your code.
AD7six said on Feb 24, 2009
I hope you keep going with the digests, they're a great read. It's also my ~weekly opportunity to check what number appears on your wheel-of-fortune random-number-generator feed reader count :)

Cheers

AD
Matt said on Feb 24, 2009
I just made the FeedBurner -> Google switch, which probably explains the current number. Either that or I'm not nearly as entertaining as I think I am and everyone mass unsubscribed....nah that can't be it.
Rafael Bandeira said on Feb 26, 2009
It has been some time that the 1.3 branch is there... I remember having twitted about it one day.
Good reading as always!

Add new comment