123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- <!-- $XConsortium: ch03.sgm /main/9 1996/09/08 19:46:41 rws $ -->
- <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
- <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
- <!-- (c) Copyright 1995 International Business Machines Corp. -->
- <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
- <!-- (c) Copyright 1995 Novell, Inc. -->
- <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
- <!-- (c) Copyright 1995 Hitachi. -->
- <chapter id="RDMAP.devap.div.1">
- <title id="RDMAP.devap.mkr.1">Developing an Application</title>
- <para>This chapter presents information specific to developing a Common Desktop
- Environment application, such as naming conventions and other guidelines.
- It introduces levels of integration, which are the guidelines for determining
- the desktop functionality to incorporate into your application to make it
- increasingly integrated with the desktop. It also provides an overview of
- the Application Builder, a tool to simplify Common Desktop Environment application
- development.</para>
- <informaltable id="RDMAP.devap.itbl.1" frame="All">
- <tgroup cols="1">
- <colspec colname="1" colwidth="4.0 in">
- <tbody>
- <row rowsep="1">
- <entry><para><!--Original XRef content: 'Levels of Desktop Integration32'--><xref
- role="JumpText" linkend="RDMAP.devap.mkr.2"></para></entry></row>
- <row rowsep="1">
- <entry><para><!--Original XRef content: 'Desktop Naming Conventions32'--><xref
- role="JumpText" linkend="RDMAP.devap.mkr.3"></para></entry></row>
- <row rowsep="1">
- <entry><para><!--Original XRef content: 'Public and Private Interfaces33'--><xref
- role="JumpText" linkend="RDMAP.devap.mkr.6"></para></entry></row>
- <row rowsep="1">
- <entry><para><!--Original XRef content: 'Guidelines for Common Desktop Environment
- Databases34'--><xref role="JumpText" linkend="RDMAP.devap.mkr.7"></para></entry>
- </row>
- <row rowsep="1">
- <entry><para><!--Original XRef content: 'Application Initialization and libDtSvc34'--><xref
- role="JumpText" linkend="RDMAP.devap.mkr.8"></para></entry></row>
- <row rowsep="1">
- <entry><para><!--Original XRef content: 'Application Builder34'--><xref role="JumpText"
- linkend="RDMAP.devap.mkr.9"></para></entry></row></tbody></tgroup></informaltable>
- <sect1 id="RDMAP.devap.div.2">
- <title id="RDMAP.devap.mkr.2">Levels of Desktop Integration<indexterm><primary>desktop</primary><secondary>integration, levels of</secondary></indexterm><indexterm>
- <primary>integration</primary><secondary>levels of</secondary></indexterm><indexterm>
- <primary>application development</primary><secondary>levels of integration</secondary></indexterm></title>
- <para>Users can run any<indexterm><primary>X-based applications</primary>
- </indexterm> X11-based application from a shell command line in the Common
- Desktop Environment. If you want to integrate your application into the desktop,
- however, there are guidelines for you to follow. The Common Desktop Environment
- defines three levels of integration to give you maximum flexibility in designing
- your application or porting an existing application:</para>
- <itemizedlist remap="Bullet1"><listitem><para><emphasis>Basic Integration</emphasis> —Enables your application to be launched from the desktop.
- You do <emphasis>not</emphasis> need to change your application code to perform
- basic integration. See <!--Original XRef content: 'Chapter 5, &xd2;Basic
- Application Integration'--><xref role="ChapNumAndTitle" linkend="RDMAP.BIntg.mkr.1">,
- for more information.<indexterm><primary>basic integration</primary></indexterm><indexterm>
- <primary>levels of integration</primary><secondary>basic</secondary></indexterm></para>
- </listitem><listitem><para><emphasis>Recommended Integration</emphasis>—Enables
- your application to enhance its level of consistency with the desktop. See
- <!--Original XRef content: 'Chapter 6, &xd2;Recommended Integration'--><xref
- role="ChapNumAndTitle" linkend="RDMAP.recin.mkr.1">, for more information.<indexterm>
- <primary>recommended integration</primary></indexterm><indexterm><primary>levels of integration</primary><secondary>recommended</secondary></indexterm></para>
- </listitem><listitem><para><emphasis>Optional Integration</emphasis>—Enables
- you to leverage services provided by the desktop for achieving specialized
- tasks. See <!--Original XRef content: 'Chapter 7, &xd2;Optional
- Integration'--><xref role="ChapNumAndTitle" linkend="RDMAP.optin.mkr.1">,
- for more information.<indexterm><primary>optional integration</primary></indexterm><indexterm>
- <primary>levels of integration</primary><secondary>optional</secondary>
- </indexterm></para>
- </listitem></itemizedlist>
- <para>For more information on all three levels of integration, see the <emphasis>Programmer's Guide.</emphasis> Basic Integration is also discussed in the <emphasis>Advanced User's and System Administrator's Guide</emphasis>.</para>
- </sect1>
- <sect1 id="RDMAP.devap.div.3">
- <title id="RDMAP.devap.mkr.3">Desktop Naming Conventions<indexterm><primary>desktop</primary><secondary>naming conventions</secondary></indexterm><indexterm>
- <primary>naming conventions</primary><secondary>desktop</secondary></indexterm><indexterm>
- <primary>conventions, desktop naming</primary></indexterm><indexterm><primary>application development</primary><secondary>desktop naming conventions <$startrange></secondary></indexterm></title>
- <para>The Common Desktop Environment uses naming conventions similar to those
- used by X and Motif. Desktop clients, desktop libraries, and other desktop
- components share a common prefix for externally visible names: <command>dt</command>, <command>Dt</command>, or <command>DT</command>. Private desktop
- structures, functions, and defines (found in the Common Desktop Environment
- code; not for developer use) have an <filename>_dt</filename>, <filename>_Dt</filename>, or <filename>_DT</filename> prefix. <!--Original XRef content:
- 'Table 3‐1'--><xref role="CodeOrFigureOrTable" linkend="RDMAP.devap.mkr.4">
- lists the desktop naming conventions.</para>
- <table id="RDMAP.devap.tbl.1" frame="Topbot">
- <title id="RDMAP.devap.mkr.4">Desktop Naming Conventions</title>
- <tgroup cols="3" colsep="0" rowsep="0">
- <?PubTbl tgroup dispwid="6.69in">
- <colspec colwidth="207*">
- <colspec colwidth="83*">
- <colspec colwidth="262*">
- <thead>
- <row><entry align="left" valign="bottom"><para><literal>Name</literal></para></entry>
- <entry align="left" valign="bottom"><para><literal>Prefix</literal></para></entry>
- <entry align="left" valign="bottom"><para><literal>Example</literal></para></entry>
- </row></thead>
- <tbody>
- <row>
- <entry align="left" valign="top"><para>Desktop clients and utilities</para></entry>
- <entry align="left" valign="top"><para><command>dt</command></para></entry>
- <entry align="left" valign="top"><para><command>dthelpview</command></para></entry>
- </row>
- <row>
- <entry align="left" valign="top"><para>Resource names and classes</para></entry>
- <entry align="left" valign="top"><para><command>Dt</command></para></entry>
- <entry align="left" valign="top"><para><command>DtNhelpType, DtCHelpType</command></para></entry>
- </row>
- <row>
- <entry align="left" valign="top"><para>Library names</para></entry>
- <entry align="left" valign="top"><para><command>Dt</command></para></entry>
- <entry align="left" valign="top"><para><command>libDtHelp</command></para></entry>
- </row>
- <row>
- <entry align="left" valign="top"><para>Include references</para></entry>
- <entry align="left" valign="top"><para><command>Dt</command></para></entry>
- <entry align="left" valign="top"><para><command>#include <Dt/Help.h></command>
- </para></entry></row>
- <row>
- <entry align="left" valign="top"><para>Public function names</para></entry>
- <entry align="left" valign="top"><para><command>Dt</command></para></entry>
- <entry align="left" valign="top"><para><command>DtCreateHelpDialog</command></para></entry>
- </row>
- <row>
- <entry align="left" valign="top"><para>Public data structure names</para></entry>
- <entry align="left" valign="top"><para><command>Dt</command></para></entry>
- <entry align="left" valign="top"><para><command>DtHelpDialogCallbackStruct</command></para></entry></row>
- <row>
- <entry align="left" valign="top"><para>Constant names</para></entry>
- <entry align="left" valign="top"><para><command>Dt</command></para></entry>
- <entry align="left" valign="top"><para><filename>DtHELP_NEW_WINDOW</filename></para></entry>
- </row>
- <row>
- <entry align="left" valign="top"><para>Environment variables</para></entry>
- <entry align="left" valign="top"><para><command>DT</command></para></entry>
- <entry align="left" valign="top"><para><command>DTHELPSEARCHPATH</command></para></entry>
- </row>
- <row>
- <entry align="left" valign="top"><para>Private desktop symbols (structures,
- functions, defines)</para></entry>
- <entry align="left" valign="top"><para><filename>_dt</filename>, <filename>_Dt</filename>, <filename>_DT</filename></para></entry>
- <entry align="left" valign="top"><para><command>_DtHelpFunction, _DtHELP_DEFINE</command></para></entry></row></tbody></tgroup></table>
- <para><!--Original XRef content: 'Table 3‐2'--><xref role="CodeOrFigureOrTable"
- linkend="RDMAP.devap.mkr.5"> lists the exceptions to the preceding naming
- conventions.</para>
- <table id="rdmap.devap.tbl.2" frame="topbot">
- <title id="rdmap.devap.mkr.5">Exceptions to Desktop Naming Conventions</title>
- <tgroup cols="3" colsep="0" rowsep="0">
- <?PubTbl tgroup dispwid="6.74in">
- <colspec colwidth="207*">
- <colspec colwidth="189*">
- <colspec colwidth="160*">
- <thead>
- <row><entry align="left" valign="bottom"><para><literal>Name</literal></para></entry>
- <entry align="left" valign="bottom"><para><literal>Prefix</literal></para></entry>
- <entry align="left" valign="bottom"><para><literal>Example</literal></para></entry>
- </row></thead>
- <tbody>
- <row>
- <entry align="left" valign="top"><para>Common Desktop Environment Motif<indexterm>
- <primary>Motif</primary></indexterm></para></entry>
- <entry align="left" valign="top"><para><command>Xm</command></para></entry>
- <entry align="left" valign="top"><para><command>XmCreateLabel</command></para></entry>
- </row>
- <row>
- <entry align="left" valign="top"><para><command>dtksh</command> Convenience
- Functions</para></entry>
- <entry align="left" valign="top"><para><command>Dtksh</command></para></entry>
- <entry align="left" valign="top"><para><command>DtkshAddButtons</command></para></entry>
- </row>
- <row>
- <entry align="left" valign="top"><para>ToolTalk Messaging Service<indexterm>
- <primary>ToolTalk Messaging Service</primary></indexterm></para></entry>
- <entry align="left" valign="top"><para>tt (for functions), Tt (for typedefs),
- TT (for constants)</para></entry>
- <entry align="left" valign="top"><para><filename>tt_open</filename>, Tt_message,
- TT_NOTICE</para></entry></row>
- <row>
- <entry align="left" valign="top"><para><indexterm><primary>X11R6.2</primary>
- </indexterm>X11R6.2</para></entry>
- <entry align="left" valign="top"><para><command>X</command>, <command>Xt</command></para></entry>
- <entry align="left" valign="top"><para><command>XOpenDisplay, XtCreateWidget</command></para></entry></row></tbody></tgroup></table>
- <caution>
- <para>Do <emphasis>not</emphasis> use the prefixes <command>dt</command>, <command>Dt</command>, <command>DT</command>, <filename>_dt</filename>, <filename>_Dt</filename>, <filename>_DT</filename>, <command>Xm</command>, <command>tt</command>, <command>Tt</command>, <command>TT</command>, <command>X</command>,
- or <command>Xt</command> to define new symbols in your application code.
- If you do, you might define one that has already been defined—or might
- be defined in the future—in the Common Desktop Environment, ToolTalk,
- X11, or Motif code.<indexterm><primary>naming conventions</primary><secondary>caution notice</secondary></indexterm><indexterm><primary>desktop</primary>
- <secondary>naming conventions</secondary></indexterm><indexterm><primary>naming conventions</primary><secondary>desktop</secondary></indexterm><indexterm>
- <primary>conventions, desktop naming</primary></indexterm><indexterm><primary>application development</primary><secondary>desktop naming conventions <$endrange></secondary></indexterm></para>
- </caution>
- </sect1>
- <sect1 id="RDMAP.devap.div.4">
- <title id="RDMAP.devap.mkr.6">Public and Private Interfaces<indexterm><primary>public interfaces</primary></indexterm><indexterm><primary>private interfaces</primary></indexterm><indexterm><primary>interfaces</primary><secondary>private</secondary></indexterm><indexterm><primary>interfaces</primary><secondary>public</secondary></indexterm><indexterm><primary>application development</primary><secondary>public and private interfaces</secondary></indexterm></title>
- <para>If a Common Desktop Environment interface is documented in the man pages
- or the Common Desktop Environment documentation set, you can assume that
- the interface is public unless otherwise stated. An interface is not necessarily
- public just because it has a header file associated with it. Interfaces that
- are not documented are private to the Common Desktop Environment and are
- subject to change without notice.</para>
- </sect1>
- <sect1 id="RDMAP.devap.div.5">
- <title id="RDMAP.devap.mkr.7">Guidelines for Common Desktop Environment Databases<indexterm>
- <primary>guidelines</primary><secondary>database syntax</secondary></indexterm><indexterm>
- <primary>database</primary><secondary>syntax</secondary></indexterm><indexterm>
- <primary>syntax, for databases</primary></indexterm><indexterm><primary>application development</primary><secondary>databases, guidelines for</secondary>
- </indexterm></title>
- <para>You can find the syntax for the desktop databases, such as those used
- for actions and data types, in man pages located in the <filename>/usr/dt/man/man4</filename> directory.</para>
- <para>For more information on databases, see the <emphasis>Programmer's Guide</emphasis>.</para>
- </sect1>
- <sect1 id="RDMAP.devap.div.6">
- <title id="RDMAP.devap.mkr.8">Application Initialization and libDtSvc<indexterm>
- <primary>application development</primary><secondary>initialization and libDtSvc</secondary></indexterm><indexterm><primary>desktop</primary><secondary>libDtSvc and application initialization</secondary></indexterm></title>
- <para>If your application uses any of the <command>libDtSvc</command> APIs
- (for actions, data typing, drag and drop, Session Manager, or Workspace Manager),
- it must first initialize the <command>libDtSvc</command> library by calling
- either <filename>DtInitialize()</filename><indexterm><primary>DtInitialize()</primary></indexterm> or <filename>DtAppInitialize()</filename><indexterm>
- <primary>DtAppInitialize()</primary></indexterm>. Refer to the <filename>DtInitialize</filename>(3) or <filename>DtAppInitialize</filename>(3) man
- page for more information.</para>
- </sect1>
- <sect1 id="RDMAP.devap.div.7">
- <title id="RDMAP.devap.mkr.9">Application Builder<indexterm><primary>application
- development</primary><secondary>Application Builder <$startrange></secondary></indexterm></title>
- <para>Application Builder (App Builder) is a tool that enables you to easily
- create the graphical user interface (GUI) for Common Desktop Environment
- applications, without having to write code to call the desktop application
- program interfaces (APIs). It abstracts the Motif toolkit into simple object
- palettes and object property sheets. You can use App Builder to construct
- a wide range of applications, from simple GUI-based programs to complex,
- integrated systems. It supports User Interface Language (UIL) file import
- and export to enable you to migrate your application among other Motif-based
- tools and products.<indexterm><primary>Application Builder</primary><secondary>App Builder</secondary></indexterm><indexterm><primary>App Builder (Application
- Builder)</primary></indexterm></para>
- <para>App Builder is ideally suited for use if you:<indexterm><primary>Application
- Builder</primary><secondary>when to use</secondary></indexterm></para>
- <itemizedlist remap="Bullet1"><listitem><para>Are not an expert Motif programmer
- </para>
- </listitem><listitem><para>Are not familiar with the Common Desktop Environment
- Motif widgets</para>
- </listitem><listitem><para>Are not familiar with the desktop services (for
- example,<indexterm><primary>drag and drop</primary></indexterm> drag and
- drop,<indexterm><primary>ToolTalk Messaging Service</primary></indexterm> ToolTalk
- messaging,<indexterm><primary>Session Manager</primary></indexterm> sessioning,<indexterm><primary>Help system</primary></indexterm>
- help, and<indexterm>
- <primary>internationalization</primary></indexterm> internationalization)</para>
- </listitem><listitem><para>Want to build your application user interface quickly
- and be able to change it easily</para>
- </listitem><listitem><para>Are working collaboratively with other people to
- build a single application</para>
- </listitem></itemizedlist>
- <para>In fact, even if you do not fit into any of the preceding categories,
- you will likely find App Builder to be appropriate and helpful for your application
- development.</para>
- <para>Using App Builder, you can:</para>
- <itemizedlist remap="Bullet1"><listitem><para>Lay out the user interface for
- an application, constructing it piece-by-piece from a collection of objects
- from the Common Desktop Environment<indexterm><primary>Motif</primary></indexterm> Motif
- toolkit</para>
- </listitem><listitem><para>Define connections between objects to provide application
- GUI behavior, then use the test mode that enables connections to be tested
- </para>
- </listitem><listitem><para>Add some of the desktop services functionality
- to your application</para>
- </listitem><listitem><para>Edit applications that were previously created
- using App Builder</para>
- </listitem><listitem><para>Merge automatically generated code with hand-generated
- code</para>
- </listitem><listitem><para>Generate C-language source code and associated
- project files (for example, message catalogs) for the application</para>
- </listitem></itemizedlist>
- <para>You can<indexterm><primary>compiling</primary><secondary>an application</secondary></indexterm> compile and invoke your application from within App
- Builder. You can execute the build, run, and debug cycles all from a common
- environment without having to exit and restart App Builder.</para>
- <sect2 id="RDMAP.devap.div.8">
- <title>Demo Programs<indexterm><primary>Application Builder</primary><secondary>demo programs</secondary></indexterm><indexterm><primary>demo programs</primary>
- </indexterm></title>
- <para>You can find the App Builder example programs in <filename>/usr/dt/examples/dtbuilder</filename>. Read the <command>README</command> file for detailed information
- on these programs.</para>
- <sect3 id="RDMAP.devap.div.9">
- <title>Related Documentation</title>
- <para>For more information on Application Builder, see the appropriate man
- pages, the App Builder help volume, and the <emphasis>Application Builder
- User's Guide</emphasis>.<indexterm><primary>application
- development</primary><secondary>Application Builder <$endrange></secondary></indexterm><?Pub Caret></para>
- </sect3>
- </sect2>
- </sect1>
- </chapter>
- <!--fickle 1.14 mif-to-docbook 1.7 01/02/96 04:30:53-->
- <?Pub *0000020547>
|