Koffie met cake (Coffee with cake)?

Dutch Cake Update 15 Dec 2009: (NL) De volgende data zijn beschikbaar:
Di 12 Jan 2010, Di 19 Jan 2010 of Do 21 Jan 2010.

’s middags vanaf 16:00u, Locatie nog onbekend…


Update 09 Dec 2009: It is going to be a ‘Borrel’ in Utrecht. I’m planning dates now…


I have seen many dutch guys (and girls?) in the IRC lately and thought of organizing a Dutch CakePHP get together. So we could do it in two ways: We could make it like a ‘borrel’ starting from like 5pm or we could make it more like a small event with speakers, code and of course cake.

Maybe some belgium and german guys want to be there to?

And of course the first question is: Are you interested in this kind of event/get-together?

“…Gesellig hè!…”

Charlie (aka primeminister)

CakeFest Berlin

cakefest_berlin_gray_largeCakeFest was cool. It was good to see all the people that I have met in the IRC channel and finally see some faces with the nicknames.

Amazing was that their were people all over the world! Australias (predominant) and even from Japan (ando). A lot of germans and there were french people, british, americans and of course dutch people. I think I forgot some nationalities but forgive me.

CakeFest started with gwoo giving a talk about Cake in general and how to help out. That saterday had a few interesting talks and also some not interesting ones, but isn’t that always on a day full of talks. It is just IMHO.

Second day I was up to give my talk about Building APIs in CakePHP. The presentation and code is freely available on cakephp.org/downloads together with other presentation and code.

See for yourself! Cheers!

Amazon datasources

This is just a short announcement. I’ve been dealing a lot with Amazon API and LastFM api in my last project. (Cloudspeakers new design/site) I’ve made a CakePHP datasource for Amazon S3 storing and retrieving and one I modified the datasource from Felix for the Amazon product advertising API.

I will share those through git (theChaw) but have to finalize them a bit. Also the retrieving S3 part is not working yet, but not needed in my project.. so that will be a bit later.

Update 2009-07-11: Just had an interesting talk of Joel Perras @cakefest about datasources. I have to rewrite mine. Sorry and have some patience.

Update 2009-11-08: Just added the Amazon eCommerce code datasource to GitHub: http://github.com/primeminister/CakePHP-Amazon-eCommerce-datasource

Displaying custom error message with the right HTTP response codes

I’m building an RESTful API with CakePHP now. That is great stuff. Very easy and quick for the basics. Some more info on how to in the book and here.

But I wanted a custom XML error message with the right HTTP respond code like the Twitter API does. I knew it could be done with overwriting the AppError class and make my own custom method.

This is how I did it: (more…)

Cache duration and configuration tips

320gb-werstern-digital-hard-drive-7200-rpm-cache-8mb-hd-w3200jbAs you know you can cache several elements in you application. When I wrote a value to the cache I did it by setting the duration in the third parameter of write:

Cache::write('cache_key', 'value to cache',array(
    'config'=>'default',
    'duration'=>'+1 day')
);

But today I learned a lesson from Mark Story that this was a bug and it is fixed and doens’t work anymore. It is ignored.

So how do I set the duration before read/write for specific data in my code? (more…)

Mapping content over domains with Apache

Using ‘Dynamic Mirror‘ in Apache you can map content from one domain to another. This was useful for a customer who had two very old domains from 1993 and built-up a nice SEO ranking.

We have two domains a-domain.com and b-example.com. The last one has a new design and some different links and is an application built in CakePHP. 
The other domain ‘a-domain.com’ had its purpose to serve the same content. (more…)

Writers invite

Hi all,

rp-pencil-tipAs you see I don’t write very often. That is because I have a lot todo and I sometimes I really don’t know what to write about! And if I do teknoid or someone else beats me to it … (keep doing that you guys!)

My intention with this blog was that more writers join in and write together with me tips and insights of cake and other tech stuff. 
So… If you thought of writing articles, short tips and tricks but never had the time to setup your own blog? Or are you someone like me that doesn’t write much but sometimes want to?

Come in, register and write! Or leave a comment on this post. Join me to write (great) stuff about what’s keeping us busy.

Cheers!
- primeminister