[Mono-dev] Mono is crossplatform ?

Atsushi Eno atsushi at ximian.com
Mon Apr 3 17:21:01 EDT 2006


Hello,

Flavio Medeiros wrote:
>    Hi, we are starting a (large) project that needs to be cross platform
> (windows/linux) and we are discussing about the .NET (MS framework and Mono)
> and the Java technology.
> Anyone can point me to any interesting information about projects developed
> under windows using VS.NET <http://vs.net/> (language C#) ? I know that the
> ASP.NET <http://asp.net/> support of Mono is great, but we know none about
> Winforms support. Is there any project that uses WinForms developed using
> VS.NET <http://vs.net/> that runs in Windows and Linux without problems ?
>     Is it possible or only using GTK# ?
>     Mono is realy crossplatform today on desktop apps ?

Not really. The biggest and worst reason is because C#/.NET users just
ignore cross-platform mind to work their code run on other OSes and
platforms than Windows. They rather dream too much on others' effort
while they just neglect what they should do.
Their reality is a fantasy but their fantasy is killing me.

In cross-platform talk, .NET is much worse than Java. Java people
tried to make things cross platform, though unfortunately it is not
perfect. Microsoft just gave up efforts to make things cross-platform.
There are plenty of Windows-oriented parts in the class libraries in
System* namespace.

On the other hand, under pure Mono environment, things are much more
likely to work on several OSes and platforms since our implementations
are rather careful for cross-platform.

Having said that, if users still forget cross-platform mind, it is
easily broken; for example,

	- invoking native libraries which is not cross platform:
	  we don't have kernel32.dll
	- No runtime callable wrapper in mono: COM is not love. It
	  is windows only stuff.
	- ignoring environment-dependent matters, for example:
	  - file path separators (using '/' is the best; using '\\'
	    in paths is bad; Path.AltDirectorySeparatorChar is wrong)
	  - expecting drives, illegal path character differences
	  - end-of-line (CRLF and LF)
	  - native encoding (obsolete language dependent encoding on
	    MS.NET; always utf-8 on Mono as GNOME 2.0 uses)
	- implementation dependent matters: one of the most FAQ is for
	  runtime serialization compatiblity which we can never promise
	  because they depend on Microsoft implementation internals
	  which we don't copy. They have different set of private
	  fields than ours.

This kind of differences exist by nature.

Oh, seems like there already is a explanation on how to make your
code cross-platform.
http://www.mono-project.com/Guide:Writing_Cross_Platform_applications
It tells that cross-platformness is *up to you*.

BTW I don't think this subject is not subject to the topic of mono-dev,
as some other people are already losing the point.

Atsushi Eno




More information about the Mono-devel-list mailing list