3

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.

1
  • 1
    the only thing I know for true crossplatform is GCC
    – cnd
    Commented Apr 19, 2012 at 5:21

2 Answers 2

4

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: https://softwareengineering.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?

4
  • 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
    Commented Apr 19, 2012 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
    Commented Apr 19, 2012 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
    Commented Apr 19, 2012 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
    Commented Apr 20, 2012 at 21:11
1

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.

3
  • 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
    Commented Apr 19, 2012 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
    Commented Apr 19, 2012 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
    Commented Apr 19, 2012 at 21:22

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