SyntaxHighlighter

Friday, August 17, 2007

Developing software in the financial industry

The new job is going great only 4 weeks in and already so much has happened. My first task was to migrate a VS2003 C# Windows application with 3rd party charting capability to VS2005 C# 2.0. That took about a week seeing as how the application wasn't very big... and since I used the MVP (Model View Presenter (Supervising Controller)) Design pattern the data was flowing very well. Then came the infamous request from my boss that most developers never want to face, but will most likely face at one time or another in there career... "Can you port that windows application in to a web application?" Luckily my use of the MVP Design pattern helped me to confidently respond "Yep! No problem..." So week two I began the journey of encapsulating the majority of the windows application logic in to ASP.NET 2.0 Web Components. These components would ultimately be used in the departments intranet site... This was looking to be a smooth transition until I got to the new major dependency of the application which was none other than a C++ COM object. Oh and did I mention the person that created the C++ code and COM object are no longer working for the company. :) So what's an experience C# developer to do... what any experience developer would do... research. So the idea is to integrate legacy code in to my modern .NET code, otherwise known as Interoperability. So I looked at my options and it turns out there is a managed C++ language known as C++/CLI and Microsoft has done a significant amount of work to not only aid in Interoperability challenges of COM, but to have the best of both worlds with performance of native(UnManaged) code and Managed code. Week three I read as much as I could on C++/CLI for C# developers by Dean Willis... a great reference to help any .NET developer come up to speed on writing C++, and since I'm new to the language it was even more of a hurdle, so I got a few native C++ books as reference as well. Overall, the main thing I needed to understand was interop between native/managed code. so by the end of
week four and the entire weekend I was able to write my own C++/CLI wrapper around native C++ API's. Awesome stuff, after a while of writing managed C++ begins to feel a lot like C#... so I began to feel right at home... I'm happy to report that I've replaced the COM object which took the guy who wrote it 3 months development time. It took me about a week and half. :) My boss was so impressed that he's considering moving me up a step to work on a C++ team. I've only been writing C++ for about three weeks time... thank god for Microsoft's work on C++/CLI.

Long story short... if you have any interoperability to do with C++ into managed code, seriously consider C++/CLI... there are a lot of options to help with seamlessly integrating with native code. Oh... and on a side note, no one on the C++ team including my boss even knew about C++/CLI so when I told them about the interop story on the white board they literally where stunned, and I of course looked very good. : )

No comments:

Post a Comment