How to create a cross-platform app?

Asked

Viewed 235 times

7

Come on and create a cool app, a system based on Console Application, written in Visual Basic.NET, in . NET Framework, ai you want port this application to other platforms, but without creating a dependency on each platform, you want to create your own platform, such as Java, a programming language cross-Platform which is independent, have created their own framework.

Now, how can I turn my app into an app independent of other platforms? How can I write mine framework without relying on the . NET Framework to run on other platforms as well? The question can generate many answers, but where I’m going is how can I make my system perfectly Cross-Platform to run on a Linux, Mac OS X, Windows, Android (and/or other) without changing my code?

  • 2

    Even Java (and .NET) have to write different implementations of their own Runtime for each platform they want to support. At most, most of the code is the same and only changes the part that interfaces with the operating system. And if an OS offers a feature that others do not offer, you have to choose between not using/offering that feature or otherwise "perfectly" cross-Platform...

2 answers

6


Basically you need the .NET Core *currently only . NET itself, but it is not the Framework) that is the new implementation of .NET. It works on the three main desktop operating systems.

For mobile operating systems you can use the Xamarin *which is now . NET). It works on the 3 main platforms. See more on Xamarin is a viable option for mobile development? and /a/38752/101.

Both . NET Core and Xamarin are fully supported by Microsoft. And compatible in essence. If you do the basics, what you do with one will run on the other.

Also has the Mono that works on the desktop but today has little reason to use it, you need to have a specific need to compensate for its adoption. On mobile devices it even works but so limited and with additional effort that I doubt there is a case that makes up for its use. It tends to be in the background with the adoption of . NET Core.

There is no way to create applications 100% cross Platform. You will always have to use specific libraries, you will have to write code thinking about the differences of operating systems.

Java sells this idea that you make a code and run anywhere, but doesn’t tell you that you need your effort and that in some cases it gets bad in all operating systems.

The specifics of what you need to do to ensure that it runs well on all platforms is best to ask specifically when having problems.

It would be interesting to meet the .NET Standard which is the portable way of developing applications. With the . NET 5 this becomes less relevant.

5

Browser other questions tagged

You are not signed in. Login or sign up in order to post.