in reply to AutoLoader - when to use it?
1. Create an autoloader.
2. Regexp against the method name.
3. If the regexp matches, do something.
4. Call the original function.
Another pattern, is if you do any setXXX type things, write it out to the db. Now mind you, this may be quite sub optimial, but there have been instances where it is useful. Such that, if you have a UI, and someone changes the data, you dont' have to have the UI invoke something to save, but the proxy object would save automagically. It, in some ways, make your API a little more user friendly.. but it can and will take a performance hit if not done properly. Write through cache or something may be of use in that instance.
----
Then B.I. said, "Hov' remind yourself
nobody built like you, you designed yourself"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: AutoLoader - when to use it?
by tilly (Archbishop) on Oct 25, 2004 at 16:15 UTC | |
by exussum0 (Vicar) on Oct 25, 2004 at 16:42 UTC |