Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

Previous Previous     Contents     Index     Next Next
Chapter 6

Porting Issues and Ideas

This chapter discusses porting OPEN LOOK applications to Solaris Motif on the Solaris CDE desktop. Much of the information presented is generic enough to encompass porting from OPEN LOOK to Motif running on the OpenWindows desktop.

Elements of Migrating

Migrating from the OPEN LOOK user interface to Motif is complex. It generally will not amount to a widget-for-widget swap. Do not expect it to be as straightforward as a line-by-line code translation. Depending on your application, the migration can range from a major architectural impact down to subtle widget differences.

Besides migrating from the OPEN LOOK user interface to Motif, porting to the Solaris CDE desktop means that you have the Solaris CDE development environment infrastructure available to your application. See Chapter 4, Development Environment Transition Issues for a summary of some of these features. See Common Desktop Environment: Programmer's Overview for a more detailed description of the development environment components and documentation.

Do You Need to Port?

First you should decide whether you really have to port your application. As mentioned in Running Existing Applications on the Solaris CDE Desktop, OPEN LOOK and Motif applications run "as is" on the Solaris CDE desktop. So you do not need to port your existing applications to Motif or CDE to have them run on the Solaris CDE desktop.

This provides you with flexibility about when and under what circumstances you decide to port your application. For example, you may decide to wait until a major release of your product before porting your application to the Solaris CDE desktop.

Basic Integration

Basic application integration is a set of highly recommended tasks you should perform to integrate your application into the Solaris CDE desktop. These tasks do not require modification of the source code for your application. (Some types of print integration--enabling printing in your application--require slight code modification, but these are optional to basic integration.)

Basic integration does not involve extensive use of the desktop application program interface (API). Therefore, it does not provide other interaction with the desktop, such as drag-and-drop capabilities.

A lot can be done to integrate your application into the Solaris CDE desktop without modifying any code. You can:

  • Define actions for your application

  • Write a help volume and have it available from the top level of the Help Manager

  • Integrate your application with the Front Panel and Application Manager

  • Enable printing

The Solaris CDE desktop provides interoperability between your application and other desktop applications. You can add new services (see Recommended Integration and Optional Integration) if you want to use them and are willing to modify your code.

See Solaris Common Desktop Environment: Programmer's Guide for details on how to enable printing in your application, and for a list of the steps that comprise basic integration. See the "Registering an Application" chapter of Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide for detailed instructions on how to implement the basic integration steps.

If You Decide to Port

If you decide that you definitely want to port, think of the process as an art and not as a science. There is no magic tool that will perform the port for you. There is no foolproof algorithm to follow that works every time. What you really need to do is learn Motif and CDE, and understand the CDE style guidelines. This takes time and patience.

Benefits of Porting

Benefits of porting to the CDE desktop include:

  • Taking advantage of new features offered by CDE

  • Providing easy portability on a wide variety of platforms

  • Enabling better "ease of use" by ensuring that your application behaves according to the CDE style guidelines

  • Providing interoperability with other Solaris CDE applications in areas where the Solaris CDE and OpenWindows environments differ, for example:

    • Window manager interaction

    • Drag and drop

    • Session management

Integrating into the Solaris CDE Environment

Recommended and optional integration require changes to your code to implement the functionality within these categories. Your application will be even more integrated with the desktop the more CDE functionality you adopt.

Recommended Integration

The Solaris CDE development environment contains components and guidelines so that your application will integrate well with other applications on the desktop:

  • Help system

  • ToolTalk messaging system

  • Session Manager

  • Drag and drop

  • Internationalization

  • Standard font names

  • Error message guidelines

  • User customization issues

Previous Previous     Contents     Index     Next Next
 

Updated: 2003-09-29, 21:37