Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 1049 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C# vs. C++ in a cross-platform project

#1
My team is planning to develop an application that is initially targeted for Windows but will eventually be deployed cross-platform (Mac, Linux and potentially embedded devices). Our decision is whether to use C#/.NET or generic C++ (with Qt as the user interface library). We’re projecting that by using C#, we can develop our product faster and at a lower cost due to the increase of productivity over C++, but we’re taking a gamble on whether cross-platform implementations of C# will be mature enough at the time when we want to roll out to other platforms.

Any suggestions from any of you who have been in a similar situation?
Reply

#2
My gut feeling here would be to go ahead and develop fully in C#. If and when you get cross-compatibility issues, rewrite the necessary sections in C/C++ DLLs/shared libraries. [Apparently Mono can indeed handle shared libraries on a platform-specific basis][1].

Depending on what you're doing, this might end up being totally unreasonable, but you would still get to keep the rapid Windows development, and you would have to only rewrite parts of the application in C++, not the whole thing.


[1]:

[To see links please register here]

Reply

#3
Take Java/Scala into consideration. One of the most wonderful developer IDEs IntelliJ IDEA is written in Java - take a look.
Reply

#4
If you don't mind the non-native look in Windows (which is apparent even with the "windows" skin that GIMP uses), you can use Gtk# and Mono. When it comes to UI stuff, i've found Gtk# to be easier and more intuitive (from a programming PoV) than the .NET framework. On the other hand, debugging will probably be easier if you use .NET.
Reply

#5
I have no experience in this scenario, so this is worth what it's worth... I would probably use .Net, but would always target Mono. This would mean a much less risk of using MS implementation of .Net and becoming inadvertently dependent on some feature still not implemented in Mono, hence destroying your portability to platforms other than Windows.
Reply

#6
Again a question where the answer is: It depends! (Skill of your programmers in C# and C++ and if they're really much faster in C# and so on).

Just a Remark:
[The Mono Project][1] delivers a platform (Version 2.0 supports to up .NET 3.0) which can be used on Macs or Linux systems. Including microsoft code sugar like LINQ.


[1]:

[To see links please register here]

Reply

#7
If you are doing C++ and the GUI is important, [wxWidgets][1] looks "Native" on all platforms. It is worth taking a look at it.

If you are all good with C# I would definitely consider it - for productivity.


[1]:

[To see links please register here]

Reply

#8
Despite all the potential cross platform capabilities of Mono, today, C++/Qt is simply a much more mature option than either C#/WinForms or C#/Gtk# for cross-platform purposes. Any productivity gains you would get by using a higher-level language would likely be offset by dealing with limitations of Mono.
Reply

#9
Potentially which embedded devices? If they won't work with .NET or Mono, you'd be cutting off the possibility if you go with C#. (It doesn't have to be an OS issue; some embedded devices have strict memory or performance limits, which .NET/Mono might exceed.)

If that isn't critical, there's a whole lot of factors to consider. Does your project use what would be standard .NET features, or are you likely to strain Mono? Is this a case of knowing C# and not C++, or do you just have better experience with C#? (If you're better with C++ than C#, then C# is not likely to give productivity benefits on one project, and you should just go C++ and get C# experience on something less cross-platform.) How important is getting a version out fast on Windows? (It could be vital to get a first mover advantage, or minor if you're doing something less time-critical.) How much will you benefit from Mac and Linux versions (usually more than their market share would indicate, since there's less competition)?
Reply

#10
The approach I have taken with many cross-platform projects is to write the "core" of the project in a very portable language (C++), and then implement the UI (and anything else that is OS-dependent, e.g. some types of data access) in a language that was efficient for that task on the various platforms.

Just wanted to point out that you aren't stuck with choosing just one language.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through