| In this article I will explain how I solved a common problem I used to have regarding logging within my business layer. Normally, I would have a function call from my presentation layer to my business layer, however once in the business layer; I had no access to the presentation layer anymore. There are many ways to solve this problem, in the MFC days, a Doc / View approach based on the Observer pattern was used. In .NET we can use custom events to notify the presentation layer something happened. But, in this article I will show the Composite pattern in action and some of its nice advantages. |
| |