Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

C# (and the .net platform in general) is looking like it's becoming a good option form multi-targeting apps :

  • official MS .net framework : full blow windows development, asp.net dev, Windows phone Dev, etc.
  • mono and all its derivated : monotouch, monodroid : the rest of the world. This tools are today RTM.

  • Does it means that C# is becoming a good language for targeting the most popular platforms : desktop, web and mobile ?

  • Is it still better to use the "native" language of target platforms (objective C, Java, etc.)
  • Is it only a screen of smoke and only marketing language ?

Please note that I'm actually conscious I won't able to copy/paste the code between platforms. But I'm sure the lower layers of applications (models, business, etc.) can be reused, but I know I'll have to adapt the higher layers (Gui, etc.) to the platform. My goal is more focused on required skills than technical code sharing.

[edit] I am a c# developer in a company that massively use c#. That's why I talked about c# in a plan to expand the range of target platforms in my company.

share|improve this question

migrated from stackoverflow.com May 10 '11 at 11:49

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers

up vote 10 down vote accepted

Yes, in general, the .NET Framework is great for apps that target a broad range of devices. But this isn't unique to .NET; Java was doing that long before. The thing to keep in mind is that there's no real alternative to the native tools for a particular platform.

The Mac applications that you create with .NET will never look like native Mac OS X applications, and that's considered a problem by the vast majority of OS X users. That may not be important to you strategically, depending on whether your business model values maximizing saturation over maximizing user satisfaction, but it's certainly something to keep in mind when making a choice.

The GUI systems in Linux and Windows are somewhat more flexible in terms of which applications look "native" and fit in well with the platform. But I blame that mainly on the lack of clear interface guidelines and the fact that application developers have historically been willing to ignore the ones that do exist. Many Mac users prefer the Mac precisely because of its consistent user interface.

Considering that you'll have to adapt the GUI layer to the specific platform (and possibly rewrite it in a different language entirely, such as Objective-C), that leaves you leveraging the .NET platform only for library code. And then there's not a very clear win for C# over C++, in my opinion.

For rapid application development, there are few alternatives that are better than C# and .NET. And pushing an app out quickly and having it immediately available on a diversity of platforms is certainly a business advantage. But for true multi-platform applications that aim to truly satisfy the user, it's not necessarily the silver bullet solution.

share|improve this answer
6  
"The Mac applications that you create with .NET will never look like native Mac OS X applications,...". Let me introduce you to MonoMac: mono-project.com/MonoMac –  Dimitris Tavlikos May 9 '11 at 10:57
3  
@Dimitris: Let's just say I'm skeptical, at best. The Qt folks tried this, and people still jump up and down about their having achieved it. They're wrong: they haven't. Qt applications do not look like native OS X applications. They're just...wrong. I don't see any screenshots in the link you suggested, but even if they get the UI perfect, they'll still be missing all of the behavior and implementation details. Thanks for the reference, though. It's something to be optimistic about. –  Cody Gray May 9 '11 at 10:59
5  
@Cody Gray: MonoMac looks and acts native because it's not a cross platform API, but instead natively wraps the underlying Cocoa API. It looks and acts native because it IS native. –  jonp May 9 '11 at 11:11
1  
@Cody Gray: MonoMac is to Mac what MonoTouch is to iOS. You can write native apps, you just use C# instead of Obj-C. It is not "make WinForms or Gtk look good on Mac". –  Dimitris Tavlikos May 9 '11 at 11:50
1  
@jonp: So MonoMac isn't good for a write once/run everywhere sort of Holy Grail? And it does produce applications an avid Mac user will accept? –  David Thornley May 10 '11 at 16:00
show 8 more comments

Microsoft .NET is the official CLR, DLR, BCL, CLI and CLS implementation. Other companies, groups, communities or workgroups aren't associated with Microsoft in a way that these can have a 1:1 implementation of latest framework and language version.

Basically, you need to review which language and framework features you'd like to take advantage in a concrete project and check if these are present in unofficial .NET implementations.

If you're expecting a compile-once solution and distribute everywhere, you're wrong: you need to make a case study.

share|improve this answer
add comment

I use C# on games running on XBOX and Windows machines, I use it in Compact Framework apps for robotics solutions, I use MonoTouch for iPad development, I have some web apps running on Linux and few other solutions. Usually there is a way how to do your thing on a given platform. The core layer is about the same for most of them (case study needed indeed). The problem - and I consider it as a series one - is the development environment. I am used to Visual Studio and its features. But MonoDevelop for example drives me nuts.

share|improve this answer
1  
Novell recently released A VS 2010 extension so you can develop Mono code in VS. –  Morgan Herlocker May 12 '11 at 13:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.