views:

155

answers:

4

For a long time now, I've largely developed using open source languages, toolkits, etc. on Linux and Mac. A new project, though, is about to shove me into the .NET world. Moreover, a .NET world whose products will be deployed to a Windows infrastructure.

In my mind, I made the assumption that I wouldn't be able to develop for this platform combination on Linux using Mono due to underlying architectural differences, but it's no more than an uninformed assumption at this point. Can someone can verify or debunk that assumption?

Thanks.

+1  A: 

Well it should work for some projects but at some point you will want to leverage some technology like MSMQ or some other Windows Centric Service and that will gradually force you towards the Windows Platform during development.

Oliver Weichhold
just say no......
kenny
+3  A: 

I think you can, only the other way (develop on windows with .NET and run on mono) is problematic, because of the lack of some library implementations in mono. However, you don't really gain anything from mono (and monodevelop, the IDE), unless you are an open-source enthuasist. (Also, there are some concerns about the openness of these tools among the open source community).

Tamás Szelei
Well, the company isn't changing direction, so I'll only have to worry about Linux -> Windows. This is much better news that I'd hoped for.
Rob Wilkerson
By the way, the most problematic part is the GUI: Windows.Forms still lacks some bits in mono, and you don't have a designer in monodevelop. However, if you decide to use Gtk# you solve both problems. It will have an additional dependency (which is mostly present on linux, but absent on windows: gtk).
Tamás Szelei
+2  A: 

The framework should abstract you from the platform differences and I believe Mono produces MSIL code so there's no reason you can't develop for Windows on Linux or a Mac.

I would just be aware that the Mono framework isn't up-to-date but it's pretty good from what I've seen.

I should also add that I've not tried this myself but I don't believe there's a barrier to stop you.

Remember that the CSC (C# Compiler is free (part of the Windows SDK) as are the Visual Studio Express editions and also SharpDevelop (also OSS)) so lots of options for you.

Lazarus
Also forgot MonoDevelop, a nice IDE on Linux and the Mac (I'm dabbling there myself also) based on the SharpDevelop code I think.
Lazarus
Mono is good unless you need something that's not implemented in it. And this will always be the case. And they said they won't implement WPF because it's "over-engineered".
Tamás Szelei
Any framework is good until you need something that's not implemented although of course the overhead in doing it yourself is significantly higher when dealing with a multiplatform environment. As for WPF, it is a bit over-engineered with a huge learning curve. Uptake is so slow I think MS will deliver another solution before it gets a chance to become ubiquitous.
Lazarus
@Lazarus - My intent was to roll with MonoDevelop on Linux. When I last checked, it wasn't available for Mac without a lot of pain. May have to look again.
Rob Wilkerson
@Rob- Do, I've used it albeit briefly and it works. http://monodevelop.com/Download/Mac_MonoTouch
Lazarus
+2  A: 

I think the answer is a little more nuanced than that. You can think of Linux/Mono as a .NET target platform, just like Windows XP with .NET 2.0, Windows Vista with .NET 3.5, etc. Depending on what you want to do, it can be entirely possible to develop .NET code that is compatible with multiple platforms.

When Microsoft submitted .NET to ECMA as a standard, the submitted a subset (called the CLS, common language specification) of what they provide to developers. To give one important example, Windows graphics (Forms, ASP.NET, etc.) isn't a part of the CLS. However, Mono does now support Windows forms 2.0, but it wasn't until relatively recently.

So, basically, you've got to pay close attention to what features you need, and if you like living on the cutting edge of Windows technologies, you're going to be locked out of using Mono. However, if you have the ability to pick which libraries and language features you want to use, you could, if you chose, select a set that is fully supported on Mono, and do much of your work that way.

Testing, of course, is another issue...since you've got completely different implementations, you're still going to need to do a lot of testing on Windows. Remember, Java's design goal was platform independence, but .NET's was language independence, NOT platform independence. So, you would be heading into trecherous waters...

Nadim
Yeah, that's been my concern. I don't want to do a boatload of work only to find that it won't run where I want it to run. Maybe I'll start simple, test frequently and see how it goes. I can always switch over to Windows if I need to, I guess.
Rob Wilkerson