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.

I have always preferred cross platform development over most other concepts as long as I can remember. Which is one of the reason I never got into .Net. Currently, I use php/javascript/python as my primary languages of choice for web development. Which I also have been using at work.

But the need to learn c# has come up and one of the windows guys has been teaching me c#, so I am still very new. I have really liked the language. I have also been brainstorming on an app that I have been wanting to make for some time and have not determined the best way to build it. The main system will be online where users can log in and do everything. But I also want to make a desktop client that ties into and syncs the users content with the server (considering using couchdb for my particular use case for this app). They should be able to do everything the web app can. I would like to launch to linux, windows, and mac as well as make mobile versions.

In learning c#, my co-worked recommended I look at Mono, so I can use .Net as a cross platform system and even possibly use asp.net for the main site. So I am hoping to get some insight on where I could go. It seems as if I used .net with mono, I could reuse a lot of code for web and mobile using monodroid/monotouch.

But then how could this setup compare to using something like sencha touch for making a mobile version and node.js for the server side (am fairly proficient with JS and php already, I just need to learn c#/.net for work and would like to learn it more anyways). Or is there anything else I should consider?

I'm not really asking which method is better, I just want to know what options I have, which I could then make a calculated decision based on my needs and further research. Such as what features would the .net/mono route have that I would not in sencha/node.js, and vice versa (node.js is awesome at real time uset to user interaction, for example)

I am just looking for some insight and advice, and help woudl be greatly appreciated.

share|improve this question
1  
the only thing I know for true crossplatform is GCC –  Heather Apr 19 '12 at 5:21
add comment

2 Answers

up vote 4 down vote accepted

I would not suggest taking the existance of Mono as implying that C# is a cross-platform development language. You can see my reasoning and answer to roughly the same question here: http://programmers.stackexchange.com/a/20329/8068

Here's a link to the question as well:
Mono is frequently used to say "Yes, .NET is cross-platform". How valid is that claim?

share|improve this answer
2  
This is a very valid and a very relevant observation. Porting apps to mono is simple, yes, but by no means is it trivial. There are many pitfalls. I'd had to port a WinForms/C# 2.0 app to mono and there were a handful of quirks to work around. If you're porting something already existing/specific to your needs, Mono does fine, but I'd stay away from starting anything cross platform on .NET. –  Bhargav Bhat Apr 19 '12 at 5:22
    
Yes those are very good points. I see that c# itself is cross platform, but its the features I want to use that may or may not supported in a given system. That makes sense. So mono primarily is the making of .Net libraries work on other platforms, not C#. –  skift Apr 19 '12 at 15:52
    
But this still makes me wonder, with the things I want to do, would using C# and mono/.net be a smart choice, or could it be better to pick a different platform. So far it seems like using C# and mono could work as long as I am willing to make a UI for the different platforms, like web and mobile (which I could do both with html5 and web views on the mobile platform which are known to work well with things like sencha touch and others. but that's another discussion I think.), and desktop (maybe gtk too) –  skift Apr 19 '12 at 15:56
    
C is just as cross-platform as C# (arguably significantly more so). What always gets you is the platform-specific API; the UI bits and such. Same story for perl, python, haskell, lua, and just about any other language you care to mention. –  tylerl Apr 20 '12 at 21:11
add comment

Disclaimer: I'm not an expert in .NET, by a long shot.

With Mono, you can run server-side / CLI C# code everywhere. Performance may differ, but for a client-side app this should not be an issue.

GUI code is not that portable, but must be relatively easy to port in simple cases. This does not allow for native look and feel, though; for that, you could consider platform-native toolkits.

share|improve this answer
    
Performance difference is another thing I have on my checklist of things to look at to determine if it is the route I want to go. As with the GUI, for a desktop version I could use something like GTK, or just build each independently in the proper way for each OS. Which linux would use GTK anyways. Web would be standard HTML5/JS/Canvas. I was also wondering if I could even have a basic window and embed a webkit window in there so I could use the websites UI locally. But I'm not sure about that yet and need to look into that possibility more. –  skift Apr 19 '12 at 16:00
    
@luckysmack: unless you need desktop-only features like integration with other programs, drag and drop (except for the simplest cases), something heavily multimedia-based, you might be well off with just a Web UI running in a browser. You could cache heavyweight resources locally for speed, and stop worrying. (That's how e.g. Angry Birds run on my desktop.) –  9000 Apr 19 '12 at 16:35
    
I had asked another question based on this premise, and may end up using Webkit.Net, which could work perfectly in my case, especially since I wont have anything graphically intensive, just what you would see in a browser. –  skift Apr 19 '12 at 21:22
add comment

protected by GlenH7 Nov 15 '13 at 14:34

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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