views:

632

answers:

3

Hey there,

I work on an experienced and diverse development team and we are preparing to approach our first mobile development which will be for Windows Mobile 6 (platform changes are not an option).

We have skills and experience in both Visual C++ and .Net technologies for Windows desktop and server development.

The mobile development will include some image processing, and read/write access to a bluetooth device. Unfortunately I can't really give any more details than that.

We are trying to choose between writing the mobile client using managed code or native code. We would use C# or C++ respectively.

My questions are:

  • How big is the expected performance differential between these languages? I have heard that native code is significantly faster on mobile devices, but I would love to hear from someone with experience.

  • Are there any major advantages to either language in terms of working with the Windows Mobile services for accessing bluetooth devices?

  • Is there an impact on battery life between managed or native code?

  • Are there any other major should-knows for us to consider?

I appreciate your feedback.

+1  A: 

A very similar question was asked and answered just a few days ago. You can find useful information there.

Short answers to your questions:

  • Native code is faster, but for many applications the speed difference won't be noticeable. Don't use native code just for the speed, unless this is a key factor for your application. Managed applications can also run fast - it may take them longer to launch.
  • There is a good Bluetooth library for .NET applications. I am not aware of a similar library for C++ applications.
  • It is up to your design to achieve good battery life. Choice of platform doesn't matter.
kgiannakakis
+1  A: 

In addition to the great - and long - answer in the other question mentioned by kgiannakakis I have to add a few thoughts and points.

At my workplace we've been writing applications for Windows CE 5.0 using C++ and ATL/WTL. This ends up being nice to work with and very light compared to both MFC and .Net.

The other point to take into consideration (as explained by a senior developer here) is that the .Net compact framework needs to recompile the byte code into machine code each time the application is switched to. This could potentially take a long amount of time and processor power so be careful.

Daemin
Either your senior developer is confused about .Net's JIT compiler and how Windows CE works, or you misunderstood what he said. Either way, there is no significant performance hit from switching applications in WinCE, whether the apps are .Net or not.
MusiGenesis
+3  A: 

Another consideration is the issue of memory usage and module size. We have run into significant problems in mobile development simply trying to get the OS to load all our DLLs into memory. Unlike regular windows development, there is a very strict limit of 32Mb into which all modules must be loaded. We've had to perform a lot of very dirty tricks to get all our stuff loaded successfully. We have found that even if a user turns on the cell phone or uses a bluetooth device, the drivers for those devices would cause our application to fail because they would use up the space for our modules.

With all that in mind, we have been unable to add in support for .Net into our application, because of the extra module weight that this would have introduced into our application. You may need to take this into allowance, if your application has a lot of dependancies.

1800 INFORMATION