zen of coding

Key/value tables and how to use them in CakePHP 1.3

The key/value tables (EAV model) are a nice a approach to database modeling, when we need to store some arbitrary data about another model. For example, let’s take a User model. We could create a single users table to hold all of the potential data or even create an additional[…]

Read More »

… moving on …

I hope the move to a new server (aka wordpress.com to wordpress.org) is complete. Still need to do a little house keeping, but please let me know if I’ve totally messed it up… (or whatever you find). Thanks.

Read More »

Forcing cake to use "dashed" HTML DOM ID’s

Why bother? I guess just to keep CSS purists happy, we should have our DOM id’s appear as “some-field-id” rather than CakePHP’s default “SomeFieldId”. (Also, it’s just a matter of consistency and most certainly personal preference). There is no defined rule for this, but in overwhelming CSS examples and tutorials[…]

Read More »

Important database session limitation

If you are using a database to keep your sessions, there is one rather significant limitation which you should be aware of. It does depend on the specifics of your DB, but I am going to guess that in most cases it is something that could happen to any database…[…]

Read More »

Couple of convenience methods to add to your bootstrap.php

Although most of the convenience methods will be removed from CakePHP going forward (see the note about basics.php), and I say good riddance, you still have the opportunity to add your own to bootstrap.php. For example a couple that I like are wrappers for var_dump(). The main reason being is[…]

Read More »
%d bloggers like this: