On the Make Me Pulse blog today, Antoine Ughetto takes a look at one of the more handy things in programming - design patterns. He specifically looks at the Singleton pattern this time - complete with explanations and code examples.
The singleton can be use in lot of different cases. In this example we will make a MySQL connection Singleton class. This will help us to always use the same connection.
The code not only shows how to make the class using the Singleton but how to use it in your app - calling it with a SQL statement to make your request.