PDC05: Day One (Managed/Native Interop Patterns)
Anson Tsao picked up where Bray left off with "Managed/Native Interop Patterns." His core position was that most developers will not be in a position to completely rewrite some significant block of code. The best approach to get the new libraries like WCF (Windows Communication Framework) and WPF (Windows Presentation Framework) and WinFX (the new Win32?) into usage is refactoring. With this baseline he proposed a number of great patterns to make refactoring the new model into place much easier. They all seemed to fall into Facade, Bridge or Adapter extensions. From what I can tell interface-based-programming is the new coding religion in Redmond, which is by no means a bad thing.
There is one particular slide which outlines a design for a WinFX adapter pattern which I really want to show people at work, but the slides are not online for me to reproduce here. During the question and answer period a vital caveat came out. One of the attendees asked about how much would have to be recompiled with the /CLR switch to implement some of these suggestions. Tsao leaned toward as little as possible and pointed out that Quake II is 15% slower if you compile the code unchanged with the /CLR flag. The process working set is also significantly affected. A good rule of thumb for the cost of managed code interop is that the cost is proportional to the number of parameters in the method.
Unfortunately, the next person Nikola Dudar (blog) spoke about MFC and WPF, and since I do no work with MFC I am instead sitting here writing this entry.
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home