Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
I wanna create a high performance app once and run on:

- Windows desktop
- Linux
- Mac OS
- iOS
- Android

I don't wanna change code for each of the platforms separately.
I wanna write once and run on all of them.
It may be framework based or compiled into native machine code for platforms separately.
Performance is important.

Is it possible?
If it is not possible, let me know and i terminate my search.

I write questions very brief and simple to make it easy to understand and my last question was closed as not plain to answer, so let me know what is wrong and i improve the question.

I know C# and i know about Xamarin, but Xamarin shares code across, it is not one code running across, so it is not what i want.
Posted
Updated 14-Apr-15 3:51am
v5
Comments
Leo Chapiro 14-Apr-15 9:39am    
Just for understanding: Windows in your list should be "Windows Mobile", right? What is Linux and MacOS, what is here a difference to Android / iOS?
Ziya1995 14-Apr-15 9:45am    
> should be "Windows Mobile", right?
No, it is Windows like Windows 7 or 8.1.

> what is here a difference to Android / iOS?
I want my app support Windows desktop, Android, iOS because i will get more money, it is also would be pretty cool if they do support Windows Store, Play Store, App Store.

Right now i am a bit confused because of the 2 major things:
Web based cross platform technologies are slow, i don't want HTML/CSS/Javascript - just exclude it.
Others confuse me, because i don't know they share code or it is completely write once run anywhere.

For example, i downloaded Xamarin and it turned out i can't share GUI, i need to write GUI separately for all 3 platforms - i don't want it.

I don't now, but if you know whether it is possible or the max level way is to share code and normalize it separately for different platforms - let me know)
Leo Chapiro 14-Apr-15 10:02am    
It depends on what programming language you can. Take a look: https://www.backblaze.com/blog/10-rules-for-how-to-write-cross-platform-code
Ziya1995 14-Apr-15 10:07am    
Can you say is it possible to write once a simple GUI app and run across said platforms?
Or do i always need to change code to fit platforms separately?
Leo Chapiro 14-Apr-15 10:17am    
For the simple GUI app you can use the web based technologies, with HTML/JavaScript it should be possible.
If you in contrast need the good/best performance, you'll need to use specific technologies: ObjectiveC for iOS, C# for Windows and Java for Android. Xamarian can help to avoid ObjectiveC by using C# only, but that's!

1 solution

Wrong question. There is no such thing as "best". How would you define the predicate "better"? If you can, please share with us. Also, the question is too vague; there are too many different approaches having certain benefits depending on a big number of factors.

So, I'll just mentioned two most widely used options which are 1) not scripting, but based on compilation, 2) won't require recompilation on different platforms. They are: Java (JVM) and CLR (.NET and other implementations). Please see:

http://en.wikipedia.org/wiki/Java_(programming_language)[^],
http://en.wikipedia.org/wiki/Java_virtual_machine[^].

And
http://en.wikipedia.org/wiki/Common_Language_Runtime[^],
http://en.wikipedia.org/wiki/.NET_Framework[^],
http://en.wikipedia.org/wiki/Mono_%28software%29[^].

Common topic for then: http://en.wikipedia.org/wiki/Just-in-time_compilation[^].

[EDIT]

On other approaches (some of them have been mentioned by other members, please see my past answer:
writing c/c++ visual programs (cross-platform) with which IDE and compiler?[^],
http://www.codeproject.com/Answers/258139/Visual-Studio-Application-for-Target-OS-Windows-an#answer1[^],
How to Compile Visual studio C++ to linux and os-mac[^],
What`s the Problem with this Plot Program win32[^].

I would not consider anything by Adobe as anything serious, but this is up to you to decide.

—SA
 
Share this answer
 
v2
Comments
Ziya1995 14-Apr-15 12:12pm    
None of said by you support all said platforms at the same time.
So, your answer is wrong.

> So, I'll just mentioned two most widely used options which are
I know all of that, i asked a specific question, but you can also describe lots of other ways that do not support platforms listed in the question.

Adobe AIR is write once and run on all said platforms in exception of Linux and that is great and i wanna know is it true? I heard it doesn't work normally, makes bugs and so on, can you explain? I would happy happy)
Sergey Alexandrovich Kryukov 14-Apr-15 12:36pm    
I don't even understand what you are talking about...
It's not my fault that you "know all that"; you never indicated what you know and what not. You did not say a single word against my statements themselves.
And what you say about Xamarin is gibberish.
Adobe... Everything created by Adobe is proprietary and, in certain sense, low-quality. I recently got rid of the last Adobe product and want to stay away from it...
—SA
Ziya1995 14-Apr-15 13:11pm    
I wanna create a high performance app once and run on:

- Windows desktop
- Linux
- Mac OS
- iOS
- Android

You advice Java and .Net:
Java support:
Widnows
Linux
Mac OS

.Net Support:
Windows

> It's not my fault that you "know all that"; you never indicated what you know and what not.
I am a friend, not enemy, we should not show what we know and what we don't know, because we know so many things) and to make question easy to get, i make it specific by asking what cross platform way, framework is the best or at least in the top.
It is simple, i am new, i don't know what cross platform ways are there and i ask to get your help.

> And what you say about Xamarin is gibberish.
So explain me, it shares code across Android, iOS, Mac OS and it has no GUI for 3 of them at the same time, it is meant to be common logic and separate GUI.

> Adobe... Everything created by Adobe is proprietary and, in certain sense, low-quality.
That is what i need from you, more information about Adobe AIR, ok it is low quailty.
But Unity3D is cross platform and it is not low quality, just look at games it made.

I know C# Windows Forms and want to choose WPF, but i would like something cross platform.
Sergey Alexandrovich Kryukov 14-Apr-15 15:02pm    
By providing my information, I'm trying to treat people as friends, how else? It's not really simple to answer some questions like that, using vague or incorrect notions as "best". It's to your benefit to understand this incorrectness, not mine. The more you understand the better.

Now, "Xamarin shares code across, it is not one code running across" is the saying which does not make any certain sense and certainly cannot be true. You are missing some points about CLR. .NET is not the only implementation of CLR, there are some more. Nono covers Windows, Linux, Mac OS X and more, for different CPU instruction-set architectures, and Xamarine adds some missing platforms to it. The produced CIL code runs on different platforms without recompilation.

Another approaches mentioned by other members is using native code with cross-platform libraries. You can consider Qt, GTK+, FreePascal, and more.

—SA
Ziya1995 15-Apr-15 2:54am    
> Now, "Xamarin shares code across, it is not one code running across" is the saying which does not make any certain sense and certainly cannot be true.
Xamarin shares code, it has no one GUI library for all 3 platforms, you make logic and create separate UI.
What are you talking about?

> using vague or incorrect notions as "best". It's to your benefit to understand this incorrectness,
I just said "best" to get some advice, not really number one in market, i could say:
What cross platforms libraries are there?
I hope now you got what "best" means here.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900