This is a discussion on Interface pattern or component customisation pattern? within the Software Patterns forums, part of the Testing category; Hi I have now spend at least 6 months researching patterns on and off. Read books as well. But i ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Interface pattern or component customisation pattern?
Hi
I have now spend at least 6 months researching patterns on and off. Read books as well. But i still feel i am not coming to grips with them very well. I have found a particular technique that is used in 'cxerces' (XML parser) and i would like to know if it was perhaps written after a pattern. Think i should actually ask the designers, but anyway ... In short: xerces library allows clients to supply their own error handler object which is then used to handle errors. The client then calls the library to parse XML file and if there are errors the supplied error handler will do what ever the client instructed it to do. The library actually provides an interface class (in C++) from which the client derives their own class. This looks to me like something very common because it allows for customisation of a library (or a component if you like) in a type safe manner. I have identified two or three patterns (whose names i forgot now) which seemed to kind of match the above description but i was never satisfied with the match. Is there a pattern which describes this behaviour/solution? What am I doing wrong? Martin. |