Live data from Hacker News

The not so hidden cost of sharing code between iOS and Android

blogs.dropbox.com

191–200 of 335 posts

Re: The not so hidden cost of sharing code between iOS and Android

#191
post #172
post #153

Earlier quoted context omitted.

Could you tell why you would not recommend react native?

Pretty certain it's the unstability. In my experience, while Flutter may not be elegant because of Dart, it more or less just works. Developing in React Native is mostly just debugging the framework itself and browsing through React Native Github issues.

What specifically isn't elegant about Dart in your opinion? Seems like a perfectly good language to me, and although it's nothing fancy, it does have a bit of sugar, and a solid standard library. I also like how codegen and static analysis are so accessible through the build libraries.

It's evolving pretty quickly, too. Non-nullable by default is coming up, along with extension methods, FFI. Possibly implicit conversions.

I've been working with Flutter/Dart for the past 8 months or so, and I have to say...I'm pretty into it.

Re: The not so hidden cost of sharing code between iOS and Android

#192
post #81

Earlier quoted context omitted.

Electron. It works pretty well if you're OK with the huge resource usage.

I really despise Electron apps. They always seem bloated and antagonistic toward the native user experience on my platform (eg. inferior keyboard support, hard to integrate with custom tooling like AutoHotkey, etc.). Have I just not used the right ones?

Visual Studio Code is probably one of the best received Electron applications. Tried it?

Re: The not so hidden cost of sharing code between iOS and Android

#193
post #187
post #184

Earlier quoted context omitted.

Unreal, Unity, Adobe, Disney, OTOY, Fusion, Cinema4D, ... are pretty fine with it.

What's fine with wasting effort on pointless duplication? You made this false claim many times in the past, but it's as false as it was before. And your support of lock-in practices is strange to begin with.

Go learn about the industry business practices to start with, an advice you keep ignoring.

Some people never get tired to fight windmills.

Re: The not so hidden cost of sharing code between iOS and Android

#194

Earlier quoted context omitted.

I wonder if that is a symptom of C++ having many recent revisions, thereby influencing, misleadingly, the definition of "experienced".

Yeah, I have 15 years of C++ experience, but not since 2012. So with C++11 and C++17 (and soon C++20) my skills have not aged well, even though I can still write C++03 just fine. It's no wonder 'senior' devs prefer to use plain C, where even C11 is not that different from C99.

Funny, I too stopped using C++ around 2011. Recently I had to delve into Swift and learn it with great urgency... then my project changed direction toward C++ and Qt.

I find the '14 and '17 additions vastly improve C++ and in fact added things that I had just come to appreciate in Swift. So don't be too put off; learning the new stuff will help you if you need to adopt a more-recent language too.

Re: The not so hidden cost of sharing code between iOS and Android

#195
post #31

Earlier quoted context omitted.

I take it you haven't tried Swift ;)

Sure. I’ve been using Swift since 1.0. It’s a great language. I rewrote 50,000 lines of Objective C (and the C++ part) into Swift. http://appstore.com/h4labs

I like it a lot. It's really too bad Android doesn't use it as a native language.

Re: The not so hidden cost of sharing code between iOS and Android

#196
When you're at Dropbox's scale it's easy to just hire a load of iOS and Android devs, and some product managers to keep them all in sync.

But when you're not at that scale - you can't afford to build the same app twice - you are often left with a choice of either Xamarin or React Native. Both of these are perfectly good frameworks on which to build software; don't let the FUD win.

Re: The not so hidden cost of sharing code between iOS and Android

#197

What I don't see them saying was that it was the wrong choice in 2013 for a scrappy team and an evolving product, just that it's not the right choice in 2019 for a company with ~infinite dollars and a stable product. I'm looking at building a mobile product solo right now, and I'm finding Flutter a pretty compelling idea. Building everything twice means being circa twice as slow, meaning I can learn about what the ma…

I'm in the same boat, but chose React Native instead because learning more React + JS/TS has additional benefits

Re: The not so hidden cost of sharing code between iOS and Android

#198
post #71

This is precisely the experience of my startup trying to rely on flutter. It's a constant battle. Moreover Android and iOS are different implementation with different capability with constantly evolving API. It's hard to keep cross platform code in sync many #ifdef with edge cases. Moreover with REST API architecture majority of the common code is in back-end. So building in Swift and kotlin for respective platform i…

What kind of battle? Can you elaborate?

Just one example of an open issue https://github.com/flutter/flutter/issues/22860

If I use swift I get all the code examples and tons of documentation from Apple itself. In flutter I need to rely on some package which might not be supported, if my team takes over it's double the job fix the package bugs and also change the resulting changed in code, compile and test individually on iOS and Android.

Another one https://pub.dev/packages/sensors#-changelog-tab- And there are many such issues.

Re: The not so hidden cost of sharing code between iOS and Android

#199
post #88

Earlier quoted context omitted.

The article says it all - they chose the wrong language with no community support for the trail they were blazing and that technical debt destroyed their productivity. I achieved 90+% code share in Xamarin including UI across windows - ios - andriod. 100% buisness logic shared. You can write cross-platform UIs, and swap out to native code on a widget by widget basis. Threading is seemless. Sure it has its own set of…

Xamarin is indeed the closest there is to the holy grail of cross-mobile development. I too had some success with it for a small project at first, but just like the theme of the blog post, the challenge is in the long-term maintenance being cost-effective, not just the initial development. Especially in the face of these adversarial platforms constantly changing things underfoot. For example in Android recently I've…

I’m pretty happy with nativescript. It suppers typescript, different ui libs (angular, vue, and no-lib)

You can directly access native apis within your js/ts code. And they provide good cross platform defaults for widgets.

Re: The not so hidden cost of sharing code between iOS and Android

#200
post #87

This is precisely the experience of my startup trying to rely on flutter. It's a constant battle. Moreover Android and iOS are different implementation with different capability with constantly evolving API. It's hard to keep cross platform code in sync many #ifdef with edge cases. Moreover with REST API architecture majority of the common code is in back-end. So building in Swift and kotlin for respective platform i…

I get the API differences on these platforms but at least in terms of the UI Flutter seems like a good choice. I'd imagine it'd still be easier to stick to Flutter than write two separate native apps in most cases, it seems to have gotten tooling right. So I'm also interested in hearing more elaboration on how Flutter has been a struggle for you.

That's my point, subtle difference in UX like gesture, swipe and touch controls in iOS results in additional UI code in dart to account for each platform. Not much help except for simple mobile apps doing simple crud operations.
Post reply on HN