Visualize your models
26 Jan 2008
Happy new year!
Way back in December I found an awesome article by Cakeexplorer on a script to build an image of your db schema. I had been meaning to write such a script for some time, it was great to have it already ticked off the to-do list.
There was one thing that I didn't like too much: it ran off the tables in the db rather than the models in your app/models...
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 ...
Don't mail me my site errors
19 Apr 2007
I wrote recently about how to have your site(s) email you whenever a problem occurs. Trouble is "problem" turns out to be a rather broad scope. If you have a missing file or fundamental problem of some kind, you would want to know so you can fix it; if there was a dead link on your site, you would also want to fix it; if someone just mistypes the url (or follows a link...
Email me my site errors
31 Mar 2007
Have you ever wondered what the reason for that 404 error is when you set debug to 0, or when you move your site onto your live server? How many visitors/clients are confronted by a 404 when they should be looking at the fruits of your work? Cake allows you to modify what happens in the case of an error, and the purpose of this post is to show how to make your site mail you ...
Working with Tree data (MPTT)
26 Mar 2007
In the past week, a lot happened to this site, and not all of it was good :). Where to begin... the development machine died (hopefully get it back today); I moved all the code from a backup onto my aging laptop, my previous host account expired; I changed hosts to Dreamhost, the update from my laptop to the live version included some code that doesn't work/isn't finished; I...
Mini Controllers - modular page design
28 Feb 2007
The MVC pattern adds some clarity to what should go where when it comes to designing a page which requires some data from a data source. The model gets the data from the data source; the controller might do something with that data and then the view will display what the controller passes to it. If the page handles only a single function that's rather easy to both ...
Return of the Demos
24 Sep 2006
A brief not to say that I'll be putting a couple of Demos back on the site, and I'll be adding to the main demo page as I go. All of the demos will be put up as plugins.
The pagination demo and source has always been available, and adding to that, the the next example is the Title tutorial. A very simple example based on the original tutorial from the wiki...
Change the config at run time
18 Sep 2006
Following on from my previous post, I thought I'd mention a similar use that can make a developers life a little easier. Usually when developing software there are at least 3 environments: Development, Test and Production. For larger projects there may be more, but for a simple website (and a tiny team of 1) there is often 2 environments: the one on the development machine...