[Mono-devel-list] Cross Platform .NET Architecture

Rafael Teixeira monoman at gmail.com
Mon Mar 14 14:57:05 EST 2005


There's not a single answer.

Sometimes we just let the problem in 'nativeland',  either by
duplicating some windows native library outside windows (libgdiplus.so
is our version of gdiplus.dll for use in System.Drawing), or having
multiple platform-dependent versions (GTK for X and for Windows) just
wrapped needing at most some p/invoke remapping in the dll config file
(mono specific extension).

Sometimes  we have some (kept to the possible minimun) run time
checking for platform to choose code paths (p/invokes are resolved
only at first-call).

And sometimes (mainly in the makefiles) we use some defines or
specific targets/rules, so that some things aren't built or are
differently built according to the target platform.

One of the trickiest parts in developing for multiple platforms are
the mass of unit tests, and we have thouroughly used Nunit's support
for categories to be able to keep the situation manageable.

Well I may not give any better hope, but I hope it helps.

As for your Idea with attributes, we just have the p/invoke remapping,
but nothing with a conditional behaviour...

Fun, :)

On Mon, 14 Mar 2005 11:16:42 -0800, JD Conley <jd.conley at coversant.net> wrote:
> I included this question as a side-note in another thread but I think it
> deserves its own.
> 
> Is there any documentation on how Mono sets up its class library
> projects for cross platform .NET development?  It seems like there would
> be some interesting ways you could do this with attributes rather than
> having IF DEF's everywhere.  Is there a particular subsystem I could
> look at for a good example of how to do this in my own projects?  In an
> ideal world we wouldn't have to write any platform specific code, but
> this probably isn't going to happen in my project any time soon.
> 
> Any guidance would be appreciated.
> 
> JD Conley
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 


-- 
Rafael "Monoman" Teixeira
---------------------------------------
I'm trying to become a "Rosh Gadol" before my own eyes. 
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
It hurts!



More information about the Mono-devel-list mailing list