[.net] Differences between .NET and Mono
No more than C++ and win32. It does not change much. If you wish to be portable use portable libraries SDL.net, Gtk#, neoaxis . The language C# 2.0 itself is completely compliant to mono.
The only tricky area is P/Invoke, of course. After all, the Win32 API isn't available in Linux (despite occasional attempts to hook WINE and Mono together at some level). Because of this, WinForms works a bit differently on Microsoft.NET (the implementation of WinForms is pretty much MFC for .NET: it's a OO wrapper for Win32) as compared to Mono (which IIRC does all its own UI rendering on every platform rather than mapping to what's available). You'll find a slight speed hit if you use the Mono WinForm assemblies even on Windows, but if you're running Mono on Windows there's nothing keeping you from making use of the Microsoft.NET WinForm libraries.
If you're using any cross-platform, unmanaged libraries, you'll of course need to build those for each platform, as well as separate builds of interop assemblies for each platform due to symbol/linking differences. However, if all your code is managed and encapsulated in the set of assemblies treated as .NET 2.0, it should be build once run anywhere. And as pretty much all cross-platform interop libraries provide the same public interface on each platform, using those shouldn't change that fact.
If you want all the shiny new C# 3.0 language features, then at this time you'll need to use the Microsoft C# compiler as the Mono efforts to bring their compiler up to 3.0 are still ongoing. But that's the only way one would be forced to use Microsoft's tools (especially as all C# 3.0 language features map to the 2.0 framework when you get to the IL code).
If you're using any cross-platform, unmanaged libraries, you'll of course need to build those for each platform, as well as separate builds of interop assemblies for each platform due to symbol/linking differences. However, if all your code is managed and encapsulated in the set of assemblies treated as .NET 2.0, it should be build once run anywhere. And as pretty much all cross-platform interop libraries provide the same public interface on each platform, using those shouldn't change that fact.
If you want all the shiny new C# 3.0 language features, then at this time you'll need to use the Microsoft C# compiler as the Mono efforts to bring their compiler up to 3.0 are still ongoing. But that's the only way one would be forced to use Microsoft's tools (especially as all C# 3.0 language features map to the 2.0 framework when you get to the IL code).
Quote:Original post by coldacidMono C# supposedly fully supports C# 3.0 as of last week.
If you want all the shiny new C# 3.0 language features, then at this time you'll need to use the Microsoft C# compiler as the Mono efforts to bring their compiler up to 3.0 are still ongoing. But that's the only way one would be forced to use Microsoft's tools (especially as all C# 3.0 language features map to the 2.0 framework when you get to the IL code).
Quote:Original post by mutexQuote:Original post by coldacidMono C# supposedly fully supports C# 3.0 as of last week.
If you want all the shiny new C# 3.0 language features, then at this time you'll need to use the Microsoft C# compiler as the Mono efforts to bring their compiler up to 3.0 are still ongoing. But that's the only way one would be forced to use Microsoft's tools (especially as all C# 3.0 language features map to the 2.0 framework when you get to the IL code).
Awesomesuace. Thanks for the tidbit.
Whatever about c#, I don't think .NET is cross platform in any meaningful way.
most commercial .net apps are using 2.0 and mono still hasn't that fully implemented.
Also, I heard that win forms was just a thin wrapper around the win32 api. That's hardly good for a cross platform api.
When someone ports a real application to Mono then I'll take more it seriously. (by real application I mean something complicated like the Multiverse client)
most commercial .net apps are using 2.0 and mono still hasn't that fully implemented.
Also, I heard that win forms was just a thin wrapper around the win32 api. That's hardly good for a cross platform api.
When someone ports a real application to Mono then I'll take more it seriously. (by real application I mean something complicated like the Multiverse client)
Quote:Original post by captainfreedom
Whatever about c#, I don't think .NET is cross platform in any meaningful way.
most commercial .net apps are using 2.0 and mono still hasn't that fully implemented.
Also, I heard that win forms was just a thin wrapper around the win32 api. That's hardly good for a cross platform api.
When someone ports a real application to Mono then I'll take more it seriously. (by real application I mean something complicated like the Multiverse client)
Well they did get started on Paint.NET but I don't know how that is going?
Quote:Original post by captainfreedom
Whatever about c#, I don't think .NET is cross platform in any meaningful way.
most commercial .net apps are using 2.0 and mono still hasn't that fully implemented.
Also, I heard that win forms was just a thin wrapper around the win32 api. That's hardly good for a cross platform api.
When someone ports a real application to Mono then I'll take more it seriously. (by real application I mean something complicated like the Multiverse client)
Unity is a complex tool that lets you build commercial games for Mac, Windows, Wii, iPhone and even embedded into a web-player. It uses Mono for *all* scripting duties, including your game logic -- about 90% of any Unity game's logic will be in script form. In other words: it'll be running as compiled Mono scripts.
Oh yes, I meant that "commercial" bit. People actually use this tool to build games for *sale*, not just as a hobby. Unity is even being used by the likes of Cartoon Network for an up-coming MMO.
So that's real, bona-fide Mono scripts, running in a commercial MMO, on multiple platforms. Today.
Sure, Mono's libraries have a few gaps left to fill, but that's true of any library: they're almost always works in progress. Nevertheless, Mono is very clearly cross platform in perfectly meaningful ways already.
Quote:Original post by captainfreedom
Whatever about c#, I don't think .NET is cross platform in any meaningful way.
It's too bad that it doesn't matter what you think. The facts of a situation don't change based upon how you feel about them.
Quote:most commercial .net apps are using 2.0 and mono still hasn't that fully implemented.
While it's true that most commerical .NET apps use 2.0, the second half of your statement is false. .NET 2.0 is supported by Mono, and even some C# 3.0 features are also implemented. Windows.Forms integration isn't complete, but it's close enough to be usable for the majority of projects.
Quote:Also, I heard that win forms was just a thin wrapper around the win32 api. That's hardly good for a cross platform api.
You heard incorrectly. Try doing a bit of research before spouting things off.
Quote:When someone ports a real application to Mono then I'll take more it seriously. (by real application I mean something complicated like the Multiverse client)
Here is a small list of some of the successful projects using Mono. Since you said that when somebody ports a real application to Mono you would take it more seriously, are you going to do that now?
Quote:Original post by Mike.PopoloskiQuote:Also, I heard that win forms was just a thin wrapper around the win32 api. That's hardly good for a cross platform api.
You heard incorrectly. Try doing a bit of research before spouting things off.
Oh, okay, here's the reseach you asked for:
http://www.ondotnet.com/pub/a/dotnet/2003/11/24/longhorn_01.htm?page=last&x-maxdepth=0
"Many of the classes in the Framework Class Library are wrappers on top of Win32 functionality. For example, Windows Forms puts a .NET face on classic Win32 features such as HWND, MSG, and WndProc. Likewise, the various classes in System.Net and System.Net.Sockets ultimately wrap the services provided by the Windows Sockets API in Win32. "
but funny, you seem to spout quite a bit yourself
Quote:Original post by captainfreedomQuote:Original post by Mike.PopoloskiQuote:Also, I heard that win forms was just a thin wrapper around the win32 api. That's hardly good for a cross platform api.
You heard incorrectly. Try doing a bit of research before spouting things off.
Oh, okay, here's the reseach you asked for:
http://www.ondotnet.com/pub/a/dotnet/2003/11/24/longhorn_01.htm?page=last&x-maxdepth=0
"Many of the classes in the Framework Class Library are wrappers on top of Win32 functionality. For example, Windows Forms puts a .NET face on classic Win32 features such as HWND, MSG, and WndProc. Likewise, the various classes in System.Net and System.Net.Sockets ultimately wrap the services provided by the Windows Sockets API in Win32. "
but funny, you seem to spout quite a bit yourself
Of course, the current implementation of the .NET Windows.Forms namespace (and indeed, many other namespaces in the .NET framework) delegate to Win32 counterparts. However, this does NOT mean that the underlying implementation cannot be rewritten for another OS. That's basically the whole point of having a standardized interface. It makes it easy to swap out the back end. Which is exactly what Mono did. The back end for WinForms in Windows is Win32, yes, but on other platforms other native GUI systems were used.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement