blog.jj5.net (2003 to 2005)

.NET Event Handling using the Template Method Design Pattern

Thu Jan 15 00:15:00 UTC+1100 2004

Categories:

Just a quick one. Ages ago I remember seeing an article where someone was going on about what they were claiming was a new pattern, they called the 'Internal Event Pattern'. It was a good idea, and I'm sure plenty of people do the same thing, but I was going to try and dig up the article and get in contact with the author and tell him that this was just the Template Method pattern..

So I went to google and searched for “internal event pattern” to try and find the article. Before I found it I found a different article, .NET Event Handling using the Template Method Design Pattern, which is pretty much exactly what I was going to say -- now I couldn't be bothered.

There is still the problem that if you have more than one level of abstraction, i.e. several levels of derivation, then use of the Template Method falls over, the base class can get what it needs, and the sub-class can get what it needs, but some class in the middle might miss out on the notification..

I address this with my own patterns complete with naming conventions. I should post them here one day, but not just now..

John.


Copyright © 2003-2005 John Elliot