One OS/UI abstraction in two languages - Swift + Java?education systems?

kmoonriver

New member
Aug 21, 2019
3
0
0
I'm researching my options for cross platform development and am leaning toward Flutter, but I'm not finding one option that would appeal to me.

I'm looking for a pair of libraries written for Swift and Java that have identical (or nearly identical) APIs, except for language.

The benefit here is that, for most things, the dev would only have to learn one platform and just program the app in two different languages. This reduces the cross platform problem to largely porting between languages rather than also porting between platforms. The dev would have to learn only one API and design the app for only one API.

Unless I'm missing something about this solution that makes it unviable. I realize that this doubles the burden on unit tests.

In order for me to consider using these libraries, they would have to be well supported. Given that I've been unable to find them, it seems likely that any that do exist have little support.
 
I moved this to the Software Development forum for more specific traffic.
 
I'm looking for a pair of libraries written for Swift and Java that have identical (or nearly identical) APIs, except for language.
The APIs are in the OS, not in the app, so since iOS and Android don't have the same APIs, you're not going to find the same APIs in them.

The benefit here is that, for most things, the dev would only have to learn one platform
That's not being a developer, that's being a coder. A developer learns how to develop software (in English). After that, coding it into a particular language, or for a particular platform, or for particular APIs, is the trivial cleanup stuff. It's like neurosurgery and suturing. You want all neurosurgery to be suturing after the surgery is finished. Neurosurgery is the surgery part, any resident can do the suturing. Any coder can code the program once you've developed it.

This reduces the cross platform problem to largely porting between languages
A computer can "port between languages - it's called a translation program.

rather than also porting between platforms. The dev would have to learn only one API and design the app for only one API.
Again, the coder would have to learn only one API, developers don't worry about APIs they worry about programs. PLEASE learn the difference. We have 50,000 apps out there doing the same thing and doing it wrong. We don't need a 50,001st. We need a developer to develop a program. Then any coder can code it into the form needed for any platform.

If all you want to be is a coder, that's fine - but no developer is going to develop a program, then hand it to you for coding - programmers code our own programs. (And, after 20 or 30 years of it, you think in the programming language, so once you've developed the program, it's already coded. "Oh, there's an API for that! Just rip this code out, call the API and use the return." That's development, not "what API can I call in both iOS and Android that does X?")

Android is a Java interpreter, iOS is an OS, that runs machine language. Interpreters don't have the same facilities that operating systems do. If you want to compare apples to apples (no pun intended), write Android apps at the Linux level - then you're writing for the OS on both.

Unless I'm missing something about this solution that makes it unviable.
See above. You ar, and it is.

I realize that this doubles the burden on unit tests.
Nope. Even if you could just click "produce an apk" or "produce an iOS app", you'd have to unit test each one - the "code" produced would be totally different in each case, and would have its own bugs. It would just make it more difficult if you're not the one who wrote the app. "What was this program's developer thinking when he wrote this code that I don't understand?"

At the development stage, in English - "I need a database to hold a table with the following fields in each record", or "now I need the user to check one of the 2 boxes - if neither is checked I do this" - it's the same, whether for Android, iOS, Windows, Linux, Mac or a supercomputer. From there, it's all just slog work, drudgery. If you're not ready for a week of development followed by a month of drudgery, programming isn't for you.

In order for me to consider using these libraries, they would have to be well supported. Given that I've been unable to find them, it seems likely that any that do exist have little support.
You won't "find any that are well-supported", you'll find libraries that have well-annotated functions. If you can't understand the annotations, go back to school, and this time pay attention during the CS courses. (h, you never actually learned programming? Then you're not a developer, you're a hacker, and have fun, but you won't be developing the next Facebook. Or even the next Swiftkey.
 

Trending Posts

Forum statistics

Threads
956,403
Messages
6,968,091
Members
3,163,538
Latest member
boone