![]() |
![]() |
| |
Chapter 6Porting Issues and IdeasThis 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 MigratingMigrating 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 IntegrationBasic 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:
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 PortIf 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 PortingBenefits of porting to the CDE desktop include:
Integrating into the Solaris CDE EnvironmentRecommended 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 IntegrationThe Solaris CDE development environment contains components and guidelines so that your application will integrate well with other applications on the desktop:
| |
| |