top | item 11580217

Xamarin Open-Sourced

581 points| fekberg | 9 years ago |open.xamarin.com

199 comments

order

ghuntley|9 years ago

It has been super exciting watching this all unfold over the last year, for those wondering where to get started in the new world of .NET open source - start here:

.NET CLR Managed Runtime - https://gitter.im/dotnet/coreclr

.NET Framework - https://gitter.im/dotnet/corefx

.NET Compiler as a Service ("Roslyn") - https://gitter.im/dotnet/roslyn

.NET Orleans Actor Framework - https://gitter.im/dotnet/orleans

Mono Framework - https://gitter.im/mono/mono

Xamarin iOS, Watch, Mac Bindings and Framework - https://gitter.im/xamarin/xamarin-macios

Xamarin Android Bindings and Framework - https://gitter.im/xamarin/xamarin-android

Everything is licensed under the MIT license w/patent pledges.

twoquestions|9 years ago

Somewhat echoing what spriggan3 said, it seems odd that you suggest going straight to chat to learn about a piece of software rather than trying to find answers to your questions before bothering other people. To me (and this may be a function of where I'm from), it seems very rude to ask for help with something when you don't absolutely need said help (RTFM Noob!).

It's entirely possible you meant your comment for people who already have experience with the source in question, in which case I've misunderstood you.

spriggan3|9 years ago

Why do you link to gitter when you should actually like to the repos instead ?

mintplant|9 years ago

So, what's the story if I want to build a C# application that runs on Windows, OS X, and Linux? Do I use "regular" .NET for Windows and Mono for OS X and Linux? Or will everything eventually be unified into one common platform?

naasking|9 years ago

Roslyn is cool, but there doesn't seem to be a standard way to tell Visual Studio to use a custom/roslyn C# compiler rather than the framework one. That kind of limits its usefulness.

jeswin|9 years ago

Honestly, I am a little tired of all the articles (edit: I meant posts) claiming MS is suddenly in the Open Source camp.

To truly support Open Source, they should show a willingness to work against Software Patents. The essence of Open Source is the freedom for anyone with a computer to turn their imagination into code. MS remains one of the biggest obstacles in that path.

Instead here is what they do:

1) Directly attack the Linux kernel in Android through patents

2) Sell patents to trolls like Intellectual Ventures, and directly fund them via investments

3) Support the cartel called BSA, which includes other luminaries like Oracle (http://www.bsa.org/about-bsa/bsa-members).

Honestly, say what you will about Google, but I can't imagine them ever threatening another software company with software patents.

nivla|9 years ago

>Honestly, say what you will about Google, but I can't imagine them ever threatening another software company with software patents.

That is a naive fanboy outlook towards a company. Its a well known fact that Google bought Motorola only for the patents. Google has also managed to use the patents to sue other companies including Microsoft. Although I still believe it is the game that is flawed and not the players. Google has also done things that could hold back the Windows Phone ecosystem. However, none of that should discount how much Google has contributed to betterment of the web just like Facebook or Microsoft. Open-Source is open source, the only thing that matters is license here and it is as liberal as it could get MIT.

sremani|9 years ago

A project under MIT license and accepting PR is good enough for me and is an open source project by definition.

No one is taking away your right to hate Microsoft, but picking OSS as bull-work of your argument is not there any more.

edit: bull-work(tm)

throwawaykf05|9 years ago

It's a fallacy that you cannot support both open source and software patents. Religious opinions aside, they are both simply different forms of IP, each effective for different things.

BinaryIdiot|9 years ago

> Honestly, I am a little tired of all the articles (edit: I meant posts) claiming MS is suddenly in the Open Source camp.

Okay...but this isn't one nor is it really an "article". It's simply the page about Xamarin being opened source. That's it. It's MIT licensed and opened sourced.

Did you not read the page or did you just want to rant about the same things people complain about with Microsoft in almost every HN thread about their open source efforts? I'm not saying some of these are not issues but when they're unrelated and don't add anything to the context of the content I don't get the point.

Aldo_MX|9 years ago

I honestly disagree with your stance against patents, disregarding dull patents and the issues they bring like patent trolls, I really believe that the industry needs patents to prevent unfair competition.

The issue is the length of patents, the Software industry doesn't need 20 year-long patents, it's too much time, at most a patent should be valid for 5 years...

And well, we also need mechanisms to punish people who abuse the patent system with dull patents.

munificent|9 years ago

> To truly support Open Source, they should show a willingness to work against Software Patents.

See: http://www.cnet.com/news/google-microsoft-settle-long-runnin...

It is very hard for large software companies to unilaterally work against software patents because it puts them at a competitive disadvantage, at least temporarily. It's sort of like arms limitation talks where you can't put down your nukes before anyone else does or it's an open invitation to attack.

anonymfus|9 years ago

"To truly support Open Source" MS should open the source of their main products like Windows and Office.

pjmlp|9 years ago

Like IBM and Intel?

greenspot|9 years ago

First thought: Xamarin is now open source—great!

Second thought: Every time I looked into Xamarin (and I do this every 6 months) there was a lack of killer apps created with Xamarin on both iOS and Android, users' experiences with Xamarin were either rare or negative and in total the community felt non-existent

Third thought: Ok got it, they open source to get PR, build a community; I hope that helps and it's not their last resort

So, is Xamarin really a viable solution?

AlwaysBCoding|9 years ago

No, use React Native

tree_of_item|9 years ago

Quick question for .NET developers: is there a solution for totally command line driven workflows yet? I really don't want to mess around with .SLN files and IDEs like Visual Studio and MonoDevelop. I'm sure VS is fine for people who like it, but I really want something like `cargo build` or `go build`.

sago|9 years ago

`mcs` to compile code, rough equivalent of javac

`mono` to run it, rough equivalent of java.

We code for the Unity game engine, but use command line mono tools for testing and feature development.

ColinDabritz|9 years ago

On the editing experience side, OmniSharp brings a richer text-editing experience to dot net development on many existing platforms and editors, including command line classics like emacs and vim.

http://www.omnisharp.net/

ygra|9 years ago

A trivial MSBuild project that simply compiles all C# files in the current folder is not hard to write by hand, although taking one generated by VS and trimming it down might be easier. In any case, there is csc as the command-line compiler as well.

davb|9 years ago

I just wish they didn't kill RoboVM. I get the warm and fuzzies when something big is open sourced just like everyone else. Then I snap back to reality and remember that it's ultimately the same organisation that close-sourced RoboVM then killed it, screwing over a lot of people depending on it.

jestar_jokin|9 years ago

Seriously, RoboVM could have been huge. An ingenious way to introduce app development to your existing hordes of Java devs. Great tech, killed because of business decisions...

cptskippy|9 years ago

I'm glad to see Microsoft embracing Open-Source, C# is such a wonderful language and easy language to use. In light of all the trouble Oracle has been giving Google, I would love to see them embrace it and provide a true alternative to Java on Android.

colbyAFTrustedK|9 years ago

Microsoft will need to revise their patent pledge first. If you look at the way it's currently written, it's almost as if it was specifically meant to preserve their option to pull an Oracle v Google against a vendor who decides to pick up .NET and run with it.

Meanwhile, Google has switched away from their Apache Harmony derivative to the officially anointed sources, so there's not much incentive to make the move away from Java entirely, anyway.

pjmlp|9 years ago

Google hasn't anyone to blame but themselves.

drudru11|9 years ago

Crazy seeing those Novell copyrights in the headers! I totally forgot about them and their relationship to Xamarin.

seibelj|9 years ago

This is amazing! But question - where is RoboVM? Please release to MIT license so it doesn't waste all of the work done so far.

sremani|9 years ago

If Xamarin is open sourced and RoboVM is dropped, I can only speculate that Microsoft did not want to touch JVM with a 10-foot pole and chose to not entertain Oracle legal. May be I am wrong, but that is one possibility.

ZenoArrow|9 years ago

IIRC, RoboVM is being dropped. No further development work. I could be wrong though, I'm half remembering it being discussed on a Reddit AMA with Miguel de Icaza.

EDIT: It wasn't in the AMA after all, but it has been dropped:

http://www.linuxjournal.com/content/death-robovm

Aldo_MX|9 years ago

RoboVM was forked, the fork is named BugVM[1], and it's currently maintained.

[1] http://bugvm.com/

koyote|9 years ago

This is great news!

Last time I used it (more than a year ago) it was still felt quite buggy. That being said, has anyone successfully used Xamarin or have an example of a large and successful app built with it?

pier25|9 years ago

I recently spent a few weeks with it and decided to not use it for a cross platform mobile app I'm working on.

1) The documentation seems good at first, but some parts are outdated and I did find myself stuck with it a number of times. iOS and Android docs are lightyears ahead.

2) The code editor in Xamarin Studio for OSX is mediocre. I've tried using VSCode instead but intellisense didn't work. I imagine using Visual Studio must be a lot better. Both Xcode and Android Studio are much better in my experience. Maybe with the upcoming C# IDE from JetBrain this will change.

3) You need to learn iOS/Android development anyway. Xamarin Forms works well for prototypes and such but in the end you need platform specific UIs and libraries. So you need to do the leg work in the native docs (Swift/Java) and understand how these APIs/languages work and be able to "translate" those to C#. It's double the work compared to writing directly in native code.

4) The community around Xamarin is minuscule. If you get stuck there isn't much material out there to help you compared to native iOS or Android. Also in my short experience their forums were not very helpful. I imagine with an expensive corporate account with dedicated support that must be very different, but for a solo developer it feels like you are on your own.

As much as I like C# as a language I really don't see the point of Xamarin in my case. I started learning Java/Android form scratch and I'm having better results in less time. I will have to work more to get both iOS and Android, but I won't feel miserable and the dev experience in OSX will be awesome with first class tools.

I'd say Xamarin would be perfect for someone that already knows how to develop for iOS and Android but hates working with Swift and/or Java, loves C#, and has access to Visual Studio in Windows.

mb_72|9 years ago

Can't speak for the mobile side of things, but I used Xamarin for Mac to port a Delphi application and bring it to market last year. Considering when I started I didn't know anything about Macs, Cocoa or Xamarin for Mac / MonoMac, it turned out pretty well. Xamarin have some good people cruising their forums and offering support.

iask|9 years ago

I am also curious. Does anyone know of any good apps done with Xamarin?

donniefitz2|9 years ago

I'm using it for a few projects. One for a client on the side and one for my primary job. It's really nice to work with. There are issues here and there, but overall, it's a very viable solution and I'm quite happy with it.

coldtea|9 years ago

They have several on their webpage.

oblio|9 years ago

Now only if .NET adoption on Linux would pick back up like when Mono was pushing it. .NET is a great environment for developing desktop applications and Linux really needs them.

snuxoll|9 years ago

GTK# could use some serious love, as much as I enjoy Vala I would much prefer to be able to use Npgsql for database access than deal with the crapshoot that is libgda. Unfortunately after the GTK3 transition it seems nobody has really felt like maintaining GTK# much, meanwhile plain old C and Vala have been getting all the cool stuff (GTK composite templates, in particular).

swalsh|9 years ago

I built a website that just went live a few days ago (still crazy ugly). It is .NET core on Ubuntu using various Azure Services (nothing fancy, just standard ecommerce... but still):

http://savorylane.com

The biggest hurdle has been dependencies, but support has been improving a lot every month. Getting deployed was initially a pain, but I've found a way to make it smooth. I think soon i'll be writing up how I deal with it. I deploy about 3 times a day without interruption on my single server behind an nginix reverse proxy.

shanselman|9 years ago

It will.

dintech|9 years ago

Now RoboVM too please. It's almost criminal that they canned it.

mwcampbell|9 years ago

Now my only remaining qualm with Xamarin is this: Having two garbage-collected environments interacting within the same program, as is the case with Xamarin on Android, just seems pathologically complex. Does anyone have enough experience with Xamarin on Android to know if this is ever a problem in practice?

Edit: I wonder if the Xamarin.Android developers ever considered compiling CIL to JVM bytecode (which would then be compiled to Dex bytecode), then reimplementing mscorlib on top of the Java standard libraries. So basically, IKVM.NET in reverse. Then there'd be no bridging between two environments.

ghuntley|9 years ago

Recommended watching for iOS and Android - https://www.youtube.com/watch?v=VJsmrTQWD2k simple to identify these problems once you know of them. I keep coming across implementations that make some very fatal mistakes about resource management, notably these problems would potentially also happen when not using Xamarin as well (developers not reading documentation/being careful with allocations)

With Android the most common mistake is cross-heap references, putting a large C# array into a java arrayadapter for example will result in objects that live in both worlds which makes it expensive for Java to see the C# object and C# to see the Java object. The objects are effectively being mirrored, the solution is to use C# all the way down. Where the object was created defines ownership, for example ArrayAdapter containing C# objects means owned by Java with overhead for Java to bridge the C# objects.

ianlevesque|9 years ago

That's what RemObjects does.

ianleeclark|9 years ago

Nice, I've recently been honing my C# chops, so I'm super excited to see this arrive at such an incredible (for me) time.

skrowl|9 years ago

With Forms we finally have native FOSS cross platform that we've been waiting for. See ya Cordova / React Native / etc!

Scramblejams|9 years ago

So, what does this mean for Unity3D? I'm tired of being limited to .Net(-sorta-ish) 3.5 and a stuttering garbage collector.

warrenmiller|9 years ago

Unity has moved to IL2CPP so not sure a hell of a lot.

dep_b|9 years ago

Of course Xamarin was built on top of earlier Open Source work in MonoMac, you still could do OS X applications without actually paying for Xamarin but it wasn't as easy as using Xamarin straight.

So this is also partly just giving back from where they took it.

hugi|9 years ago

Cool. Now bring back RoboVM.

ywecur|9 years ago

Ok, so is there anything NOT being open sourced?

Is everything needed to actually be able to use it productively open source now?

Is Xamarin Studio open source?

ashitlerferad|9 years ago

RoboVM will not be open sourced, only killed.

alashley|9 years ago

As an aside, has anyone here created a Xamarin android app using material design? I was recently trying to integrate their component for the design support library, but it seemed horribly buggy.

j_s|9 years ago

There is a Xamarin Evolve 16 session shown free on their live channel starting in a few minutes at 5:30pm ET (Wed Apr 27):

"Everyone Can Create Beautiful Apps with Material Design"

https://evolve.xamarin.com/live

m_fayer|9 years ago

Actively working with it now, seems fine to me, maybe you're using an old version of the design support lib?

pier25|9 years ago

I found that too a few weeks ago. I ditched Xamarin and moved to Java.

Cyph0n|9 years ago

What I don't understand is why they had to purge the commit history. Did they not use Git internally? Do the commits contain sensitive information? Does it make it easier to clone the repo?

frostmatthew|9 years ago

> What I don't understand is why they had to purge the commit history.

When the team I'm on open sourced an upgrade framework[1] of ours we did the same. There's hundreds of commits over the course of years where the only intended audience was internal, some of those may contain information that wouldn't be appropriate for external consumption (e.g. a reference to non-public information) and others (well most of them really) contain information that would be useless externally (e.g. links to builds or reviews that are accessible only internally, bug numbers, etc).

[1] https://github.com/vmware/upgrade-framework

coldtea|9 years ago

>Do the commits contain sensitive information?

Very likely.

hobarrera|9 years ago

Looks like OS X only? (since I get a "download for OS X" link, but no reference to GNU/Linux). Or am I missing something?

ashitlerferad|9 years ago

Now when will they make RoboVM open source?