• Keine Ergebnisse gefunden

Consider Sharing Code and Data

Im Dokument PenPomt GO (Seite 25-29)

Think about what other parts of Pen Point need to access your classes, what tasks need to run the code in them, and who maintains their data. If your application has a client-server architecture, a separate back-end or a core engine, you'll need to

have the picture in mind when choosing local or global memory, dynamic or well-known objects, process or subtask execution, protecting shared data with semaphores and queued access, and so on.

PenPoint is a rich operating system that makes its kernel features available to

applications. But a straightforward application may not need to concern itself with any of these decisions. It just interacts with PenPoint subsystems, which make careful use of these features. For example, none of the tutorial programs use any advanced kernel features.

.7

CHAPTER 2 I PEN POINT SYSTEM OVERVIEW 17 Pen Point Design Guidelines

?r

Use D@~lIJIme~~ OW"gelrilt~tk~Hru 2.11.8

In the PenPoint operating system, the user sees documents, not separate programs and program files. Every document on a page is the conjunction of data and a process running an application. This leads to a document-centered approach to application design in place of a program-oriented approach. By comparison, on a Macintosh or IBM-PC compatible computer, the user tends to fire up a program and work on a succession of files. Under PenPoint, the user turns to a new document (or taps in a floating document) and the system unobtrusively turns control over to the right program for that document.

There are many ramifications of this orientation: applications have rio Open ... or Save As ... commands; the PenPoint operating system, not the user, saves data and quits programs; you deliver application templates and defaults to the user as stationery.

",. Design. for File Format Compatibility

The PenPoint application environment differs from that of other operating systems in that PenPoint saves your application data, along with information about objects in the document. Because of this filing method, your data formats within PenPoint will differ from their PC equivalents.

Most PenPoint users, however, will need to read and write application data in formats that are understood by other non-PenPoint applications. Either your application should be able to read and write data in other formats, or you should create an i~port or export filter for your PenPoint files. Pen Point provides import and export filters for some common file formats. Because the· import-export mechanism is class based, you or other application developers can create import-export filters for other file formats.

",. Exploit the Pen

Graphical user interfaces built around a mouse or other pointing devices lead to flexible program architectures that respond to the user's actions instead of requiring the user to perform certain steps. The pen-oriented notebook interface of Pen Point is even more free-form. Just as with a mouse, the user can point to and manipulate (click, drag, stretch, wipe) entities on-screen, but in the PenPoint operating system the user can also make gestures and handwrite characters "on"

the visual entities. Taking advantage of the pen is a challenge and a tremendous opportunity.

",. Use the Pen Point User Interface

The Notebook User Interface (NUl) differs from other graphical user interfaces. If you are porting a DOS or Macintosh-based program to PenPoint, rethink your user interface so that it takes advantage of the PenPoint UI Toolkit. Do not create your own interface.

2.11.9

2.11.10

2.11.11

~ III

~ III

>

[

The PenPoint UI Design Reference describes the PenPoint User Interface, its rationale, and how and when to use its components. You should have good reason before you deviate from the PenPoint interface. Remember that a consistent user interface allows users to learn your application quickly; a bad or inconsistent user interface will count against your application in product reviews (and acceptance in the marketplace).

The PenPoint UI toolkit contains classes that create almost every on-screen object in the PenPoint NUL If you use these classes, it is hard to deviate from the standard. Additionally, it is easier to follow the conventions by using these classes than to subclass and change their default behavior.

Chapter 3 / Application Concepts

This chapter gives you the big picture of application development for the

PenPoint™ operating system. It introduces the design issues you need to consider when writing an application for a mobile, pen-based computer, how applications work under Pen Point, and how you use the PenPoint classes.

This chapter also presents concepts in general terms to provide the fundamental understanding that puts the balance of this manual in context. You needn't have read any of the other documentation before reading this chapter. However, if you have the SDK software, you might want to read the "Getting Started" document in the Open Me First packet for detailed instruction on how to compile and run the tutorial programs.

If you want a basic look at how the PenPoint operating system works, without a focus on writing applications, read Chapter 2, System Overview. If you need an introduction to object-oriented programming, read these industry publications:

• Principles of Object Oriented Design, Grady Booch, The Benjamin/Cummins Publishing Co., 1991

• Object-Oriented Programmingfor the Macintosh, Kurt Schmucker, Hayden Book Company, 1986.

• Object-Oriented Programming: An Evolutionary Approach, Second Edition, Brad]. Cox and Andrew

J.

Novobilski, Addison-Wesley Publishing Company, 1991.

However you do it, make sure you come to understand the basics of

object-oriented programming, because in PenPoint every application must be class-based.

This chapter points out some of the aspects of the PenPoint Operating System that particularly affect your approach to application design.

As you know, application development takes place at two levels:

• At an architectural level, where you design your application

• At the line-by-line level of program statements.

At the architectural level, this chapter assumes that you have basic familiarity with object-oriented programming. In developing a PenPoint application you'll be designing different kinds of objects and the interactions between them and PenPoint. The section "How Applications Work" introduces the PenPoint Application Framework, which influences and supports the structure of all

PenPoint applications.

At the programming statement level, this chapter assumes that you are well-versed in C programming. You'll be writing C code that makes heavy use of the

Pen Point Class Manager. The section "Understanding Classes" introduces the Class Manager and shows you what lines of code in PenPoint look like.

With some understanding of the Application Framework and the Class Manager, you'll have the tools necessary to understand simple programs both architecturally and line-by-line. Later chapters in this manual describe the SDK sample programs in \PENPOINT\SDK\SAMPLE (the installation procedure for the SDK creates the

\PENPOINT directory on your hard disk) .

Im Dokument PenPomt GO (Seite 25-29)