CakePHP Digest #8 - ケーã‚ã«æ‰“ã¡å‹ã¤ã®ä¸–界
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.

13 Comments
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
I lolled :-D
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.
Cheers
AD
Good reading as always!
Add new comment