views:

287

answers:

7

Hi Friend's

I am new to windows mobile development. I have certain doubts related to windows mobile development which are as follows.

1) What is the major difference between C# and C (C++) as far as selecting language for development. ( not syntactically ) .

2) Which language should i select for development and Why ??

3) If i go C# as a mobile development then can i have access to all APIs for C# on desktop .

+1  A: 

1) Too vague to answer

2) C#, because there is a well-supported framework (.NET Compact Edition) for it.

3) No. Not all API's are available in the Compact Edition of .NET.

Noon Silk
+2  A: 

Aside from syntax, the main difference is that C# is managed and C++ isn't(unless you're using managed c++?)

They're both OO languages(not C). C++ allows you to do your own memory management(which could be a good or bad) while C# is managed code so garbage collection is mostly done for you by the runtime. If you use C#, you will be able to access all other managed assemblies targeted toward the CLR.

A: 

If you are developing application only for the Windows mobiles, go for any .Net Compact Framework supported language.

You can also use C++(unmanaged) but all depends on the kind of mobile application you are developing.

danish
+2  A: 

Your mileage may vary, but a few years back we tried to develop a C# app for Windows Mobile, and the performance was unbelievably bad. I'm talking "it takes 10 seconds for my dialog box to appear" bad. I'm sure it has gotten better, but the underlying issue remains: these are devices with more stringent resource limitations than a desktop PC, and the performance hit you take with .NET is more likely to affect you noticeably. So go with C# if your app is in no way performance sensitive, but if you have any performance concerns at all, in my experience C#/.NET will not cut it on Windows Mobile. C++ is then the next most sensible choice.

+1  A: 

1) Applications written in native code will run faster. Furthermore, memory footprint is smaller in native applications.

2) It depends on application you are writing. If it does not demand top performance and if it does not require a lot of native functionality, then the code should be managed. If you need a lot of flexibility, go for native.

3) No. .Net Compact Framework has a subset of desktop APIs.

MannyNS
A: 

I have been advised in the past to avoid the .net framework when developing for WM unless absolutely necessary.

this is apparently due to the fact that the .net framework loads quite a lot of dll's and thus has a large memory footprint (obviously this is mitigated to a certain extent if there are other .net apps running that share assemblies) - resulting in rather poor power usage.

also the jitting and house keeping that takes place (out of your control, at undefined periods of time etc - if you move a lot of memory around this may become an issue) - on lower power devices like pda's this constant messing around in the background may become noticeable.

it is however considerably easier and faster to code in .net.

if:

  • you consider 'quick-wins' to be more important than conscientious efficient code or
  • you dont care about battery life or
  • your app isnt performance sensitive or
  • you dont know how to code with native languages
  • you dont care about open standards and compliance

then go for .net.

.net compact framework is a subset of the desktop version of .net - thus certain features and aspects of the framework are unavailable.

if youre just starting out i recommend .net - if youre developing a commercial solution etc i recommend the use of c/c++.

hth.

fusi