Developing Ajax based web application using CakePHP

One of the challenges in developing ajax application using CakePHP is to figure out how to load ajax view (interface) for first time and request only data (json or XML) in subsequent ajax calls. Luckily, with CakePHP this is simple and you really don’t need to write many different functions. The trick is to use [...]

CakePHP – using associationForeignKey with belongsTo

While defnining “belongsTo” association in CakePHP 1.2, there are five keys that you can used (to read more about association or belongsTo, checkout this page) . The five keys are className, foreignKey, conditions, fields, counterCache. In general, if you have followed CakePHP conventions, you wont need any other key. However, today I stumbled across a [...]

Integrating CakePHP and ExtJS: A complete guide

A tutorial on how to integrate CakePHP and ExtJS. Demonstrates the integration of the two using the example of a simple user registration form. Also shows how to load data and validation errors returned by the server

Migrating from OthAuth to CakePHP Auth

This post lists down steps for migrating from OthAuth component to CakePHP’s inbuild Authentication component (Auth Component).
Note about using these migration steps: I used OthAuth mainly for authentication purposes i.e. mainly for verifying a username and password. I never got involved with complex authorization. So, these steps are only applicable if you are using Auth component withouth ACL.

1. In [...]

Removing default values from CakePHP result

In most of my MySQL tables, I generally use some default values so as to make sure that the webpage doesn’t show up empty. However, as I was building a utility that allowed users to download their data, I wanted to remove these default values. So I wrote a small function, removeDefaults, that can remove all the [...]