Wednesday, July 20, 2005

Porting from NET PC to NET CF

I'm porting a large rich client application framework (175,000+ lines of actual code) from the full .NET framework to the .NET Compact Framework (since I'm constantly having to differentiate between the two platforms I've started referring to them as NET PC and NET CF, respectively).

Here's the situation: The NET PC version of the framework was written by a large development team with no consideration for the NET CF port. Just two of us are porting the framework, and we don't have enough time to rewrite it from scratch, so we've developed some processes that will help us merge-in future features and fixes added by the PC team. To make matters worse the CF and PC versions of the framework must reside in separate version control systems (NET PC in CVS, NET CF in Starteam) so we can't even leverage the branching and merging capabilities of those tools to manage the differences between the two products.

Thirty-to-forty percent of the way through the port, we've run into a number of interesting issues and incompatibilities between NET PC and NET CF which I'll begin writing about in my next post. Besides the obvious limitations of the compact framework (many, many of the NET PC classes and methods simply don't exist on NET CF), there are major performance considerations and internal differences (bugs?) between the two .NET API implementations that cause some very hard-to-find bugs (many, many thanks to Lutz Roeder for his .NET decompiler!) when you simply move code from one platform to the other. The two of us doing the port have many years of Java development experience but had just a few months experience with C# and .NET (PC or CF) on one small mobile application, so it has been a quite rapid learning experience.

No comments:

Header photo courtesy of: / CC BY-NC 2.0