Using hooks is a quite simple but also powerful approach of extending the core or even other extensions. At least it helps you to get rid of the XCLASS dilemma in many situations
Let's summarize the steps which are necessary to use a getUserObj hook:
Locate a possible hook in the script you want to extend. If there is none, suggest a new hook to the source's author
Create a new class for each function you want to extend
Create a method for each hook you want to use. It is named after the method called in the hook itself. Use the same interface for your function which is defined in the hook.
Register your class by adding your extension name, filename and classname to the appropriate place in the global $TYPO3_CONF_VARS
Study the source you want to extend and know what you are about to do!
The main differences when using the a callUserFunction hook instead:
make sure that your class containing the user function gets included (by require_once)
all parameters are passed in a single array, the second parameter contains a reference to the parent class.
You may collect all userfunctions in one big class, it's up to you.
At the time of this writing, the hook discussed in this article is only available in the latest CVS version of TYPO3's core (namely the HEAD branch for the upcoming version 3.7.0).
If you would like to try the examples yourself, you'll have to checkout the CVS version or just wait for 3.7.0 being released ...