Feed items

CakePHP themes 1 minute HOWTO

Did you that it only takes a minute to start using themes for your CakePHP application? No? It's just these steps you need to start using themes:1. In your (app)controller: var $view = 'Theme';2. In your (app)controller: var $theme = 'orange';3. Or from a function: $this->theme = 'orange';That's it! You can now create custom views and layouts for this theme under /app/views/themed/orange. Below that folder you should use the same structure as under /app/views. For example, create a file /app/views/themed/orange/layouts/default.ctp.So, if theme-specific files exist in themed folders, these will be used, else, CakePHP switched back to the default layouts and views.You can also create custom CSS and JS files under /app/webroot/themed/orange/css and /app/webroot/themed/orange/js.Pretty easy huh...

WhoDidIt behavior: who did what?!

Daniel Vecchiato has written the WhoDidIt behavior for your CakePHP models. Sounds great, he describes it as:WhoDidIt behavior is useful for tracking who has created and modified records: automagically!It works like created and modified fields. It's great for doing some logging on which user has created certain records and who is the last person to modify a certain record. Definitely a great addition and probably something for CakePHP 1.3?

Watch CakePHP on Twitter

If you want to know what others do with CakePHP or what they think about it, watch http://search.twitter.com/search?q=cakephp. Don't start watching this all day long, life's too short for that.Post you're favorite tweets below.

Twittermail @ the Bakery

One of the guys from Twittermail has written a nice article on how they have rewritten Twittermail within 48 hours. They write about security, scalability and localization. What projects did you do where you had to think about these things? Did you write any article like this? Let us know please.

Review: CakePHP Application Development

Well, here I am, trying to write my first book review ever. It don't think it will be the best review ever, so please don't review my review... Anyway, I read a copy of CakePHP Application Development published by Packt Publishing and will post my thoughts below.The book is divided into a few parts. In the first part, an introduction to CakePHP is given, followed by a little example application, CakeTooDoo. After that, a more in-depth explanation is given about Models, Controllers and Views. Then, you're taken to the shell and do some baking before the last part, which is about building an example application called Quickwall.IntroductionThe introduction explains What CakePHP is and describes the advantages of using a framework like CakePHP. Also, the MVC Pattern is explained and you are introduced to the most commonly used functionalities of CakePHP, like validation. Next, you are going to download and install CakePHP.

Breaking news: CakePHP 1.2 has been released!

What did the guys from CakePHP 1.2 do during these Christmas days? Well, they have been working hard to make CakePHP 1.2 final. It's finished, read the announcement at http://bakery.cakephp.org/articles/view/the-gift-of-1-2-final. Thanks guys, for getting this thing done, I guess a new era for PHP frameworks has started at the end of the year.Thanks roryy for notifying us about the release.Most of you will already be downloading or testing 1.2, for everyone else (interested in soccer), watch this.Best wishes to everyone the upcoming 2009!

Automatic inclusion of Javascript in CakePHP

Earlier, I wrote about $scripts_for_layout and I was looking for a solution to automatically load js files into your layout. Well, I think the solution might be in this presentation from Felix Geisendorfer. At slide 20 he starts talking about this.Has anyone seen this, or did you already try it?Let us know!

Preview: ModelBaker (OSX) - Rapid Application Development for CakePHP

A few weeks ago, I was notified about ModelBaker by WidgetPress. The homepage made me quite curious, as they promise to be able to rapidly develop CakePHP applications from an OSX desktop application. Take a look at the screenshots and screencasts on their website. Or, take a look below, this is the part of the application where you describe your database.As you can see, you enter the tables you want to use, the attributes validation and even relationships. ModelBaker gives you an overview about your tables and their relationship. Based on your information, the Models, Controllers and Views are automatically created. You can even add another model, User to use out-of-the-box authentication in your application. You can add more helpers or components to be used in your application or even choose a template to give your application some nice looks. And hey, why not develop your application for the iPhone?

PHP frameworks

Today I visited PHP frameworks and noticed a few PHP frameworks I didn't know yet. I know the mainstream frameworks are CakePHP, Zend, Symfony and CodeIgniter, but I saw some new ones I haven't heard of before, like Zoop, Prado, Yii and Akelos. Also, I read about Kohana.I tried to get an overview of each framework, also the ones I already tried or heard about. The problem with this is that I am confused. I have used CakePHP for quite some projects and most of the time, it's great. But, I got the feeling there are some things returning in each or some projects for which CakePHP hasn't got the perfect solution.CakePHP and most of the other frameworks are great for doing some database connection and helping you starting a blog in 15 or 20 minutes, but what's next? Does one of these frameworks have a killer feature?I downloaded some of these frameworks and did a little testing.