From the deep

Jun 28

PHP class: Text to anything

I recently had a client who sent me a 300+ list of items they wanted placing into a drop down select menu. Beside the obvious accessibility issues they were quite set in their ways about what they wanted—per usual.

 

Jun 26

Design Pattern I: Singleton

In this first episode of PHP design patterns, we will be looking at the Singleton. The Singleton is available in most, if not all, OO languages. The purpose of the Singleton is to only ever have 1 instance of a class available which supplies the rest of the application with consistent data. I would like to point out that my version of a Singleton may differ slightly from other peoples; design patterns are not exact nor are they set in stone.

 

Jun 19

phpSimpleAuthent

I was browsing a couple of PHP forums the other day, and it seems people require a simple authentication script for their website. So, I thought I would make just that.

 

Jun 11

Magically dynamic PHP

There are several functions in the PHP language which were made to make classes more accessible and dynamic. I am going to be talking about two of these so called “magic functions” which allow you to set and get information dynamically, whilst also providing a simple log to show you what is really going on behind the scenes. These two functions are of course __set() and __get().

 

Jun 8

PHP exception handling

Arguably one of the best things to come out of PHP5 was its improved OO support. With OO comes easier separation of presentation, data, and business logic layers which leads to reusable code and better code management, amongst a host of others.

 

From the journal

From the deep

Obligatory links

Create simple UML diagrams on-the-fly

yUML is an online tool for creating and publishing simple UML diagrams. It’s makes it really easy for you to: Embed UML diagrams in blogs, emails and wikis, Post UML diagrams in forums and blog comments, Use directly within your web based bug tracking tool and Copy and paste UML diagrams into MS Word documents and Powerpoint presentations.

Javascript Tidy

One thing I often need to do is to tidy javascript from it’s packed state. Often to fix the developers bugs, add new features or to modify it slightly. I give you, the Javascript Tidy, a tool I couldn’t live without.

jQuery Slider plugin (Safari style)

A pretty awesome slider. Haven’t tried it out yet but the new version seems pretty easy to skin, so you can style it however-the-hell you want (note: click the ‘jQuery Slider update’ link).