[mono-android] .NET 4.0 + library's

Rockford Lhotka rocky at lhotka.net
Fri Mar 25 12:36:19 EDT 2011


I'm about to release an alpha of CSLA 4 version 4.2, which provides
consistent support for building a business layer across .NET, SL4, WP7,
MonoTouch, MonoDroid, and mono.

 

For those unfamiliar, CSLA .NET is one of the more widely used open source
development frameworks for .NET.

 

With some care, it is entirely possible to take a codebase, even as large
and complex as CSLA .NET, and make it work across all these somewhat
disparate platforms.

 

The bulk of the work with CSLA was when Silverlight 2 came out, and we
reworked the framework to support both .NET and SL2. Once that was done, it
has been relatively easy to port to SL3, SL4, and WP7. The WP7 codebase
translated almost directly to MonoTouch and MonoDroid (we had to
re-implement ObservableCollection - that was probably the most effort). The
.NET version ported to mono with little effort as well (we just had to clean
up some erroneous references to WPF types).

 

Rocky

 

 

From: monodroid-bounces at lists.ximian.com
[mailto:monodroid-bounces at lists.ximian.com] On Behalf Of Steven Taylor
Sent: Friday, March 25, 2011 11:00 AM
To: monodroid at lists.ximian.com
Subject: Re: [mono-android] .NET 4.0 + library's

 

How possible is it to have core application code (MINUS UI) that runs on
both Touch + Droid?  I'm trying to justify the mono approach.  In principle
it sounds like a good idea.

 

thanks,

-Steven

On 23 March 2011 19:20, Wally McClure <theevilprogrammer at hotmail.com> wrote:

I get this question alot.  This is the situation across all of the mobile
platforms.  there isn't a clean version of .NET on the devices that I am
familiar with.

*	MonoTouch on iPhone supports .NET 2 with a lot of features from SL
and .NET 3.5(LINQ being a big one).  I believe that the next MT version will
add many .NET 4 features.  I'm telling people its .NET 3.5 with certain
changes appropiate for iOS and that the next version will be .NET 4.
*	Same is true with Mono for Android, except, that they have many of
the .NET 4 features already, such as the PFX features.  I'm telling people
its .NET 4 with certain changes appropiate for the device.
*	WP7 has the same issue.  It is basically SL 3 with more features.

 
It just makes it easier in people's minds.  
 
> From: jpryor at novell.com
> Date: Wed, 23 Mar 2011 09:36:37 -0400
> To: monodroid at lists.ximian.com
> Subject: Re: [mono-android] .NET 4.0 + library's 


> 
> On Mar 23, 2011, at 8:32 AM, Remco Jansen wrote:
> > I got a simple question, because cant find the answerers on the
internet.
> > Is .NET framework 4.0 supported, are there any often uses library's,
that are not supported?
> 
> That's not specific enough. :-)
> 
> The class libraries that Mono for Android provides is...interesting.
Succinctly, it's a .NET 4.0-influenced assembly set with an overlapping set
of Silverlight types and members, lacking the UI bits. (Which likely doesn't
help at all.)
> 
> Instead of asking about framework versions, you should instead ask about
types (and possibly assemblies). :-)
> 
> For example, the Action<...> and Func<...> family of delegate types are
supported, up through Action`16 and Func`17, which is what .NET 4.0 and
Silverlight support.
> 
> However, the IEnumerable<T> interfaces are not covariant, and thus is like
Silverlight. The C# compiler we provide on OSX is C#4-ish (it supports
generic variance declarations, but no `dynamic`, and generic variance isn't
entirely helpful when most of the class library is lacking support...).
> 
> Assemblies are .NET 4.0-like, not Silverlight-like, so the System.Net
namespace is in System.dll (not System.Net.dll). System.Xml.dll contains
XmlDocument and System.Xml.Linq.dll contains XDocument, like .NET 4.0 (while
Silverlight drops XmlDocument and moves XDocument into System.Xml.dll).
> 
> In short, there isn't really a short way to answer your question, except
"maybe." You can also view the class library documentation, which lists all
of the namespaces and types provided:
> 
> http://docs.mono-android.net/
> http://mono-android.net/Documentation/Assemblies
> 
> A related question is whether Portable Library Projects are supported. I
don't know; I haven't tested them. They are not a priority for 1.0, but we
will support them in a later release.
> 
> Finally, are there any assemblies that aren't supported? Regarding
framework assemblies, it again depends upon what your reference is: with
respect to .NET 4.0, we're missing Windows Worfklow and Windows Presentation
Foundation (among others, I 'm sure), and the WCF we provide is
Silverlight-like, not .NET 4.0-like. If your reference is Silverlight, we're
missing System.WIndows.dll and anything related to it.
> 
> This variance makes it ~impossible to say whether any existing assemblies
will work with Mono for Android without recompilation (unless they're
MonoTouch assemblies; those should work). In all likelihood they won't
(especially considering assembly naming + assembly versioning), but it
should be fairly straightforward to recompile the code against the Mono for
Android assemblies, and we fully expect recompilation to work for most
things except UI code (which likely won't work at all).
> 
> - Jon
> 
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
> 
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid


_______________________________________________
Monodroid mailing list
Monodroid at lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110325/741bde78/attachment-0001.html 


More information about the Monodroid mailing list