close
The Wayback Machine - https://web.archive.org/web/20070821122410/http://www.developer.com:80/ws/article.php/3693226
BERJAYA

BERJAYA
wireless
Search EarthWeb
BERJAYA
BERJAYA CodeGuru | Gamelan | Jars | Wireless | Discussions
BERJAYA
Navigate developer.com
Architecture & Design  
BERJAYA
Database  
BERJAYA
Java BERJAYA
BERJAYA
Languages & Tools BERJAYA
BERJAYA
Microsoft & .NET BERJAYA
BERJAYA
Open Source  
BERJAYA
Project Management  
BERJAYA
Security  
BERJAYA
Techniques  
BERJAYA
Voice  
BERJAYA
Web Services  
BERJAYA
Wireless/Mobile BERJAYA
BERJAYA
XML  
BERJAYA
Technology Jobs  
BERJAYA

   Developer.com Webcasts:
  The Impact of Coding Standards and Code Reviews

  Project Management for the Developer

  Defining Your Own Software Development Methodology

  more Webcasts...



BERJAYA
See the Winners!


BERJAYA

Developer Jobs

BERJAYA
BERJAYA
Be a Commerce Partner
Phone Systems BERJAYA
Hurricane Shutters BERJAYA
Giveaways BERJAYA
Memory BERJAYA
Domain registration BERJAYA
Imprinted Promotions BERJAYA
Printers & Supplies BERJAYA
Contemporary Art BERJAYA
Home Mortgage Loans BERJAYA
Economy Server Racks BERJAYA
Business Gifts Canada BERJAYA
Baby Photo Contest BERJAYA
Corporate Gifts BERJAYA
Custom Products BERJAYA
BERJAYA
BERJAYA

  BERJAYABERJAYA

BERJAYA
BERJAYA
BERJAYA Maximizing the Performance of SUSE Linux Enterprise Real Time for Financial Services Applications on AMD64 Technology Whitepaper: The technology needs of financial services companies offer a remarkable challenge for computer hardware and software vendors. The central requirement is deterministic, real-time computing for high-priority transactions that must execute accurately and predictably every time. However, a real-time computing solution must also offer rock-solid stability and reliability, since there is zero tolerance for missed transactions, lost records, or system downtime.
Click here.
 
BERJAYA Real-World Performance of SUSE Linux Enterprise Real Time
Whitepaper: This paper documents the excellent results of several proof-of-concept exercises conducted with database and financial applications using SUSE Linux Enterprise Real Time. It also includes specific results of real-time tests comparing the PDL times of SUSE Linux Enterprise Real Time with Red Hat and other Linux kernels.
Click here.
 
BERJAYA Technical Whitepaper: SUSE Enterprise Linux Real Time
Whitepaper: This paper outlines the specific technical capabilities of SUSE Linux Enterprise Real Time, including enterprise services offerings, and shows how SUSE Linux Enterprise Real Time delivers a solid foundation for your Service-oriented Infrastructure (SOI). Learn how SUSE Linux Enterprise Real Time can be used to build the next generation of data-center computing, creating an on-demand infrastructure that is modular, highly responsive and easy to deploy and control.
Click here.
BERJAYA
BERJAYA
BERJAYABERJAYA
BERJAYA Developer News - BERJAYA
BERJAYA
A Sybase Move Toward Mobile Growth    August 7, 2007
Nortel Gears Up for Mobile WiMAX    August 6, 2007
RingCube Targets Secure Mobility    July 31, 2007
FCC Approves Spectrum Auction Rules    July 31, 2007
BERJAYA
BERJAYA
BERJAYA Free Tech Newsletter - BERJAYA
BERJAYA
BERJAYA
BERJAYA

Involved in the development of applications and other technical solutions? Get the real-time news, articles, and learning tools you need to succeed. Visit Internet.com/Developer.
BERJAYA

Porting Mobile Applications Between Windows Mobile and Symbian OS
By Alex Gusev

Go to page: 1  2  Next  

Why May You Ever Need to Port Your Mobile Applications?

The recent state of the mobile market is quietly challenging from a developer's perspective. A competition among Symbian OS, Linux, Windows Mobilem and few others (Palm, BREW, Apple, and proprietary OSes, just to mention a few) demands some degree of flexibility from your product. It means that you need to keep in mind how to design your system to be able to support multiple operating systems with minimal headaches while porting. Obviously, you might choose not to bother with porting at all to make your developer's life easier, but more often than not you simply have no choice because your competitors do it. I don't mention such a motive as covering wider markets and so forth. Having said this, one needs to make a decision (and not always a simple one); is it worth it to port existing application to a new platform? In many cases, the answer is "YES;" you may choose to port it instead of re-writing it from scratch. It will require some additional work, of course, but the outcome may benefit you a lot. The porting assumes that you may re-use your code and even make it much more robust.

What Effort Will It Require?

There are several well-established patterns for cross-platform development. You can choose to use any of them if you designed your application recently. When you consider the possibility of porting an existing application, the answer may be not so encouraging. In the case of Symbian OS and Windows Mobile, the differences in the platform API are significant, so it is pretty possible that you will have to re-develop all from scratch. Nevertheless, there are many similar concepts and functional API/classes that may be easily replace each other. On the bright side, it may be possible to re-use your existing application design. You still have to create appropriate implementations, but at least the main application structure and control flow remain the same.

The main idea behind porting techniques in regard to the discussion may be expressed as follows: a separate GUI and engine for your application. Most recent frameworks use this paradigm in some form. Symbian OS applications have it naturally due to various GUIs built upon the same Core OS and multiple target platforms. MFC comes with a similar approach for SDI architecture (or WTL classes if you don't like MFC). Hence, if you followed the guidance and have an engine and the GUI separated, you're quite lucky. Most of the platform-independent code may be re-used with some modifications. If your application utilizes STL, that helps you too, because both platforms have STL support. POSIX-compliant applications are in the best position because they require minimal porting effort. So, generally speaking, the more platform-neutral code you have, the easier porting will go.

Obviously, the real situation is usually far from ideal. More often than not, you may have the GUI and engine mixing up, GUI handlers keeping some knowledge about the data, and so forth. Well, if you are already facing the need to port, maybe it is a good time to make the code cleaner. The minimal price you have to pay is to re-develop all GUI parts of the application because it will be certainly different between various OSes. As I said earlier, in case of using standard frameworks, it should not be a big issue, though. You still will be able to have the Application object, Document, and View objects in C++ code or use suitable classes in C# for the majority of the situations.

Another aspect of the porting process to consider will be some 'common type system.' Symbian OS C++ applications use (or at least are encouraged to use) prefix-based type names, such as 'T', 'C', 'M' and 'R' classes. T-classes may be easily #define-ed and mapped to standard C++ types; for example, Tint becomes int and vice versa, BOOL matches TBool, and so forth. Just keep in mind the size of the given type when doing such remapping to avoid any problems with using sizeof(); for example, sizeof(BOOL) and sizeof(bool) are different. For more complicated classes, #define directives also may help where possible. Nevertheless, usually you re-implement particular missing methods for either platform. Having such 'neutral' functions makes all the process much easier.

The Differences You Ought to Remember

There are a few basic differences between Symbian OS and Windows Mobile OS you will come across first. I will outline them as the following:

  • CBase class in Symbian OS
  • Two-phase construction in Symbian OS
  • Leaves in Symbian OS vs. Exceptions in Windows Mobile
  • Descriptors in Symbian OS vs. C-style strings or BSTR in Windows Mobile

Those are not the only differences you spot during the porting, but rather the most obvious ones. Let me talk about them one by one.

The CBase class in Symbian OS, being a base class for all heap-based 'C' classes, ensures that all class members are zeroed. This fact should be taken into account when you port in either direction to avoid unexpected or unpredictable behavior during code execution. If you port from Symbian OS to Windows Mobile, be sure that all class members are initialized properly. I would say that it is a good practice in general terms.

Go to page: 1  2  Next  


Tools: BERJAYA BERJAYA BERJAYA BERJAYA
Add www.developer.com to your favorites
BERJAYA BERJAYA
Add www.developer.com to your browser search box
BERJAYAIE 7 | BERJAYAFirefox 2.0 | BERJAYAFirefox 1.5.x
Receive news via our XML/RSS feed BERJAYABERJAYA


Wireless/Mobile Archives

BERJAYA

BERJAYA Cach�, the world�s fastest object database, does away with mapping. Free download. BERJAYA
BERJAYA Windows Server "Longhorn" Showcase Roadshow: Developer Essentials. BERJAYA
BERJAYA Get the most out of Visual Studio. Visit the Microsoft Visual Studio Extensibility Portal on DevX. BERJAYA
BERJAYA Bring your user interfaces to life with richer, more intuitive information displays. Read more. BERJAYA
BERJAYA Is it time to make your move to the multi-threaded and parallel processing world? Find out! BERJAYA

BERJAYA
BERJAYA
BERJAYA BERJAYA
BERJAYABERJAYA

Solutions


JupiterOnlineMedia

internet.comBERJAYAearthweb.comBERJAYADevx.comBERJAYAmediabistro.comBERJAYAGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers