How can I create a cross-platform application?
Article Metadata
Compatibility
S60 2nd Edition
Article
Contents |
Overview
How can I create a cross-platform application?
Description
We want to build the application on the client devices to be as 'cross-platform' as possible, so rather than having separate applications, one for each platform.
How portable is C++ code between Symbian and Windows? Is this feasible or are the two operating systems too different?
Solution
Build your own framework so that all device/platform-specific code is separated to libraries. The code you write is then generic to all platforms and device-specific code is taken into the compilation when a specific platform is defined. See the Device Optimization documents in http://www.developer.nokia.com/ to get further information.
Windows and Symbian are quite different platforms to program to, but if you build a library that will take these changes into account, you can port very easily.
Some companies have ported their PC software to Symbian OS very quickly, because they already had an application engine for Symbian OS. Building that engine/framework naturally takes time.
Applications built for S60 are binary compatible across different S60 devices. Very little alteration, if any, is necessary.
The traditional way to ease porting in Symbian OS is to separate the UI and the engine part. Depending on your application, you might have to separate more components, such as methods concerning communications and file system.
Porting applications between S60, Communicators, and other Symbian devices, such as UIQ devices (and PCs) will be tougher than between S60 devices. Separating the UI and device-specific components would be an answer here. Java would be another solution, but then you lose the advantages that the native programming language has.
Summary
As a conclusion, there are two conventions:
1.Build a framework (library) which will compile your cross-platform code to any device you want to. Within the library, you need to build the application framework for each platform.
2. Port your code to an existing framework on another platform.


(no comments yet)