This is the website of Andy Carter a PHP and jQuery web developer in the Steel City. Working with CakePHP (and a bit of Textpattern and Drupal too).

Latest Entries

The first stable release of CakePHP 3 came out earlier this week so I’ve started the process of updating my Cake plugins. The first one to be updated is VideoEmbed (on the basis that it seems to be the most popular).

As every good developer knows the performance of their code is important. When building websites we want them to be light and fast to give the end-user a fantastic experience. However, far too often developers prefer to take shortcuts to make their lives easier, even at the expense of the site’s performance.

Diagram of CakePHP's observer pattern
CakePHP's Observer Pattern (the Events System)

It seems that Events are an often ignored feature of the CakePHP framework. Introduced in version 2.1 the events system provides a means of applying logic that generally doesn’t belong in a model or controller. Developing in Cake is all about its fat models and skinny controllers, but there are some things that belong in neither, and shouldn’t really be placed in a model just to make it fatter!

A new version of arc_meta for Textpattern is now available.

Version 1.3 adds support for section and category images for open graph and Twitter cards. The limits on the length of meta titles and descriptions has also been increased, although it is recommended to keep these short to benefit from there use for SEO.

Featured Entries

A Beginners Guide to Package Manager Bower and Using Gulp to Manage Components

Package managers like Composer for PHP and NPM for Node have become essential tools for simplifying a developer’s life. A package manager is a tool for keeping track of what you’ve installed, as well as installing and upgrading packages. They also check for dependencies and compatibility. Bower is a package manager for the web.

Calculate a Person's Age in PHP (Accounting for Leap Years)

I've seen a lot of code out there for calculating a person's age that makes the mistake of ignore leap years. If you ignore leap years then the age will be out by a day or more on or around the person's birthday which isn't what you want.

Latest Tweets

Follow Me