Mark’s Site

Pensieve for coding and golf :-)

Archives for the ‘2. Advancing in PHP’ Category

CSV Data Generator

By admin • Jun 4th, 2008 • Category: 2.4. Testing

I’m in the process of creating a csv import application for employee data among other things, so I needed good quality test data. Instead of writing a few lines of test data myself, I thought I’d check if any free applications existed to do the work for me. I’m into free applications that I don’t [...]



The Importance of Coding Preparation

By admin • Jun 4th, 2008 • Category: 2.1.1. Planning

Some call it coding preparation, others will call it planning and design, but we’re talking about the same thing. The more I code, the more I see professional programmers who just want to code. They don’t care if the design is complete. After all, they have enough info to get started right? They have the [...]



Singleton Pattern

By admin • May 17th, 2008 • Category: 2.3.1. Creational Patterns

This is important, listen up! The singleton design pattern is used to ensure a class has only one instance, and that global access to that instance is available. In other words, it restricts instantiation of a class to one object.



Design Patterns Defined

By admin • May 17th, 2008 • Category: 2.3. Design Patterns

What are design patterns and why do I want to know about them?



Decorator Pattern

By admin • May 17th, 2008 • Category: 2.3.2. Structural Patterns

A useful example that I thought I should share



Downgrade Gracefully

By admin • May 7th, 2008 • Category: 2.1.4. User Interface Design

Stuff you need to know about downgrading



Screen Design

By admin • May 4th, 2008 • Category: 2.1.4. User Interface Design

When I first started web development, one thing I was always torn on was how to design my screens. I had loads of information that I needed to display in some meaningful, easy to search format. After many years of trial and error, I’ve now got my ‘template’ screens that I use for all my content management screens.



A Component Approach

By admin • Apr 30th, 2008 • Category: 2.1.1. Planning

My preferred approach to any moderately sized system is a modular, or component based approach.



Database permissions

By admin • Apr 27th, 2008 • Category: 2.1.2. Security

So you probably know that for a given SQL user, you can specify what permissions the user can have, such as CREATE, DROP, INSERT, UPDATE, DELETE etc. But are you one of those people that just sets up a general user with S/I/U/D permissions and leaves it at that?



Example Database Classes

By admin • Apr 22nd, 2008 • Category: 2.1.3. Classes

Time to share some serious code :-) I’ve developed my classes with flexibility and ease of use in mind. What follows are actual classes used in my application to handle requests to and from the database.