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.
ive developed a couple apps natively on Android (java via Android Studio) and iOS (swift via XCode).
XCode / iOS dev is such an odd beast, slow and unwieldy, with odd constructs.
Android Dev is so much nicer.
i often dream of writing apps in one language (especially C# ) but alas for anything except straight data driven apps that display data in basic forms Xamarin doesnt buy you much.
i keep trying Xamarin but it's yet another paradigm to learn and you really cant do extended things like connect to iot etc very easily.
The dream of code once build everywhere still doesnt quite exist. google is trying it based upon HTML5 via Flutter (flutter.io)
I'm surprised because you can't believe that 13 years after the iPhone was released we're still in the string and ducttape era of cross platform mobile development, because after many more years cross platform desktop development is still very complicated. And after many, many more years, cross platform host development is still very complicated despite the fact that their most widespread language, COBOL, was born with an environment section to solve cross platform problems.
So I'd like to know what platforms you're comparing mobiles to: Abacuses?
Sorry, it is just a joke. What I mean is that we have to be aware that cross platform development is a very ambitious challenge. But it is also true that we are now much more concerned about cross platform development: We put more effort into it than in the past and have the experience of trying it for so many years.
Going into the subject, there are two main ways to achieve multi-platform applications:
1) Develop a single application that looks and works exactly the same on all platforms. The question is why there are different platforms if we end up building a dull identical application on all of them.
2) Develop an application that shares almost all the code but allows adapted code to take advantage of the special features of each platform. For me this is the right way to cross platform development and it's the one that Xamarin took.
Of course, Xamarin is not perfect and it has a tough learning curve if we want to succeed, but it is worth the effort as long as there is nothing better.
I'm starting to test the UNO platform and so far it's doing very, very well in the trials, but I cannot recommend it until I develop and test something real (UNO platform uses inside Xamarin infrastructure and ideas to some extent).
It should be added that both Xamarin and UNO platform allow cross platform development not only for mobiles, but also for desktops (UNO platform also includes WebAssembly browsers).
NOTE. There may be better environments for cross platform development, but C# coding is essential for me.
I agree that #2 is the best approach. I'm not debating that the task of cross platform development isn't tricky. What bothers me most is we have lots and lots and lots of tools. However, with the exception of Xamarin there doesn't seem to be a solution that ties everything together and hides the bare wires.
Xcode, for instance, manages development for at least 5 platforms (iOS, iPadOS, macOS, watchOS, tvOS) and handles all the messing around with certificates and signing, packaging and deploying, coding and testing and emulators.
Visual Studio is just as complete while also having the huge tie in to Azure services, database services, the whole shebang all in one IDE that just works.
Android Studio...well, that's a bit of a mess but it gets the job done. For Android.
And then there is the rest. ReactNative, PhoneGap, Flutter. They all require you to download (and self-manage) a bunch of tools, which in turn will allow you to install a bunch of tools, which in turn will allow you to manage libraries to include in your apps. Gradle, npm, node, yarn, all the CLIs, and too bad if you get the versions mismatched. And then you have to manage the Android SDK versions, and then connect to a mac device (if you're not actually on a mac).
This is before you've written a single line of code.
I guess it comes down to
a) Google doesn't care about Apple, Apple doesn't care about Google. They have no incentive to make things easier for each others' devs.
b) Microsoft cares about how many devs it can get using Azure, so it will make it easy for devs to write to both OSs in the hope they'll use Azure for the backend services
c) No one else has the industry leverage to pull everyone else in line and keep things in sync. It's a hodge-podge of developers writing their own systems in isolation because everything else sucks (in their opinion). The fact that there are so many frameworks out there, all so similar, speaks volumes. The road is littered with abandoned betas.
I've been very happy with Xamarin.Forms, coming into it with an existing C# WebForms and MVC experience. Even though Microsoft is embracing React Native, I don't see them pushing anyone away from Xamarin. Xamarin seems to have a strong community within Microsoft, and it gets better and more user-friendly with every release of Xamarin.Forms and Visual Studio for Mac.