Live data from Hacker News

Some thoughts after (almost) a year of real Xamarin use

estaun.net

41–50 of 113 posts

Re: Some thoughts after (almost) a year of real Xamarin use

#41
I built the same app using Android and iOS, but considered Xamarin at one point. I'm still considering it.

When I was deciding, I had a look at the Xamarin docs, and it seemed to reference the underlying native idioms quite often. I figured that I'd end up spending the same amount of time learning Xamarin as iOS, so what's the point?

In the end, I found the backend logic was pretty easy to write in Android or iOS. They're both OO languages, and once you've figured out the model it's not going to be hard to port. After all the phones all have similar hardware, and there's got to be some way to do the same thing.

The problem is the UI. I found it was a massive pain to learn two ways to lay out stuff. Android seems to encourage you to layout things in group containers (horizontal/vertical) that have an internal logic of their own. iOS seems to have a thing for constraints. Neither is very obvious, and they are not that easy to port from one to the other. They also each have somewhat different aesthetics (this friggin changes every time there's an update), which means you need slightly different designs (no hardware back button? no built in check box?). After grappling with this for ages, I ended up doing webviews with responsive pages. Makes the thing look like a web page, but a simple one that works like an app and can also be tested on a desktop browser.

Re: Some thoughts after (almost) a year of real Xamarin use

#43

Earlier quoted context omitted.

Yeah, a huge part of why I still (mainly) run Windows at home is easy access to Visual Studio. With third party extensions (e.g. ReSharper), and even without them, it's probably the best single IDE I've ever used. I still use WebStorm + JS for frontend Web work, though. Would you say it's worth the switch to VS and TypeScript (though WebStorm supports TypeScript, too)?

I haven't used WebStorm, but using VS for typescript was way better than using it for javascript. Developing typescript in VS is about as easy as developing C# in VS. Everything "just works".

The .Net/Visual Studio ecosystem has been looking increasingly compelling these last few years. But, I am old enough to remember evil Microsoft, so I will almost certainly never go there.

Re: Some thoughts after (almost) a year of real Xamarin use

#44
post #38

I've been using Xamarin forms a lot now. They are miles from being as good as native development. Soooo many bugs in xamarin itself. When using Xamarin forms, you will not provide as good of product as you would native. There are also very little controls. Xaml works, but is really slow. And the layout is SOOO inefficient ! But the problem is even greater, you can't merge Android and iOS layout passes. On one platfor…

I believe it is recommended to use one relative layout instead of multiple linear layouts, because depth quickly becomes slower than the more complex measurements needed for a relative layout. I find layouting on Android really bad TBH and there are so many presentations and guidelines on what (not) to do.

Its hardly more performant. But here is some more info: https://www.youtube.com/watch?v=NYtB6mlu7vA&t=1m41s Yes, the documentation is far from good. But the larger problem I find is that the 2 platforms are made from opposites points, and I don't see Xamarin glueing it together as magic. But you are right, the layouts and measurements even differ per api level as they get optimisations and are really complex. It would be awesome if Xamarin could combine both platforms native performs, but I don't see that happening :(

Re: Some thoughts after (almost) a year of real Xamarin use

#45
post #30

We tried mostly anything (and not only tried; we used for production work because clients wanted us to) and, outside native, Xamarin really is the best thing we worked with so far. For it's downsides, the upsides are too good to not take advantage off. Some cons I recognize but the case everyone keeps mentioning that you get into issue when you really want to do complex native platform stuff with animations etc I hav…

Have you tried Cocos2d/Spritebuilder? If you don't ever make games for clients it wouldn't really make sense. But if so could you explain what you didn't like about it?

I've used Cocos2d with JavaScript binding a few times and really like it. You can develop primarily in a browser then package a web (without requiring plugins), Android, iOS, Mac and Windows app from your code with minor modifications.

Re: Some thoughts after (almost) a year of real Xamarin use

#46
post #39

Earlier quoted context omitted.

I've used PhoneGap. There is a huge conflation of "feeling native" and the "native controls" aspect of PhoneGap's features. Can you access the camera on a phone using PhoneGap? Sure, but you know those apps you use every day? They are polished and you can't polish with PhoneGap. Scrolling is snappy, navigation doesn't lag, etc. etc.

But you're dealing with trade-offs unless you have unlimited resources. If you want an iOS, Android and web app as soon as possible with a decent UI on a limited budget, PhoneGap is hard to compete with. If you want the slickest possible iOS UI, native is likely the way to go but it costs significantly more resources if you want to support other platforms as well. You're not getting anything for free and you have to…

Sure, I'm not disputing tradeoffs.

> If you want an iOS, Android and web app as soon as possible with a decent UI on a limited budget,

Your chances of business/users/engagement success quickly dwindle if that's the rationale.

Re: Some thoughts after (almost) a year of real Xamarin use

#47

Now that we are at it, if you have experience / recommendations on developing for multiple mobile platforms please share it here. As far as I understand it, if you are big and have the resources, your best bet is still to develop separate native apps for each platform. Right?

I use Unity3D to develop for multiple platforms and can't recommend it enough -- it is a 3D game engine so it may be too heavy for some applications, but it can do anything you want it to. Everything is written in C#/.net on your end, Unity cross-compiles to other platforms. Unfortunately, the built-in IDE for Unity is MonoDevelop, which has all the problems Xamarin does, You don't have to use Mono though, you can us…

I don't suppose you have done any work with unity and f# have you? I'd be interested to hear any war-stories in that context.

Re: Some thoughts after (almost) a year of real Xamarin use

#48
post #22

Can anyone comment on Xamarin learning curve? If I have experience in both iOS and c#, how much time does it take to get up to speed with Xamarin?

We launched an online training program called Xamarin University, and so we have a fair amount of data on how long it takes people to get to the point where they are proficient enough to write a production app. As you might expect it's highly varied. But the median is about 45 days to pass our certification.

If one is not burdened with knowing anything yet is it feasible to start and stay with C#/Xamarin alone or must one also master the other environments to fill gaps?

Re: Some thoughts after (almost) a year of real Xamarin use

#50

I've been using Xamarin forms a lot now. They are miles from being as good as native development. Soooo many bugs in xamarin itself. When using Xamarin forms, you will not provide as good of product as you would native. There are also very little controls. Xaml works, but is really slow. And the layout is SOOO inefficient ! But the problem is even greater, you can't merge Android and iOS layout passes. On one platfor…

> I'm afraid the whole Xamarin thing won't solve "cross-platform" which isn't a real problem but sure. Its just another horse that Microsoft is betting on.

Why do you say "cross-platform" isn't a real problem? It sure seems to me like mobile app developers need a way to share large chunks of their code, and possibly even some UI code, between platforms while still delivering native apps.

Post reply on HN