dinsdag 9 juni 2009

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

Did you already use themes?

woensdag 3 juni 2009

Adobe Browserlab for webdevelopers


Adobe has created Browserlab. It seems to be some kind of browsershots.org and it claims to be realtime. Probably worth trying. Take a look!

Tiny CakePHP Plugin

Tim Trice has released a plugin to shorten urls. This enables you to create your own url shortener like tinyurl.

Link: http://www.timtrice.com/tiny-cakephp-plugin/

zondag 29 maart 2009

Your website is finished and released, now what?


So, you finished your CakePHP programming work on your website en your site has just gone live!! Great, whoohoo! But, if you think you can go to sleep you are wrong, much wrong. You have just started, and you should focus on some other things.

One of those things is something like Google Analytics. Always collect statistics from your website from the start. When you have created a Google Analytics account and embedded the code in your pages, your data will grow as visitors come to your site.

After a few days or weeks you will be able to some analysis on your site. What pages do people like? What is the bounce rate of my webpages? Also write down the goals you want your visitors to reach. For example, you want your visitors to sign-up for your free service. Assign a goal in your analytics account to the confirm page of this process and add the other form pages to the preceeding funnel. You'll be able to see how many visitors exit the funnel before they reach the goal.

So, start analyzing your website, even if it is only for fifteen minutes a day!

And, go the Google Conversion University for some great presentations on this topic.

If you are finished and got your Google Analytics Individual Qualification, have a look at this old school stuff they brought to the iPhone.

donderdag 19 maart 2009

CakePHP 1.2.2 has been released

Hey, it's still pretty hot news, CakePHP 1.2.2 has been released... go check it out on http://cakephp.org/. Do it! Now!

maandag 2 maart 2009

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?

Testing your website on an iPhone, without an iPhone

If you are curious how you're freshly developed websites look on an iPhone, you can check http://www.testiphone.com/.

Personally, I prefer Apple's official iPhone simulator, from the iPhone SDK.

How many of you did already develop websites for the iPhone? Just let me know...

dinsdag 24 februari 2009

Apple releases Safari 4 beta


Apple has released Safari 4 beta today. It has some nice new features like Top Sites and Cover Flow. They also use the new Nitro engine and claim to be much faster then Google Chrome and the upcoming Firefox 3.1 (beta).

To try it, I visited a website which I am developing using CakePHP and lots of jQuery for some Ajax stuff and visual effects. Safari renders this page very fast, it feels good.

One of the other features I would like to try are the updated developer tools.

You can download Safari 4 here.

maandag 23 februari 2009

jQuery 1.3.2 has been released


jQuery 1.3.2 has been released. It has some significant speed improvements, especially in IE6. Read the changelog.

donderdag 19 februari 2009

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.

vrijdag 6 februari 2009

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.

donderdag 22 januari 2009

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.

Introduction
The 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. Of course, you need Apache and Mysql installed on your machine. You could use something like WAMP or XAMPP if you haven't already got those installed.

CakeTooDoo
After the introduction, you will setup a simple to-do-list-application. During this, you will get a little view of how CakePHP works. Some basic Models, Controllers and Views are created. The authors call this part a quick rollercoaster ride through the important aspects of CakePHP. And that's correct, you get to know some important stuff about it.

Models, Controllers and Views and the shell
....Why is everyone talking about MVC while we start with the Model and end up with the View? Am I missing something?

Ok, back on topic... In chapters 4-8, you get a more in-depth look at Models, Controllers and Views. It is explained how CakePHP interacts with your database through models, how models are related or can be related to each other, how to manipulate data, write controllers and create an interface for your end users through layouts and views.

When you understand how Models, Views and Controllers work, you wil be introduced to the Shell in the next chapter. The shell will give you the ability to kickstart your development or quickly create prototypes of your application. This chapter is a very short course to let you bake a cake.

Quickwall
So, you have learnt some things... I guess, and you are ready to bake a cake. The next cake is called Quickwall, an application where you can submit any question and get those questions answered. Hey, can anybody answer my question about MVC? Quickwall will not only let you bake a Cake, but also put some nice Dr. Oetker stuff on it like validation, ajax and disco-dip.

If you have a little bit experience in using CakePHP, these chapters will be the most interesting, as this is a real world example with authentication, ajax, rss and pagination.

CakePHP Application Development Book Image
Conclusion:
CakePHP Application Development starts at the very basics of CakePHP. Probably this book works best for developers who are already using PHP, but who are interested in CakePHP. If you develop your stuff the old way and you want to DRY things up, try CakePHP. For those developers, this book can be an interesting start. Especially after the introduction and explanation of MVC, when you are building the Quickwall application.

I like the way it is build up, you create some stuff, and after that, in the "What has happened?" parts, they explain ehm... what has happened. That's pretty clear.

For developers who already have experience in CakePHP and now how to do stuff like rss and pagination, this probably isn't the right choice. Does anyone no of good CakePHP books at another level, for the more experienced bakers?

If you want to start developing with CakePHP and want to buy a book to read and to try some sample applications, CakePHP Application Development might be a good choice for you.