Bake yourself a complete admin backend - in one call
24 Mar 2008
Happy Christmas leveille!
How would you like to be able to generate your entire admin backend in one call? Not interesting enough? How about with built in index filters and by writing practically no code? Well... keep reading then :).
The code
The code I am discussing here is available from the Noswad cakeforge project. Be sure to read the release note.
...
Speed up your dev: write custom bake templates
28 Nov 2007
When I first started using cake, bake wasn't around. It took quite some time for me to decide to give it a go, but at that time what bake gave wasn't customizable, as such it's use was limited since it took nearly as much time to bake and edit the files as it did to just write the files (once you know what you are doing that is). Roll the clock forward a bit and bake ...
DRY: Applied to your setup
20 Nov 2007
As pointed out in a recent comment, when changing your cake version you may find that some of your hand written config files are nolonger compatible with the version of cake you have selected. However by making use of a a custom production setup there is a way to configure your application defensively and in less lines of code.
Every time I use copy, paste &...
read populates $model->data
02 Nov 2007
For the past couple of days, I've had this niggling doubt that I've been missing something. Some code that I had in a behavior, which was supposed to be triggering a save for two field values, further down the line kept turning into a save which included every field in the table with the old field values. Why was this happening? I asked Elvis, he didn't know so I had to ...
Production setup revisited
24 Aug 2007
A while ago I wrote about how to have a production setup on a shared host, an insightful comment from CraZyLeGs pointed out that the same idea could be extended (on either a shared of dedicated machine) to allow multiple applications to be installed on the same server, and have multiple parallel versions of cake installed as well. For some time, and in reality probably...
Generic capability-based security (CSRF prevention)
23 Aug 2007
Over time I have become more and more interested (concerned?) with the security aspects of web development, and lately I've been looking at defense tactics against CSRF type attacks. To put CSRF into layman speak using a typical example, its an exploitation of sites where the only means of checking whether or not to do something, is to check if the request came from a logged...
Apache named parameter problem
15 May 2007
I just ran across a rather curious problem, which proved to be pretty fatal. I thought I'd jot a note down so I don't forget and so it can be found by others - it also forms reason #6538 why not to develop with a windows machine :).
The Problem
With a standard (1.2) cake install, the colon (:) will be used as the default separator for named arguments; if you decide...
Making the most of the router
03 May 2007
The router is the part of Cake which takes your url and splits it up so the dispatcher knows which controller and action to run. In 1.1 that's about all it does, but in 1.2 the router also works the other way around too - you can feed it an array of controller, action and paramters and it will tell you which url that corresponds to. All of cakes url using/generating methods ...