
Mono for Android released with Visual Studio 2010 integration - hanifvirani
http://mono-android.net/
======
bradhe
Hmm, mono is a really curious thing to me. Maybe someone can explain this to
me: Why doesn't MS commit to it?

One of the tenets of .NET was that it was to be platform-agnostic a la JVM but
the story seems to be that they just didn't...get around...to implementing a
Linux or Mac stack for various reasons (tight coupling to Win32 and existing
COM servers, maybe?).

Now, Mono is reaching a state of extreme maturity. Why doesn't MS invest in
this? It seems like their best way forward is dropping their single-vendor-
stack mantra? Or perhaps they don't need to do so strategically yet -- once
people _really_ start demanding *nix and mac support they can "suddenly"
change heart on mono?? This confuses me...but I'm not much of a strategist.

~~~
jimmyjazz14
They promised not to sue them, thats something I guess.

~~~
rbanffy
I always wonder how binding that promise is.

~~~
jimmyjazz14
legally binding actually.

~~~
rbanffy
Any restrictions in the promise? Does it cover all of Mono or just some parts?
Does it cover all of .NET or just a subset? Does it impose any restrictions on
what you do with the technology, what products you can build with it?

~~~
viraptor
Here's the text with full list of covered technologies.
<http://www.microsoft.com/interop/cp/default.mspx> It's not the same as the
Novell deal which happened before the promise.

In short it's - as long as you conform to the specs, you're ok (no limits). On
the other hand "Partial implementations are not covered.", so in practice
anything could be argued here ;)

~~~
rbanffy
Does it covers supersets of the spec? I understand not all of the .NET
platform is part of a formal standard.

------
daniel_solano
For a free and open source effort, check out
<https://github.com/koush/androidmono>. I just came across this and have not
used it, but it looks promising.

~~~
koushd
Hey, I'm the creator of said project. I started that 2-3 years ago, but
abandoned it once I heard of Mono for Android officially being supported :)

~~~
HardyLeung
I wish you didn't.

------
ericHosick
I develop on a Mac using Mono and MonoDevelop. I just want to say I greatly
appreciate all of the work that has gone into Mono and MonoDevelop. Thank you.
:-)

~~~
pmjordan
Do you use MonoMac? If so: I'm currently looking into that, but the mailing
list (mono-osx) seems pretty dead, with lots of unanswered questions
(including mine). Is there a better place to ask questions? I'm a little
concerned about building on a platform with minimal community support.

~~~
ericHosick
Yes. I am using MonoMac and I also watch that mailing list. There are quite a
few objective-c bridge solutions and I looked into most of them. MonoMac
seemed to be the one that made most sense but mostly because some source code
of MonoMac is shared with MonoTouch (or visa-versa). So, I think MonoMac is a
stable/good choice for that reason. In the end, I was much happier with Carbon
but that is another story.

------
hanifvirani
Looks like there is no free version and the single developer license costs
about 400$. That is going to be a big hurdle to get the casual indie
developers interested.

~~~
markkanof
I'm not sure the casual indie developer is their target market. Microsoft has
always been strong in the enterprise market, thus a tool (Mono) that allows
developers to write for Android while staying in the Microsoft ecosystem will
probably have huge appeal for large enterprise development groups. Those kind
of users usually don't have an issue with a tool priced under say $1000.

I'm certainly not saying that no indie developers use Microsoft tool, because
they do. And sure, it would be great if there was a free open source version
of this tool available. But I suspect there is a nice market for these tools
that has deep enough pockets to pay the licensing fees.

~~~
hanifvirani
I certainly agree with you, and I didn't imply that their target market is
casual indie developers. Surely they are targeting enterprise here. But I am
guessing that indie developers itself is a huge market and say if they went
with a single developer license costing somewhere like 30$, they would surely
be boosting sales.

------
jimmyjazz14
So is the paid version the only way to go here? Since everything else in the
Mono world is mostly free and open source I was hoping for the same with the
mobile versions.

~~~
tedunangst
The direct equivalent for iphone <http://monotouch.net/> is not free either.

------
Killah911
I've got yet another .NET shop, and have been meaning to break into mobile
market(beside WP7, I know). Trying to weigh the benefits of going native (i.e.
learning/hiring iOS/Java) vs using something like mono & present talent.
Feedback would be greatly appreciated :)

~~~
glhaynes
My first thought would be that going from C# to Java or ObjC shouldn't be too
difficult for decent programmers - that that's maybe 20% of the needed effort,
tops. The "hard part" is learning the frameworks and patterns of the new
platform. Additionally, not being able to directly use/learn from sample code
(from the platform vendor or free on the net) is a significant downside.

~~~
loire280
This has been my experience learning to program the iPhone. A few hours
reading "Objective-C Phrasebook" by David Chisnall got me enough Objective-C
to be comfortable with the syntax and understand some basic patterns. It took
weeks of reading and experimenting before I felt like I wasn't cargo-culting
the framework parts.

------
victorantos
ok, I've just run my first android app. it took me about 1.5 hours to
download/install everthing Emulator is really slow, it took me ages first run
in Debug mode and the UI response time is bad so far <http://flic.kr/p/9wsYQ8>

so back to WP7?

~~~
ryanhuff
In my experience, the Android emulator is slow when coding with the standard
Android tools (Java, Eclipse, etc). So I wouldn't say that a slow emulator is
necessarily a result of using Mono.

~~~
snewman
Yes, the Android emulator is quite slow. I generally find it much better to
test on an actual Android device. With the standard Eclipse-based tools, at
least, the build + push to phone + launch cycle is fast enough to be quite
usable for development. Note, running on an actual phone is still slow (though
faster than the emulator) if you run from Eclipse in Debug mode, so for full
performance make sure to run in non-debugging mode (use "Run", not "Debug",
from Eclipse). Presumably the Mono tools have an equivalent distinction.

------
MatthewPhillips
There are few differences between Java and C#. There are even fewer
differences between this and Android (java) development.

This Hello World is virtually identical to an Android hello world.

<http://mono-android.net/Tutorials/Hello_World>

~~~
pmjordan
_There are few differences between Java and C#._

I'd say that was true in the .NET 1.1 days, but really doesn't apply anymore
nowadays. The C# language's feature set has expanded much faster than Java's,
which alone drives up the number of differences. There is a kind of "why would
you want this" undertone to your comment - to address that: I feel there are
fewer mistakes in C#'s design (generics...) than in Java's. I'd als say C# is
significantly more expressive than Java at this stage. (of course, there are
other languages for both runtimes)

~~~
MatthewPhillips
Java has generics too. But I agree that C# has expanded faster (though
expansion isn't necessarily good). I'm not sure that you get any of that by
using this framework though. It seems to be near one-to-one translation of the
java classes and methods. Sure you can do lambas, but can you use Parallel? I
doubt it. LINQ to Sql? Doesn't look like it, the docs use Cursors, like in the
Java Android.

It's $400 to have your braces line up.

~~~
pmjordan
_Java has generics too._

Yeah, unfortunately they're implemented via type erasure, unlike in C#, where
they're actually part of the type system (for example, since C# 4.0 generics
can be covariant and/or contravariant on the type parameters).

~~~
InclinedPlane
Yeah, Java doesn't really have generics. Java has syntactic sugar which
provides a good portion of the benefit of generics. But type erasure is not
the same thing as generics.

~~~
pmjordan
Indeed. Unfortunately, that didn't stop them from calling them generics. This
choice also pretty much blew the chance of properly integrating true generics
into the type system later for backwards compatibility reasons. Well, there's
always Scala I suppose.

------
deskamess
I read through the Architecture doc and it explains how they do it. However I
cannot get an idea of how large the mono runtime on Android would be. Any
ideas?

For small apps, the runtime could be the largest part of the app since the
'callable wrappers' are just proxying calls to the app.

~~~
ohhnoodont
It's not small. There are actually two runtimes installed, one is 18 MB and
the other is 12.25MB (over 30MB required).

I've been using the monodroid developer preview for a few weeks. When I
started, the runtime could only be installed to internal storage. This was one
of the biggest challenges when trying to use it. Hopefully that has changed
now.

~~~
deskamess
Thanks for the response.

30M - wow! Well, at least shared runtimes are possible per their
release/roadmap document. Hopefully future runtimes will be backward
compatible so that it can 'update over' instead of install side-by-side.

------
sapper2
As a C# developer this is great news for me. Finally, I can join the mobile
crowd.

~~~
bradhe
Join the mobile crowd? What about WP7?

/sarcasm

~~~
binarycheese
WP7 requires Windows 7 and a lot of us are still developing on XP

~~~
bradhe
What really? Why?

 __Edit: __Why am I getting downvoted for this? Someone give me a legit reason
as to why you'd choose a 10-year-old, nearly obsolete OS over an industry-
leading one.

~~~
victorantos
windows 7 is the best OS, devs that are using XP are not real devs

~~~
bradhe
I wouldn't go that far but I would definitely say that if you're on XP you're
being quite short-sighted.

~~~
arrogant
I think the point here is that the developers themselves aren't generally the
ones that are choosing to use XP: they're stuck on the platform that the IT
department supports. Getting upgrades can be challenging, especially in a
large corporate environment.

~~~
HockeyBiasDotCo
Indeed. That is the case in many places throughout the Twin Cities and I doubt
it is unique to this region.

------
intellectronica
If you can use IronPython to build these apps this may be the first complete
Python environment for Android, and that's huge.

~~~
hiena03
This says in limitations: "Android callable wrappers are needed any time the
Android runtime needs to invoke managed code. Android callable wrappers are
generated at compile time by the monodroid.exe tool, based on static analysis
of IL. The net result of this: you cannot use dynamic languages (IronPython,
IronRuby, etc.) in any scenario where subclassing of Java types is required
(including indirect subclassing), as there's no way of extracting these
dynamic types at compile time to generate the necessary Android callable
wrappers."

------
maheshs
Is there any develop on mono for android? Please share couple of example if
any?

It will give me confidence about developing apps through this.

------
th0ma5
There is no open source version?

