CSLA 4.5 for Droid?

CSLA 4.5 for Droid?

Old forum URL: forums.lhotka.net/forums/t/11726.aspx


tcampney posted on Tuesday, November 27, 2012

Trying to play around with the new CSLA 4.5.  After I created a little proof of concept in WinRT was going to try to port it to Android via MonoDroid.  Tried to get CSLA 4.5 via nuGet but it said it wasn't compatible.  So tried to compile from the source and got a bunch of errors.

Is there a compatible version and I'm just doing something wrong or is that yet to come?

skagen00 replied on Tuesday, November 27, 2012

Andy had posted a question about Monodroid/touch earlier and I'm interested to hear the response not just with your question but his as well.

I saw Rocky spoke in MN a few months back and my impression was that he wasn't particularly invested in Monodroid/touch mostly in terms of certain things not quite working well in relation to CSLA.  (for some reason static members come to mind).

We're reaching a more mature state with our SL app and have a good customer base and clearly one of the things that starts cropping up is iPAD (by far more than Android which is really a non-issue for our LOB app).

I am probably more apt to mess around with WinRT prototyping than MonoTouch but it's always been on my list of things to investigate.   I think the aspect I worry most with MonoDroid/MonoTouch is not so much CSLA's/Rocky's commitment to keeping compatibility but rather Xamarin's long term prospects.  I am totally uneducated on how well MonoDroid/MonoTouch is doing, but instinctively it doesn't seem like it would have a lot of adoption.

I'm actually curious if anyone is actively doing commercial apps with CSLA & MonoTouch together (or MonoDroid).  I don't see a whole lot of board traffic around the subject so I'm guessing there aren't-many-if-any.

Sorry for the slight thread-jack, I just thought I'd mention Andy's earlier post regarding MonoTouch/MonoDroid and lump it into this one.

RockfordLhotka replied on Tuesday, November 27, 2012

I do think we'll now be able to create a monodroid version of 4.5, because mono now does support async/await. They didn't until recently, so my roadmap didn't include supporting Android with 4.5.

I don't have a timetable for Android support. The upcoming release is focused on fixing some bugs and supporting WP8.

ajj3085 replied on Sunday, December 02, 2012

RockfordLhotka

I do think we'll now be able to create a monodroid version of 4.5, because mono now does support async/await. They didn't until recently, so my roadmap didn't include supporting Android with 4.5.

I don't have a timetable for Android support. The upcoming release is focused on fixing some bugs and supporting WP8.

 

So Monotouch is still an unknown, or should both mono/touch/droid be similar work (as its getting Mono and Csla to work together)?

RockfordLhotka replied on Sunday, December 02, 2012

Sadly MonoTouch is a known quantity. There are limitations on MonoTouch due to Apple's legal requirements for code running on iOS. Those limitations block certain features of C# that are used by CSLA.

Perhaps the mono team will figure out an alternative way to implement those features that don't violate Apple's legal requirements.

Or perhaps Apple will back off on their legal limitations (ha!).

Either way, until that is resolved, we can't port a compatible version of CSLA to iOS.

ajj3085 replied on Saturday, December 08, 2012

That's unfortunate.  Is Monotouch still suitable for building apps on ios though?  I could still develop my application, and if / when csla can be ported I could move to that.   If possible I'd like to build my Mono* apps, and then later when Csla is available on one or both I could do some modification to utilize it. 

I'd really like to build apps for Android and iOS as easily as I'd be able to build RT apps, and that means .Net / C# :-)

skagen00 replied on Friday, February 08, 2013

Sorry to ressurrect a dead thread but ... in regards to MonoTouch:

One thing that wasn't clear to me was if CSLA 4.3 worked and it was just CSLA 4.5 that didn't work.  My guess is that neither really work, but that's the first question.

The second question is - what are the "certain features of C# that are used by CSLA" in regards to the limitations (I remember you saying it revolves around JITing)?  I'm just curious how extensive the problem is.  It sounds like they're pervasive to where CSLA is just not really ever going to work with MonoTouch, but I don't know if that's a fair statement or an unfair statement.

It definitely sounds like only a few people have tried and ran into the issues, so I imagine there isn't enough demand to really make it a priority, but it's not entirely clear where things do sit - as the CSLA page talks about MonoTouch / MonoDroid support and it sounds like MonoTouch is a "no" and MonoDroid is a "if you use 4.3 or earlier".

Looking forward to seeing you speak in Vegas.

Thanks!

RockfordLhotka replied on Friday, February 08, 2013

I expect to resume support for Android, but that'll have to wait until Kevin (or someone) has time to do the work/testing necessary.

The monotouch issue has to do with interfaces that return generic types. It has been a while and I don't remember the gory details, but basically those types aren't known at compile time, and rely on the JIT compiler to resolve the type at runtime. Because Apple has a legal prohibition against JIT and any dynamic behavior at runtime this is blocked.

The first place you encounter it is with RegisterProperty, because it is interface-based and returns a generic type. I'm sure there are other places too, but that was the first hit :)

Copyright (c) Marimer LLC