The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Hi All, Opinion requested. I have a large C# Windows application That has a complex math component (in C#).
I also have a large Android application, written in JAVA. I believe Xamarin may be the correct route, but I am open to suggestions.
I would like to somehow share the math component between the two apps. I am open to transcribing the component into a new language and have both applications access/share the code.
I have done Android development in both Xamarin using C# and Kotlin.
I am more familiar with C# so I would personally tend to err with something I am familiar with.
However there is a lot of support on SO and other forums, as well as from google for Kotlin.
So I can't really offer a recommendation other than saying go with something that has a lot of support and postings on forums like CodeProject and SO.
I say this because Android can be one massive PITA at times, I have just been spending the week battling with dates because a someone wants to use a version of Android released just over four and a half years ago and the older Java releases don't handle date locales particularly well.
So if you are like me I would say that go for something you are familiar with because Android is going to throw a lot of curve balls your way.
If you like adventure then go for something like Flutter, React or Kotlin.
“That which can be asserted without evidence, can be dismissed without evidence.”
if your objective is to share only the math component, then you probably can create a C++ DLL ( for the Windows side ) and .SO ( for the Android side ) and interface your existing C# and Java code (JNI) with this DLL. So only the math component needs to be ported (to C++).
If you really want to port everything (both apps) to the same language, then C# (Xamarin) is probably a good choice. I also propose a free open source C++ cross-platform framework ( https://Kigs-framework.org ).
I have had very good experiences with Delphi and Lazarus (Pascal) for cross platform development - even for Linux and Mac. You don't have any dependencies (like .NET libraries) and you create really native applications for the operating system!
pascal is a robust and mature programming language that you can rely on even in 10 years. Compared to other languages/frameworks/libraries, all my applications worked maintenance-free (independent of the operating system version - even under Windows XP... This is simply indescribable!).
I agree completely with the Delphi route. Though, it would be a complete rewrite of the libraries and the UI. I've been using Delphi for ages and love it. You can get quite a lot accomplished in a short amount of time - think old school drag and drop placement of components for all platforms. You'll obviously need a Mac to target iOS and macOS, but if you're targeting only Windows and Android, all you need is your Windows machine.
If a total rewrite is an option, I'd highly recommend Delphi.
To my humble opinion Xamarin should be the best solution. You can use the C# part in the shared solution and the Java part in the Android solution. By using Interfaces you can combine the two.
For shared pages I should write as much code as possible in the shared part. The C#/XAML combination has an easy learning curve.
Have you had a look at Kotlin? Yes, it's java but it will work on both Windows and Android. It's a great language and it also has a 'native' version that will no doubt become even more important in the future.
I agree somewhat, but infect there are some good ones.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
Gawd I wish that was true: this is not just a flu, it's a teenage boy flu on massive quantities of steroids that is still drunk, stoned, and tripping balls after his night out last night. And has just found the keys to John Wick's 69 Mustang and his gun cabinet.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
Last Visit: 26-Nov-20 14:36 Last Update: 26-Nov-20 14:36