You are here

Blog

The Template Pattern

Download the source for the Template Pattern or get it on Github.

NaturalDocs

Documentation is an important part of any project. When creating software, code alone is insufficient. There must be some text along with it to describe various aspects of its intended operation. It is important for the code documents to be thorough, but not so verbose that it becomes difficult to maintain them. Enter NaturalDocs. Natural Docs is an open-source documentation generator for multiple programming languages.

The Adapter Pattern

Download the source for the Adapter Pattern or get it on Github.

The Command Pattern

Download the source for the Command Pattern or get it on Github.

The Command Pattern is a design pattern implemented for a multitude of purposes: progress bars, wizards, thread pools, multi-level undo, and networking to name a few. By encapsulating the request as an object, the Command Pattern allows us to parameterize other objects with different requests, queue or log those requests, and even support undo functionality.

The Singleton Pattern

Download the source for the Singleton Pattern or get it on Github.

Sometimes you may find yourself in need of an object that can exist once and only once, for example: registry settings, device drivers, or game objects. To do this we use a pattern aptly named the Singleton Pattern. The Singleton utilizes a private constructor and so can only be instantiated through a call to another method. Here is a basic Singleton.class.php:

The Factory Pattern

Download the source for the Simple Factory Pattern or get it on Github.

The Decorator Pattern

Download the source for the Decorator Pattern or get it on Github.

Ever need to add new or additional functionality to a class dynamically? Need to make a class that is open for extension but closed for modification? Then the Decorator pattern is for you. How? Simple, we will add a new class to wrap, or decorate, the original class.

The Observer Pattern

Download the source for the Oberver Pattern or get it on Github.

Webucator

Webucator Training Services
At-Your-Own-Pace Java 2 5.0 Programming Course
Price: $99.95
Site: Webucator
Course Information: http://www.webucator.com/AtYourOwnPace/

Webucator is an online provider of technology and business training classes with a variety of services including real-time classes, customized training, and at-your-own-pace courses.

Tags: 

Database Class

One of the biggest complaints I hear about PHP is how ugly it is as a language: function names are not case-sensitive but variables are, there is a haphazard implementation of many features, and having no real structure enforced on PHP developers makes it easy to write messy code. And the critics may be right. I think Rasmus Lerdorf summarizes PHP best when he says:

Tags: 

Pages