Preface

This document is intended as a general introduction to the concepts involved in the design and implementation of applications which will execute in the OS/2 Presentation Manager and Workplace Shell environments under OS/2 Version 2.0. It is not intended to be an exhaustive reference on the subject of Presentation Manager programming, and should be used in conjunction with the official IBM product documentation, and other reference books and documents, which are mentioned herein.

It must be stressed that this document is not intended to teach the reader how to program in the "C" language or how to use the Presentation Manager programming interface, nor is it intended to teach the theory of object-oriented programming. Rather, it serves as a guide to the integration of various object-oriented software engineering techniques with the Presentation Manager application model, in order to produce well-structured, easily-maintainable applications which conform to CUA guidelines.

The information given in this document is generally independent of programming language implementations (with certain exceptions noted in the text), and may be used to develop applications in any supported programming language. However, programming syntax examples used in this document are shown using the "C" language, since this language is commonly used for Presentation Manager application development, and most clearly illustrates the structure of the Presentation Manager and Workplace Shell application models.

This document is intended for:

  • Application designers, planners and development managers who require an understanding of the application of object-oriented principles to the Presentation Manager environment, and the productivity gains to be achieved from the use of such principles.

  • Programmers who wish to understand the structure of Presentation Manager and Workplace Shell applications, and the techniques by which applications may be constructed so as to achieve maximum function, with optimal levels of reusability and maintainability.

    The code examples used in this document are available in electronic form via CompuServe** or through a local IBM Support BBS, as package RB3774.ZIP. IBM employees may obtain the code examples from the package GG243774 PACKAGE on OS2TOOLS.

    First Edition: This First Edition includes programming information relating to application development under OS/2 Version 2.0, and supercedes the ITSC Technical Bulletin Presentation Manager Application Development, GG24-3543.

    The document is organized as follows:

  • Overview provides a brief introduction to the topics covered in this document.

    This chapter is recommended for all readers of the document.

  • Operating System/2 provides a brief technical overview of the OS/2 Version 2.0 environment, comparing and contrasting it with the DOS environment and previous versions of OS/2. The major features of OS/2 Version 2.0 are described and their use by applications is discussed.

    This chapter is recommended for those readers who are not familiar with the OS/2 Version 2.0 operating system environment, in order to provide them with a basic understanding of the capabilities of OS/2 Version 2.0.

  • Object-Oriented Applications explains the basic principles of object-oriented design and programming. The object-oriented approach is compared and contrasted with the traditional procedural approach in terms of a simple application model, before the extension of the object-oriented paradigm into more complex scenarios is discussed. Some suggestions and guidelines are also offered with regard to application design and implementation using the object-oriented approach.

    This chapter is recommended for readers who do not already possess an understanding of the basic principles of object-oriented programming. This knowledge is essential in order to understand the programming guidelines presented later in the document.

  • The Presentation Manager Application Model describes the Presentation Manager application model, and illustrates the way in which the application model implements the object-oriented principles introduced in Object-Oriented Applications.

    This chapter is recommended for all readers of this document, since it explains the basic structure of a Presentation Manager application, and the way in which the Presentation Manager application model facilitates the creation of object-oriented applications.

  • The Flat Memory Model describes the 32-bit flat memory model implemented in OS/2 Version 2.0, and discusses the programming considerations which arise from the differences between this memory model and the segmented memory model used by previous versions of OS/2.

    This chapter is recommended for all programmers who intend to develop applications under OS/2 Version 2.0.

  • Building a Presentation Manager Application describes the major programming techniques required to implement a Presentation Manager application, including recommendations and established conventions in areas such as methods of opening and closing windows, displaying dialogs, communication between windows, managing user responsiveness etc. The chapter also discusses certain software engineering techniques which may be used to enhance the level of modularity and optimize the granularity of the resulting application code.

    This chapter is recommended for programmers and development managers who will be working on the implementation of Presentation Manager applications.

  • Workplace Shell and the System Object Model describes the system object model introduced in OS/2 Version 2.0, and its implementation by the OS/2 Version 2.0 Workplace Shell. The chapter describes the object-oriented application layer provided by the Workplace Shell, and explains how Workplace Shell objects are defined, created and implemented.

    This chapter is recommended for programmers and development managers who wish to create objects for use on the Workplace Shell desktop.

  • Direct Manipulation explains the implementation of direct manipulation (drag and drop) techniques for carrying out required tasks in the Presentation Manager and Workplace Shell environments. The chapter discusses the use of these techniques both by Presentation Manager windows and by Workplace Shell objects.

    This chapter is recommended for programmers who wish to implement direct manipulation in their Presentation Manager applications or Workplace Shell object classes.

  • Presentation Manager Resources discusses the concept of Presentation Manager resources. The chapter covers the types of application resources which may be defined in the Presentation Manager environment, their definition and conventions governing their use.

    This chapter is recommended for all programmers who will develop Presentation Manager applications, since resources are used in most if not all applications.

  • Multitasking Considerations describes the ways in which multiple threads of execution may be used within a Presentation Manager application, in order to isolate long-running application tasks from the user interface and thereby provide greater application responsiveness to the end user.

    This chapter is recommended for programmers and development managers who will be building Presentation Manager applications which carry out lengthy processing tasks, or which require access to remote devices or systems.

  • Systems Application Architecture CUA Considerations discusses the implementation of various SAA CUA user interface specifications in Presentation Manager applications. The chapter provides coding examples for a number of CUA techniques such as menu bar handling.

    This chapter is recommended for programmers who wish to implement SAA CUA guidelines in their applications.

  • Application Migration discusses the migration of Presentation Manager applications to OS/2 Version 2.0 from previous versions of OS/2. Differences in implementation are described, along with additional facilities provided by Presentation Manager under OS/2 Version 2.0.

    This chapter is recommended for application developers with Presentation Manager applications written for previous versions of OS/2, which they wish to modify in order to take full advantage of the capabilities of OS/2 Version 2.0.

  • Mixing 16-Bit and 32-Bit Application Modules describes the way in which 32-bit applications under OS/2 Version 2.0 may make use of existing 16-bit functions and window procedures, along with restrictions and programming considerations to be borne in mind when developing such applications.

    This chapter is recommended for those programmers working in organizations with existing 16-bit runtime libraries or DLLs, and who wish to make use of functions contained within these libraries.

  • Compiling and Link Editing an Application describes the steps necessary to compile and link edit a Presentation Manager application under OS/2 Version 2.0, including the use of module definition files. and the creation of dynamic link libraries to contain application code and Presentation Manager resources.

    This chapter is recommended for all programmers who will develop Presentation Manager applications, and who wish to understand how to create executable modules and dynamic link libraries.

  • Adding Online Help and Documentation examines the provision of online, context-sensitive help information for Presentation Manager applications using the IPF provided with Presentation Manager, and the use of this facility to create online documentation.

    This chapter is recommended for application developers who wish to provide online help for their applications, or who wish to develop online documentation and tutorial programs.

  • Problem Determination describes some simple techniques for problem determination and resolution in the Presentation Manager environment, and discusses some common application problems.

    This chapter is recommended for all application developers involved in testing and debugging Presentation Manager applications.

  • Generic Application Modules discusses the use of generic routines to perform commonly used functions within a Presentation Manager application, and identifies a number of areas where generic functions may be successfully applied.

    This chapter is recommended for planners and development managers who will manage a number of application developers working on one or more Presentation Manager applications, and who wish to understand the benefits in terms of consistency and productivity which can be achieved through the use of common routines.

  • Managing Development provides some guidelines for the use of a local area network (LAN) to facilitate centralized control and administration of the workstation-based application development process.

    This chapter is recommended for planners and development managers who will manage a number of application developers working on one or more Presentation Manager applications, and who wish to understand some of the ways in which a distributed development process may be managed and controlled.

    The following appendixes are included in this document:

  • Naming Conventions provides some guidelines for naming conventions to be used with symbols, subroutines and variables in the Presentation Manager environment. These guidelines cover the use of Hungarian Notation for such names.

    This chapter is recommended for planners and development managers who wish to implement a standard series of naming conventions for the application development projects under their control.

  • Application Program Construction presents guidelines for the structuring of applications and their component modules in order to achieve the optimum level of modularity and granularity within an application, thus promoting reuse of application code.

    This chapter is recommended for planners and development managers who wish to gain the maximum productivity benefit over a number of Presentation Manager application development projects.

  • OS/2 Kernel API Functions compares the operating system kernel functions provided in OS/2 Version 2.0 with those provided in OS/2 Version 1.3.

    This chapter is recommended for programmers who will be migrating applications from previous versions of OS/2.

  • Problem Reporting Worksheet provides a worksheet which may be used when following the steps given in Problem Determination, to provide effective problem documentation which can then be used to reproduce application errors.

    This chapter is recommended for application developers involved in testing and debugging Presentation Manager applications.


    [Back: Special Notices]
    [Next: Related Publications]