Archive for the ‘Development’ Category

Speed up page loads using Cache PHP

At work we pull ranks for how key-phrases ranked on certain search engines once a week. We have many clients and each client has multiple key-phrases and each key-phrase has ranks for multiple search engines. This information is stored in the database. This information adds up more and more over time. So the longer a [...]

Read the rest of this entry »

Decorator pattern PHP

The Decorator Pattern uses composition and delegation instead of inheritance. Inheritance can lead to inflexibility, duplication, and an explosion of classes as your inheritance gets deeper and more complex. By using the Decorator Pattern we are able to modify the functionality of concrete components of a object at runtime.

Read the rest of this entry »

Using MySQL Index to speed up the loading of web pages

The loading of our client information pages at work has been taking longer and longer over time. We have cached as much as we can to help solve this problem. There is only so much we can cache being that these pages are very dynamic and permission driven. Then we looked into MySQL indexes to [...]

Read the rest of this entry »

Refactoring Code for OOP (Object Oriented Programing)

Refactoring is the process of taking a running program and adding to its value, not by changing its behavior but by giving it more of these qualities that enable us to continue developing at speed. Refactoring can also be thought of as making changes to code without change the observable behavior of the software. Adding [...]

Read the rest of this entry »

Creating a GrooveShark Music Widget on your Website

I found that you can create a GrooveShark Music Widget on your own website made from one of your playlist on GrooveShark. First thing is to goto GrooveShark and create an account so that your playlist will last. Next is to create a playlist on GrooveShark of songs you would like played on your website. [...]

Read the rest of this entry »

PHP Strategy Design Pattern

PHP Strategy Design Pattern Strategy Design Pattern Is an abstract base class that implements by inheriting classes that can be instantiated into concrete objects. Strategies can be used for deciding what type of image to create(.png or .jpeg) or what type of compression to use(.tar.qz or .zip) when zipping a file, determined by what system [...]

Read the rest of this entry »

Factory Design Pattern for PHP

The factory design pattern uses a static method inside a factory class that receives some input and according to that input decides what class instance to create as a concrete object. This solves the problem of when you do not know the kind of object that will be needed till run time.

Read the rest of this entry »

Multiton Design Pattern for PHP

The Multiton Design Pattern is a variance on the Singleton Design Pattern. The Multiton Pattern expands on the Singleton concept to manage a associative array of named instances as key-value pairs or a Registry of singletons. The multiton pattern ensures a single instance per key.

Read the rest of this entry »

Singleton Design Pattern for PHP

The Singleton Design Pattern is for an object that handles a centralized operation in your application. The first time you call the constructor a single instance is created and every other time after that you call the constructor that same instance is returned.

Read the rest of this entry »

Steps to writing a class

These steps were written for me by Steve Phillips (visual77.com). I believe by following these steps you will end up with a well written class.

Read the rest of this entry »
 
Stop SOPA!

SOPA breaks our internet freedom!
Any site can be shut down whether or not we've done anything wrong.

Stop SOPA!