CakePHP
CakePHP is only the tastiest(there are a lot of puns when using CakePHP) PHP framework on the interweb. Only a couple months ago, I started learning CakePHP after the decision was made at work that we would be moving our current code base over to something. We landed on CakePHP after looking at dozens of CMS's and other frameworks. It is a Model-View-Controller framework that allows rapid application development without the hassle of having to setup all the basics that come with building sites.

CakePHP 1.2 is still a beta version, but we have been using it extensively on our live sites and thompsonbd.com was recently moved to being CakePHP powered. If you have questions about it, feel free to contact me. We've probably done what you are wondering, or run into the issues you are having.
Entries Filed Under: CakePHP
10:41am February 06, 2008
CakePHP Clob Behavior
Updated: I've made some changes to the CakePHP Clob Behavior
Bobby Borisov and Nedko Penev over at chankov.net wrote a great CakePHP behavior to help with handling Oracle clob fields in CakePHP 1.2. For those of you unfamiliar with Oracle, it will only let you insert or update a clob field with less than 4000 characters without using a bind variable. If you need to place a value [Read More]
Views  329 Comments  3
Filed under: CakePHP, Oracle
12:34pm December 04, 2007
Oracle Powered CakePHP
I've started heavily developing some stuff for work using CakePHP 1.2. We decided to go with the beta version as it currently is because of a number of changes. One of the major changes that we needed was better integration with Oracle.

The only issue with getting Oracle and CakePHP working nicely together is that in the default appconfigdatabase.php file, there is a missing value from the $default and $test arrays. var $default = array( 'driver' => 'oracle', 'persistent' => false, 'host' => '', 'port' => '', 'login' => '', 'password' [Read More]
Views  351 Comments  0
Filed under: CakePHP, Oracle
3:07pm March 19, 2008
Updated CakePHP Clob Behavior
Updated: I've released a working version of the oracle connection class that does not need behaviors to utilize bind variables.
We ran into some more issues using the CakePHP Clob behavior that Bobby Borisov and Nedko Penev wrote. Basically, the issue was that the original file used a reference variable to the model that was supposed to be using the behavior. However, it seemed to always doing something very by expanding the model array everytime the behavior was called.

[Read More]
Views  148 Comments  0
Filed under: CakePHP, Oracle, Clob, Behavior
12:00am March 18, 2008
Code Snippet: Blog Archive Element
This code snippet is a simple example of how I build the "Blog Archive " Element. // get list of blog entries
// ------------------------
$archive = $this->Blog->BlogEntry->findAll(
    null,
    array(
        'BlogEntry.id',
        'BlogEntry.created'
    ),
    'BlogEntry.created DESC',
    null,
[Read More]
Views  192 Comments  0
Filed under: CakePHP
I've been working hard to get thompsonbd.com ported over to CakePHP 1.2. Originally, I had a custom build "framework" that I used to string the site together. After having worked with CakePHP at my day job for the past six or seven months, I couldn't wait to bring home the things learned while at the office and try some it out on my own site.

Even after working heavily in a LAMP environment for the past four or five years, I had never heard mention of a PHP framework. When the need arose at my office to start moving our current site [Read More]
Views  152 Comments  0
Filed under: CakePHP, PHP
We recently installed memcached on a couple servers. As we begin to scale up our use of CakePHP, we quickly saw a need for some type of caching solution so that every page request wasn't running the full load of queries to render a page.

memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.


Jiri Kupiainen wrote a CakePHP / [Read More]
Views  664 Comments  2
Filed under: CakePHP, memcached
9:53pm April 15, 2008
CakePHP Bookmark Helper
Ritesh Agrawal aka "ragrawal" built a really nice Social Bookmarklet helper for CakePHP 1.2. It allows for the easy creation of "Share This" type links. I found that the location of the icons needed to be corrected to use CakePHP's IMAGES_URL constant.

I also changed the html wrapper element from a div to li allowing better easier use with jdMenu.

Downloads: Bookmark [Read More]
Views  265 Comments  0
Filed under: CakePHP, jQuery
One of the problems of using CakePHP with an Oracle database is that CakePHP does not utilize bind variables. One of the advantages of Oracle is that it can cache query results based on queries, as long as those queries use bind variables and not strings. An example of a query using binds looks like:
SELECT * FROM my_table WHERE id = :myBind;
$bingArray = array( 'myBind' => 12 );
When I first started working with Oracle, I was not aware of the [Read More]
Views  146 Comments  0
Filed under: CakePHP, Oracle, Web Development
While messing with a new website that I am working on, I find a slightly annoying issue with CakePHP that doesn't seem to be documented anywhere. I was trying to store a thumb up/down record in a tinyint(1) field. A thumb up would have a value of 1 and a thumb down would have a value of -1. CakePHP was kindly(sarcism) converting my -1 to a 1 every time.

It appears that CakePHP assumes that all tinyint(1) fields are actually boolean fields. Therefore, if anything other than false is set in the field, it will store a 1 as the value.

So, if you notice that [Read More]
Views  115 Comments  0
Filed under: CakePHP, Web Development
Loading...