View Single Post
08-06-2008, 04:01 PM
Join Date: Apr 2008
Location: Cloud 9
I'm using a Database Connection class in a web app I am writing as I find myself calling the same functions often.
I was looking into using Aggregation in order to achieve this when I came across this article:
Page 2 - Object Interaction in PHP: Introduction to Aggregation, part 1
But it says:
If we talk about performance issues, the advantages of aggregation mainly come from its lower overload, since most of the time only one object is shared by other objects. However, this advantage might be discarded in the case of having a class for database connection shared by other multiple classes. You may run into difficulties if multiple database connections are established to the same server, causing a noticeable detriment to the system, particularly if your site is attracting many visitors.
I was wondering if I could get around this using PHP5s features by cloning the object then unsetting it each time i'm using it, or if there any other alternatives?
View Public Profile
Send a private message to Jenski
Visit Jenski's homepage!
Find More Posts by Jenski