Welcome Guest, Not a member yet? Register   Sign In
General library question
#17

[eluser]stevezissou[/eluser]
The singleton pattern is used when you need a single instance of an object application wide ... in other words the object gets instantiated only once and this one instance can be accessed whenever you need it. The standard example always used is of a logging application. Is this what you are really trying to do...not the logging part but needing a single instance throughout your application?

As for the libraries/classes issue, I am having a similar organizational issue myself and just placing everything into the library folder isn't going to cut it after a while...especially if you are doing a lot of object-oriented things...like encapsulation.

I don't necessarily see a problem with using require_once() in a similar fashion to the way you would utilize import statements in Java or Python.

But if you think of a clever alternative, please post it as I would be interested in hearing your solution too.


Messages In This Thread
General library question - by El Forum - 02-05-2008, 05:11 PM
General library question - by El Forum - 02-05-2008, 08:31 PM
General library question - by El Forum - 02-05-2008, 09:03 PM
General library question - by El Forum - 02-05-2008, 10:02 PM
General library question - by El Forum - 02-05-2008, 10:58 PM
General library question - by El Forum - 02-06-2008, 09:41 AM
General library question - by El Forum - 02-06-2008, 10:40 AM
General library question - by El Forum - 02-06-2008, 11:13 AM
General library question - by El Forum - 02-06-2008, 11:26 AM
General library question - by El Forum - 02-06-2008, 11:37 AM
General library question - by El Forum - 02-06-2008, 12:00 PM
General library question - by El Forum - 02-06-2008, 12:05 PM
General library question - by El Forum - 02-06-2008, 05:08 PM
General library question - by El Forum - 02-06-2008, 05:25 PM
General library question - by El Forum - 02-06-2008, 05:26 PM
General library question - by El Forum - 02-06-2008, 11:14 PM
General library question - by El Forum - 02-07-2008, 07:06 PM
General library question - by El Forum - 02-07-2008, 07:27 PM
General library question - by El Forum - 02-10-2008, 11:24 AM
General library question - by El Forum - 02-10-2008, 10:31 PM
General library question - by El Forum - 02-10-2008, 10:34 PM
General library question - by El Forum - 02-11-2008, 08:52 AM
General library question - by El Forum - 02-11-2008, 10:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB