Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cross platform development [closed]

I have questions on true cross platform development and if it is possible to use ONE platform to develop software.

I have a few applications that I write that work on OS X, Windows and Linux. They all use native platform toolkits with some shared source across platforms. I have to boot to each platform, checkout, compile, etc.

I have in the past tried GUI toolkits like QT (I bought a commercial license for Win, mac, Linus, but very expensive and paying it year after year became hard). I have tried WxWidgets, development moves slow.

So what I am thinking about is there a way to run a single platform and cross compile for other platforms so I can build my products from a single platform.

I favor OS X, is there a way to write apps for OS X, Windows, Linux from OS X where I just need to test on each platform respectively. I have found information on cross compilers, stub compiling, etc, etc.

Does anyone have any thoughts? Is this even possible? Would someone make a killing creating such a beast?

like image 771
Toddly Avatar asked Feb 25 '09 19:02

Toddly


People also ask

Why cross-platform development is not the best approach?

While cross-platform development saves time and cost, you risk sacrificing quality in the process. It is difficult to tailor an app that runs optimally on various platforms, and the app will need an additional abstraction layer when running, thus resulting in lower performance.

What is a cross-platform development?

Cross-platform mobile development is the creation of software applications that are compatible with multiple mobile operating systems. Originally, the complexity of developing mobile apps was compounded by the difficulty of building out a backend that worked across multiple platforms.

What is the advantage of cross-platform app development over native?

Cross-platform frameworks have multiple advantages compared to native ones, including faster development process, smaller team size and reduced costs.

Can you think of any issues with cross-platform development?

Poor UI/UX Unfortunately, most cross-platform apps cannot take advantage of all of the functionality provided by mobile devices, resulting in a poor user experience. The fact is that each gadget has its unique characteristics, making it difficult to provide the same functionality with a single universal code.


8 Answers

In my company, we use the Mozilla Framework to develop cross platform dictionary products. These applications are based on the Gecko/Necko Browser and most of the development is done via Javascript, HTML, CSS, XSL, XUL,... Of course, our homebrew Search engine had to be cross compiled to the three platforms (with some other code which was first done in JS and then ported to moz' C++ for speed reasons).

In the end, we have a reasonnably cross-platform solution: Our developers mostly work like power web-developers (think client and server side at the same time). Because the Gecko is the same on the three platform, we know it will predictably look and behave the same way (except when there are bugs, but the platform is now quite mature on this point of view).

Our R&D knows how to port slow javascript code to rather quick portable C++ code (you do Mozilla code using the NSPR library, a cross-platform lib). Testing has always to be done on the three platform however, although with time and experience, you get to know what will break where (Font support, Audio support, Flash Support)...

Today, you should probably have a look at XULRunner which is really the Mozilla without any real browser interface (in 2002, we had to dismantle the Mozilla Browser to repaint it in our first product colour). Of course, it works well for simple applications but if you wish to make OpenGL, 3D Audio and other nifty things, XULRunner will appear too limited.

I believe Blizzard has some cross-platform framework for that kind of thing... :)

Good luck!

Pierre.

like image 165
Oct Avatar answered Nov 11 '22 04:11

Oct


Trying to develop applications on a single platform that will be used on many platforms isn't a good approach. At best you'll make applications which feel alien to users of the platforms that you didn't develop for.

More likely, you'll run into subtle compatibility problems in areas which you never forsaw. Java is probably the best way to go if you want to go down this route. Cross compiling will lead to autogenerated code that will be a nightmare to debug and maintain.

Certainly, you may be able to use tools for porting in some cases, but I don't think that this is a problem that you can just provide an automated solution for in general.

like image 25
Rob Lachlan Avatar answered Nov 11 '22 04:11

Rob Lachlan


Well, to be honest, the only guaranteed way to build an app to be cross platform in one go is to use Java, but it requires a rather large runtime to be installed first.

However, if that's not an option, I would recommend keeping an eye on recent developments in Qt - it is now available (or should be soon) under the LGPL, which presumably means you don't need to pay for it anymore. Using GCC with Qt, I've found, works perfectly when cross-compiling on different platforms, as long as you only use Qt's classes/code/objects and make sure that any non-Qt code you create or use is capable of being compiled cross-platform.

like image 39
Fritz H Avatar answered Nov 11 '22 04:11

Fritz H


You don't mention any specific programming language (but I'm guessing C or C++ because of the GUI toolkits), so it's kinda hard to give a good answer to what you are actually asking.

If you want "true" cross platform, I would first consider if it is possible to solve your problem using a language that is less platform bound. Python, Java and plenty of others allow you to write on one platform, and run on many.

If you still want to use C/C++, GCC gives you the option of cross-compiling, and if you combine that with QT (which will soon be available under the LGPL) you should be able to get something working.

like image 30
Epcylon Avatar answered Nov 11 '22 05:11

Epcylon


Java has tried to do the write once, run anywhere. It works well in some situations, but there are too many "unique" things in an OS. GCC provided the ability to cross-compile applications, but you run into the same sort of problems. The code will just have better performance. The RIA approach seems to work, but it doesn't feel like a native application.

like image 43
Joshua Avatar answered Nov 11 '22 05:11

Joshua


Even using a cross platform GUI toolkit will not remove all your cross platform problems. There's more to an app than GUI, after all. Cross compiling will never be able to catch all the issues that a native build will catch, either. If you're going to support multiple platforms, you're going to have to at least test on each platform. But hopefully you can perform native builds with all warnings turned on, in addition to testing.

like image 26
dwc Avatar answered Nov 11 '22 06:11

dwc


In the past few months, I found a few great videos exploring this topic of cross platform development. I hope you find them useful as well.

QTCreator

http://www.youtube.com/watch?v=aYiPvM7ZRHA&feature=channel

FlexBuilder

http://www.youtube.com/watch?v=_O_xDXRsh3Y&feature=channel

Mono / MonoDevelop

http://www.youtube.com/watch?v=U6VG_Z0aRek

I've personally had success using Silverlight / MacOS X

  • http://screencast.com/t/if8xenkt

RealBasic

http://www.youtube.com/watch?v=GWipoBeKSRk

like image 44
Michael Rosario Avatar answered Nov 11 '22 06:11

Michael Rosario


For Cross Platform Development you can use Phone Gap, Appcelerator (Titanium), Corona... This all provides a framework based on JavaScript and finally able to run on different platforms. What I am using is Titanium for Mobile Development which allows us to develop applications with Native Codes.... (which is very good advantage). Phone Gap is giving a web app which is not native in general... This softwares are used for development of cross platform supports... with support on Windows, Linux and Mac OS.

like image 35
DShah Avatar answered Nov 11 '22 06:11

DShah