Difference between using C # and C or C ++ on Windows mobile devices

I am new to Windows mobile app development. I have certain doubts related to the development of Windows mobile applications, which are as follows.

1) What is the main difference between C # and C (C ++) from the choice of language for development. (not syntactically).

2) What language should I choose for development and why?

3) If I go to C # as mobile development, then can I access all APIs for C # on the desktop.

+2


source to share


8 answers


1) Apps written in native code will run faster. In addition, native applications have less memory.

2) It depends on the application you are writing. If it doesn't require maximum performance, and if it doesn't require a lot of built-in functionality, then the code must be managed. If you need more flexibility, go to native.



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

+1


source


Aside from syntax, the main difference is that C # is managed and C ++ is not (unless you are using managed C ++?)



Both languages ​​are OO (not C). C ++ allows you to manage your own memory (which can be good or bad), while C # is code-driven, so garbage collection is mostly done for you at runtime. If you are using C #, you should be able to access all other CLR-oriented managed assemblies.

+2


source


Your mileage may vary, but a few years ago we tried to develop a C # application for Windows Mobile and the performance was incredibly poor. I say, "I think it takes 10 seconds for my dialog box." I'm sure it's gotten better, but the underlying problem remains: these are devices with tighter resource constraints than desktops, and the performance you use with .NET is more likely to affect you. So go with C # if your application is in no way performance sensitive, but if you have performance issues at all, in my experience C # /. NET won't cut it out on Windows Mobile. C ++ is the next smartest choice.

+2


source


+2


source


1) Too vague to answer

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

3) No. Not all APIs are available in Compact Edition .NET.

+1


source


If you are developing an application for Windows mobile phones only, switch to any supported .Net Compact Framework language.

You can also use C ++ (unmanaged), but it all depends on the type of mobile app you are developing.

0


source


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

this seems to be due to the fact that the .net framework loads quite a few DLLs and therefore has a lot of memory (obviously this is mitigated to some extent if there are other .net applications working with shared assemblies) which results to a fairly low power consumption.

there is also jing and housekeeping going on (out of your control, in undefined periods of time, etc. - if you move a lot of memory around this can be a problem) - on lower power devices like the pda this is a constant mess in the background may become visible.

however, it is much easier and faster to execute code in .net.

if a:

  • you think "quick wins" are more important than conscientious, efficient code, or
  • You don't care about battery life or
  • your application is not performance sensitive, or
  • You don't know how to code with native languages.
  • You don't care about open standards and compliance.

then go to .net.

The .net compact framework is a subset of the desktop version of .net - so some features and aspects of the framework are not available.

If you're just starting out, I recommend .net - if you are developing a commercial solution, etc., I recommend using c / C ++.

NTN.

0


source


  • C # is often recommended when developing simple desktop or web applications, while C ++, which is directly related to hardware, is used for applications requiring higher performance.

  • I would say C #. Considering you're new to Windows mobile development, C # would be easier to implement things. Also, C # is developed by Windows, so it targets Windows applications specifically.

  • Not. you will only have a subset of the libraries for the desktop API.

0


source







All Articles