Tuesday, June 07, 2005
Policy-Based Design in C++
I've just recently found an excellent article about Policy-Based Design in C++ by Andrei Alexandrescu.
Quoting from the article:
Very interesting stuff, worth giving it a try.
Quoting from the article:
In brief, policy-based class design fosters assembling a class with complex behavior out of many little classes (called policies), each of which takes care of only one behavioral or structural aspect. As the name suggests, a policy establishes an interface pertaining to a specific issue. You can implement policies in various ways as long as you respect the policy interface.
Very interesting stuff, worth giving it a try.
Labels: c++



2 Comments:
You should be careful about aspect oriented things as they violate everything encapsulation gives you.
By
Per, at 11:37 AM, June 29, 2005
Look at some of the articles I have posted on code projects which explains policy based design.
e.g
Generic Pool: Policy based design : http://www.codeproject.com/library/Generic_Pool_Design.asp
Queue Manager: Policy Based Design : http://www.codeproject.com/threads/Queue_Manager.asp
Memory Map Class : Policy Based Design: http://www.codeproject.com/file/Memory_Mapped_Class___PBD.asp
By
Rohit Joshi, at 4:47 PM, June 27, 2006
Post a Comment