Welcome to my WebLog

The virtual home of Alon Fliess

<December 2008>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910


Navigation

Sela

Subscriptions

News

It is impossible to know everything, but we should try!

Article Categories



Implementing Policies in .Net (Another Template vs. Generic Episode)

I just wrote an article about the need for static class interface, and why C++/CLI is (almost) the only language that (will) support compile-time polymorphism. If you are familiar with the GOF Strategy pattern, you know that it lets you change an algorithm without breaking the Open/Closed principle (OCP).  A Policy is like Strategy, but instead of runtime late-binding polymorphism, it uses compile-time polymorphism and the resulting code is a hard coded call to the specific policy implementation. Read the article to find out how to implement Policy in C# and in C++/CLI and why a static class interface is a must.

posted on Thursday, April 07, 2005 12:44 AM by alon





Powered by Dot Net Junkies, by Telligent Systems