Live data from Hacker News

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

blogs.dropbox.com

31–40 of 335 posts

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

#31
post #11

Earlier quoted context omitted.

I tried using C++ and Objective C several years ago. Compilation was incredibly slow. Maybe when C++ modules finally arrive things will improve.

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

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

#32

Earlier quoted context omitted.

I take it you haven't tried Swift ;)

Or (shudder) Scala. The only time I ever think “oh, this computer is a bit slow” of modern high end laptops is when it comes to Scala. I like the language, but the compiler is painful.

Yep. I’ve got a 9 year old Scala repo on Github:

https://github.com/melling/scala

I actually like the language but stopped using it because it was so slow to compile. I hear that it has gotten better so I’ve been revisiting it.

Worksheets seem to help with development.

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

#34

It baffles me that people think duplicating application code for every device is the way to go. Cross platform can be done correctly. I'm working on a stack that can natively target Windows, Mac, Linux, Android, iOS, MacOS, and Web. I couldn't imagine duplicating my code for each one of these devices. If something special needs to be done, I write an extension. I have a feeling posts like these get upvoted because de…

I took this as an argument for a thin, or at least thinner, client. If something is complicated and costly to maintain - shouldn't it move to the server? What complicated processes are you doing on-device that couldn't be done somewhere else & fronted by an API?

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

#35
post #24
post #17

There's quite a few places that are still dealing with 4 codebases with varying degrees of shared code. Desktop, mobile web, native Android, native iOS. A shame, since many of them don't really need more than one responsive web codebase. Native apps do add value for many use cases, but not all.

They add value in all cases by not needing 200mb memory to run what would be a 20mb app for native. It's crazy how my phone runs perfectly fine on 2gb ram but my laptop is swapping with 16gb just because slack, vscode and whatever else election app is running.

I wasn't suggesting electron. Just a responsive website when that's sufficient.

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

#37

Earlier quoted context omitted.

I take it you haven't tried Swift ;)

Or (shudder) Scala. The only time I ever think “oh, this computer is a bit slow” of modern high end laptops is when it comes to Scala. I like the language, but the compiler is painful.

Bloop is making things quite a bit better, but totally one of the hardest parts of the language.

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

#38
post #27
post #21

I just launched (like, an hour ago: https://news.ycombinator.com/item?id=20700196 ) a cross-platform app that is almost all shared code. In my case, the solution is a web app with very lightweight native wrappers, and I'm quite happy with it. Obviously that wouldn't be the perfect fit for all apps, but none of Dropbox's "(not so) hidden costs" are relevant in my case, and I suspect many apps would be a good fit for t…

So you didn't launch an app at all; you launched a web page and submitted a single-site web browser to both app stores.

Nope, that's not accurate at all. The native apps support push notifications, in-app payments, native UI elements, proper lifecycle management (storing in-progress doodles across the app being killed in the background, or the device being restarted, for example), and more offline support than would be possible with the website. Among other things.

The things that are in the native wrappers are things that would be iOS-specific or Android-specific regardless of zero shared code or maximum shared code. In my case, the bulk of the app is shared -- everything that can be a common code base is a common code base.

According to GitHub's rough metrics, that's: Go 44.7% Dart 32.8% Java 7.1% JavaScript 6.9% Swift 6.6%

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

#39
post #35
post #24

Earlier quoted context omitted.

They add value in all cases by not needing 200mb memory to run what would be a 20mb app for native. It's crazy how my phone runs perfectly fine on 2gb ram but my laptop is swapping with 16gb just because slack, vscode and whatever else election app is running.

I wasn't suggesting electron. Just a responsive website when that's sufficient.

Most websites are resource hogs.

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

#40

It baffles me that people think duplicating application code for every device is the way to go. Cross platform can be done correctly. I'm working on a stack that can natively target Windows, Mac, Linux, Android, iOS, MacOS, and Web. I couldn't imagine duplicating my code for each one of these devices. If something special needs to be done, I write an extension. I have a feeling posts like these get upvoted because de…

Which framework are you using for this?
Post reply on HN