Hacker News new | ask | show | jobs
by tacos 3702 days ago
Couple billion dollars in revenue generated with it via Unity alone. https://en.wikipedia.org/wiki/Unity_(game_engine) -- and that was a HORRIBLE version of it. Way better now.
2 comments

tl;dr. The success of Unity can't be used as an indicator that cross-platform frameworks are good for productivity/utility apps.

Xamarin and Unity don't have anything in common, other than the fact that Unity uses C# for scripting (on an ancient runtime).

Cross-platform app development frameworks are generally awful because they don't tightly integrate with the native look and feel of every platform. Video games don't even try to achieve native looks on any platforms. They're always full screen works of art, without any hint of a UIButton (iOS) or TextView (Android).

I too hate cross-platform schlockware but it sounds like you are not familiar with the technology.

"controls are mapped to platform-specific native user interface elements; for example, a Xamarin.Forms Entry becomes a UITextView on iOS, an EditText on Android, and a TextBox on Windows."

https://www.xamarin.com/forms

Interesting. I was unaware that Xamarin maps widgets like that. Thanks for enlightening me. :-)

How does it abstract away the more fundamental differences between platforms Activities/Fragments vs. UIViewControllers?

You win some you lose some. With Fragments Xamarin actually extends support to earlier Android devices. Less of an issue now, but there was a time when this actually extended platform reach, reduced code, and simplified training/upgrades.

For some things it's about the common talk-to-the-backend code, not true-code-once across iOS/Android...

I don't think Unity does it any more, but it wasn't that long ago when Unity used Xamarin to be able to run on iOS, Android and PS4. Now they do it with il2cpp I think.

Also, it seems you have no idea what you're talking about. Xamarin gives you access to the same native APIs that you use when developing a native app. You still need to know the native API if you want to build an iOS app. Xamarin.Forms helps, but doesn't support everything.

What does Unity have to do with Xamarin? Are you referring to the fact that Unity uses an old version of Mono, because that hardly is relevant to greenspot's comment.

To their actual comment, it is extraordinarily difficult to make a quality product with Xamarin. As they said, there are shockingly few wins built with it. There are loads and loads of teams using it, all sure that it's the short cut that will build for everything with one code base, but so few wins.

I'm genuinely curious as to where you are getting your information from - ? Are you referring to Xamarin Forms in particular? One isn't forced to use Forms, it's possible to utilise Xamarin iOS and Android, but still have (for example) a PCL that contains everything except for the visual side of things.
This is based upon attempting to use the products to build some solutions. The Xamarin advantage is in the cross-platform tooling (if I'm making separate code for each, why would I bother with a layer of abstraction?), but when used it generates a compromised result.

It is perfectly fine for some relatively simple things. Basic information apps, etc. But it isn't long in complex apps before the abstraction is leaking all over the place, and you find yourself fighting the tooling rather than leveraging the tooling. Which has been the case for virtually every similar "all platforms one tool" type solutions.

"Compromised" how? "Leaky abstraction"? What is the abstraction and can you please provide specific examples of the leak?

It worked between Mac and Windows on very complicated apps. It bridged Linux and Windows for tweaky MVC stacks a decade ago (then they wisely sharpened their focus.) It got the job done pumping data through hardcore game engines. The network stack is proven robust. You're talking about it like it's some stupid ORM wrapper or wonky Widget UI library. It is not.

You're talking about it like it's some stupid ORM wrapper or wonky Widget UI library. It is not.

Again, this conversation is about Xamarin the mobile app studio. There is zero ambiguity in this, so it is perplexing that you keep bringing this up.

https://www.xamarin.com/

The context is the cross-platform app creation toolset. It generates extremely poor quality code, usually at a significantly increased development time (quite contrary to the promise). This is the case found by almost everyone who uses it, which is exactly why most teams have an Android project, fully using the tools of the platform, and an iOS project, fully using the tools of the platform. If Xamarin were heavily used, Windows Phone wouldn't be so generally unsupported.

This post links to a different page. It shows three big boxes: One for iOS, watchOS, tvOS and MacOS X. One for Android. And a third one which provides a forms package providing native UI on iOS, Android and Windows. Which just received huge updates AND went open source.

There is a language: C#. There are bindings to native toolkits. There's yet another imperfect Forms package. And there's a slightly wonky IDE. I'm not sure what you're expecting but I think the "lossy abstraction" here is mostly your expectations. I also think you are applying your narrow experience (which obviously was not a great one) and trying to amplify it by using unsubstantiated statements like "most teams" and "few wins."

You don't seem to understand how Xamarin works at all. The entire point is that you have the ability to share code, but also to drop to platform specific code at any time. The absolute worst case should be that you build totally different UI code for each platform while most of your business logic can sit in shared code. If you do target their cross platform UI framework (Xamarin.Forms) then all or large chunks of of your UI are in shared code, but even then you can write things like platform specific renderers to tweak your controls to the platform.
I was specifically referring to your comment "There are loads and loads of teams using it, all sure that it's the short cut that will build for everything with one code base, but so few wins." that implied knowledge above one's own experience.

BTW Xamarin Forms has or is about to receive a bunch of updates, perhaps it's worthwhile checking them out in case things have improved for you?

People are mixing "Xamarin the company" with "Xamarin technologies" here and I'm not sure how to sort it out. Obviously the tech stack works. Obviously the stack ain't going away, especially now. As for "hard to build a quality product" and "so few wins" well that describes mobile in general now, doesn't it?