|
What does it Take to Develop Cross-Platform Applications
Author: | Monday November 25, 2002
You need to develop an application which can stretch across both the hardware and operating system boundaries as well as satisfy your concerns about the protection of your code. It needs to be fast, reliable and above all portable.
Now you need to decide which one of the numerous programming languages will fit your needs. This article attempts to discuss a few options that do exist as well as some of the pitfalls.
Now you need to decide which one of the numerous programming languages will fit your needs. This article attempts to discuss a few options that do exist as well as some of the pitfalls.
I have personally been developing in PHP for several years now and have come to depend on this scripting language solely for web development, backend processing and administration. Lately I have had the desire to get back to desktop, client/server applications which do not necessarily involve web browsers. My requirements were compiled code, efficient/small executables and above all cross platform. Cross platform for me entails hardware, operating system and GUI. For some, the x86 platform is adequate, but hey, I want it all.
Enter PHP
PHP is a fantastic scripting language which answers all of your web development and administration needs. PHP is cross platform, has a huge support base and with the correct libraries can provide GUI support as well as with the purchase of ZEND compiler can offer the end user compiled secure code.
The pitfalls are of course PHP simply just is not the correct choice for this. ZEND compiled PHP scripts still require an installed interpreter and just does not offer the flexibility in GUI. I simply brought PHP into this article out of my all out loyalty to this open source scripting language.
Enter Kylix
At first glance Kylix for Linux appears to be a good choice. Kylix provides the developer with a decent GUI based IDE, is based on Object Oriented Pascal and is compatible with Borland’s Delphi for Microsoft Windows. Unfortunately, MAC OS/X is excluded from this development environment and does not meet my needs.
Enter Java
I have been resistant to Java for as long as I can remember and this is partly because of the controversy over the language and the direction. Microsoft did a fantastic job in my opinion of crippling this language and preventing it from moving into the mainstream. I will not go into this, but using your favorite search engine use the keywords “Sun versus Microsoft and Java” and I am sure you will find something.
Java requires a runtime engine to execute the application. Because Java is not a natively compiled it is inherently slow, and on top of that, Microsoft is attempting to kill Java by discontinuing the inclusion of the runtime engine in there operating systems.
Some other problems are the IDE’s are expensive, it is as nearly complicated as C/C++ and it is not as stable as some other applications written in other languages. Some companies have built into their IDE’s the ability to compile Java natively which should allow it to run much faster and become much more stable. But it gets back to expense and still a simple fact of direction.
Enter C/C++
C/C++ is a complicated, comprehensive, well supported language. Compilers exists for free on practically every operating system as well as numerous open source development environments. The only problem I could for see with C++ is the simple fact that it would be difficult to develop for cross-platform GUI’s.
Enter C/C++ and WxWindows
WxWindows is a set of cross-platform open source GUI libraries which have been in development for over 10 years. In essence, WxWinows is a wrapper for which the developer codes to and at compile time includes the set of libraries that will be needed for the target operating system. WxWindows have numerous common classes which visually appear to be native to the target operating system but function equally across the O/S, Hardware board.
WxWindows and C++ is to the Concord where Java is to a biplane. Some of the newer version of WxWindows include support for handheld/embedded systems.
WxWindows can be found at http://www.wxwindows.org
Conclusion
The Winner…
C/C++ compiler free for most O/S.
Numerous free IDE’s for C/C++ for most O/S.
WxWindows Libraries Free.
Need I say more, time to break out the C++ in 24 hours books.
A little Extra
WxWindows is not the only set of cross platform libraries available, but through my research I found it to be the most comprehensive and with a 10+ year development life, stable.
Code Warrior by Metrowerks is a cross-platform development environment that runs about $600 for the professional addition. If the funds are available and you do not have the time to spend to learn WxWindows, then CodeWarrior may be a product you could use.
I would recommend to all readers to do your own research and find out what will best fit your needs.
|