zen of coding

Bye-bye $cakeDebug…

The infamous $cakeDebug variable, which has been around for a long time and managed to annoy a few people in the process, has been replaced in the recent builds of CakePHP 1.3 with an element. See the ticket here: http://cakephp.lighthouseapp.com/projects/42648/tickets/35-the-implementation-of-dbo_sourcephp-logging-needs-changed The two points to take away are: Automatic SQL dumps[…]

Read More »

Overriding default URL's (aka persistent routes)

CakePHP’s routes allow for an easy way to serve content by using URL aliases. Let’s take an example from the manual: Router::connect(     ‘/cooks/:action/*’, array(’controller’ => ‘users’, ‘action’ => ‘index’) ); By having the user access the URL such as example.com/cooks/index simply shows the default view for example.com/users/index (as[…]

Read More »

Improved form handling in CakePHP 1.3

Here is a typical, simple form done with cake’s form helpers: [code language=”php”] echo $this->Form->create(‘Article’, array(‘action’ => ‘test’)); echo $this->Form->input(‘Article.title’); echo $this->Form->input(‘Article.body’); echo $this->Form->input(‘Article.user_id’, array(‘type’ => ‘hidden’)); echo $this->Form->end(‘Add Aricle with Tags and Comment’); [/cc] Which outputs the following HTML: [code language=”html”] Title Body [/cc] This is fine and all,[…]

Read More »

Easy CakePHP API search with Firefox

Some of you might know this, but… Go here: http://mycroft.mozdev.org/search-engines.html?name=cakephp Click the “CakePHP API” link (or any other you might think is useful) Add “CakePHP API” to the list of engines available in the search bar?… Most definitely “Add” (Sure, let’s try it right away) Ctrl + K (windows) or[…]

Read More »

CakePHP 1.3 helps with team-based development workflow…

I do have to say that in 1.2 some of the features described here are available as well, however CakePHP 1.3 takes it slightly to the next level to make team-based development even easier… With SVN or Git it is already easy enough to make team-based development readily accessible, that[…]

Read More »

An intro look at jQuery Tools, enhancement for setFlash() and CakePHP 1.3

Actually the main focus of this post will be how to creatively use JavaScript and Session::setFlash() to make your app a little more sexy. (Slightly tweaked to use CakePHP 1.3, although there is nothing special here that you couldn’t do with other versions of cake). First, I wanted to point[…]

Read More »

Top 10 things to look forward to in CakePHP 1.3

(Update: 8/26/2011… and a few years later we can look forward to CakePHP 2.0). With CakePHP 1.3 release is just about on the horizon, there are a few developments that I am particularly excited about. There are some great summaries and previews at code.cakephp.org, but still a few things are[…]

Read More »

Habtamable behavior

The basic idea behind this behavior is that you (well, once in a while) need to save two HABTM models at the same time or search across both models, which are involved in the HABTM relationship. By default cake does a nice job of saving HABTM models and their relation,[…]

Read More »

Random thought + prediction post

I hope not have too many of these… maybe once every few months. jQuery and JavaScript coding has become a helluva lot of fun. By the end of 2010 (with advent of HTML5), JavaScript will finally make web developers content and happy — and cause massive mojito-drinking.

Read More »
%d bloggers like this: