Hacker News new | past | comments | ask | show | jobs | submit login
Mono for Android released with Visual Studio 2010 integration (mono-android.net)
90 points by hanifvirani on April 6, 2011 | hide | past | favorite | 70 comments



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.


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


I always wonder how binding that promise is.


legally binding actually.


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?


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 ;)


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


It only covers Novell and its customers, IIRC.


Actually, it covers all implementors (the community promise does, that is).


.NET is platform agnostic, MS makes one implementation. This is actually rather like the JVM. While most people are familiar with the implementation that does run on multiple desktop platforms, there are other implementations out there (android being an obvious one, blackberry's another, IBM has several).

Anyone wishing to run .NET code can write a VM for it (like mono). As hard as this sounds, it's still easier than reverse engineering all of MFC (like wine).


Yeah, what I was trying to get at was I thought the expectation was that MS would produce/maintain them.


I think you were looking for tenets--quotes not necessary.


thanks, corrected.


> Why doesn't MS commit to it?

Because MS can't sell overpriced linux licenses to mid tier businesses?


Actually Microsoft has done that in the past!! - http://www.crn.com/blogs-op-ed/the-chart/208402155/microsoft...

Funnily enough I was a Novell shareholder back then. From what I remember the Microsoft sales team outsold the Novell sales team on Novell sales licenses.


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.


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 :)


I wish you didn't.


That's too bad. I really like the idea but not at $400.


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. :-)


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.


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.


Out of curiosity, can you use MonoDevelop as a direct alternative to Visual Studio?


To my knowledge it's primary use is for people using platforms other than Windows for Mono/.NET development. If you don't have the Mono runtime installed on Windows and you have MonoDevelop installed it will by default compile with the C# .NET compiler. Banshee (Ubuntu's default media player) is most likely coded using MonoDevelop, as it uses C# with GTK#

I've used MonoDevelop, and it's okay, but Visual Studio is way more convenient to code in.

They need to focus on making nicer development tools though, especially with UI Design. Expression Blend/Web and Visual Studio are still the best way to go with designing any user interface (in my opinion)


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.


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.


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.


True, it would be nice if there was a non-commercial license. On the other hand, if you want to make a serious income with applications, spending $400 on a good development tool is not a huge investment (in the West).


There's still AIR / Flash on Android with some great tools like http://flashdevelop.org/ available you can build with, and of course JavaScript which is pretty ubiquitous amongst devs these days.


Yeah I gotta say the pricing is pretty disappointing especially since I was kinda expecting it might be free and open source.


Indeed...

I spent a five minutes looking for any small-text link to the source code - doesn't mean they aren't there. But...

Uh can someone "explain" how, exactly, there's no free version of this hypothetically free software?

???

Mono's had a dubious reputation


Mono is available under the MIT license, which permits proprietary forks. Their versions for game consoles are also proprietary, and have been so for years.


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.


The direct equivalent for iphone http://monotouch.net/ is not free either.


yes this is my question too... was a pisser for me when i wanted to try the ios mono stuff, but alas


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 :)


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.


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.


I'll just add that lot of iOS libraries out there have instructions like "copy the files into your project" in order to use the library. It might be difficult to use those projects in mono based iOS projects.


Thanks, I'll invest in the books instead :)


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?


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.


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.


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


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)


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.


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).


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.


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.


They're just reusing existing API, which seems like an obvious step for a start. The features are there, so if you actually want to write your LINQ layer on top of whatever storage is available, you should be able to do so.


This is idiotic, you have no idea what you're talking about.


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.


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.


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.


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


I'm already developing natively for iPhone and Windows Phone 7. I hate Java with a passion, so this is probably the only way I'd ever get around to working on Android apps.


Join the mobile crowd? What about WP7?

/sarcasm


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


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.


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


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


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.


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


I disagree. Many large corps. still use XP. There thousands of 'real devs' using XP.


But if their job requires them to develop for WP7 then it's easy to procure a second Win 7 PC.

Back in 2002 I had two PCs on my desk. One I had Administrator access and where I could run Visual C++ and the Windows CE toolchain hooked up to a prototype voting ballot and the other that was connected to the corporate network where I could read e-mail.

At the time, of course, both ran the same OS, but I gather it's more or less the same idea.

If WP7 is his hobby, I assume using Windows 7 is not a big deal.


The development tools require either Vista or Windows 7 as per the release notes http://download.microsoft.com/download/1/7/7/177D6AF8-17FA-4...


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


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."


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.


There is no open source version?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: