%APN3_PROCEEDINGS_FORM%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TEMPLATE.TEX -- APN3 (2003) ASP Conference Proceedings template.
%
% Derived from ADASS VIII (98) ASP Conference Proceedings template
% Updated by N. Manset for ADASS IX (99), F. Primini for ADASS 2000,
% D.Bohlender for ADASS 2001, and H. Payne for ADASS XII and LaTeX2e.
%
% Use this template to create your proceedings paper in LaTeX format
% by following the instructions given below.  Much of the input will
% be enclosed by braces (i.e., { }).  The percent sign, "%", denotes
% the start of a comment; text after it will be ignored by LaTeX.  
% You might also notice in some of the examples below the use of "\ "
% after a period; this prevents LaTeX from interpreting the period as
% the end of a sentence and putting extra space after it.  
% 
% You should check your paper by processing it with LaTeX.  For
% details about how to run LaTeX as well as how to print out the User
% Guide, consult the README file.  You should also consult the sample
% LaTeX papers, sample1.tex and sample2.tex, for examples of including
% figures, html links, special symbols, and other advanced features.
%
% If you do not have access to the LaTeX software or a laser printer
% at your site, you can still prepare your paper following the
% instructions in the User Guide.  In such cases, the editors will
% process the file and make any necessary editorial adjustments.
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
\documentclass[11pt,twoside]{article}  % Leave intact
\usepackage{adassconf}

% If you have the old LaTeX 2.09, and not the current LaTeX2e, comment
% out the \documentclass and \usepackage lines above and uncomment
% the following:

%\documentstyle[11pt,twoside,adassconf]{article}

\begin{document}   % Leave intact

%-----------------------------------------------------------------------
%			    Paper ID Code
%-----------------------------------------------------------------------
% Enter the proper paper identification code.  The ID code for your
% paper is the session number associated with your presentation as
% published in the official conference proceedings.  You can           
% find this number locating your abstract in the printed proceedings
% that you received at the meeting or on-line at the conference web
% site; the ID code is the letter/number sequence proceeding the title 
% of your presentation. 
%
% This will not appear in your paper; however, it allows different
% papers in the proceedings to cross-reference each other.  Note that
% you should only have one \paperID, and it should not include a
% trailing period.
%
% EXAMPLE: \paperID{O4-1}
% EXAMPLE: \paperID{P7-7}
%

\paperID{P9-3}
%%%% ID=P9-3

%-----------------------------------------------------------------------
%		            Paper Title 
%-----------------------------------------------------------------------
% Enter the title of the paper.
%
% EXAMPLE: \title{A Breakthrough in Astronomical Software Development}
% 
% If your title is so long as to fill the page header when you print it,
% then please supply a short form as a \titlemark.
%
% EXAMPLE: 
%  \title{Rapid Development for Distributed Computing, with Implications
%         for the Virtual Observatory}
%  \titlemark{Rapid Development for Distributed Computing}
%

\title{Using OpenOffice as a Portable Interface to JAVA-Based Applications}
\titlemark{Using OpenOffice with JAVA Applications }

%-----------------------------------------------------------------------
%		          Authors of Paper
%-----------------------------------------------------------------------
% Enter the authors followed by their affiliations.  The \author and
% \affil commands may appear multiple times as necessary (see example
% below).  List each author by giving the first name or initials first
% followed by the last name.  Authors with the same affiliations
% should grouped together. 
%
% EXAMPLE: \author{Raymond Plante, Doug Roberts, 
%                  R.\ M.\ Crutcher\altaffilmark{1}}
%          \affil{National Center for Supercomputing Applications, 
%                 University of Illinois Urbana-Champaign, Urbana, IL
%                 61801}
%          \author{Tom Troland}
%          \affil{University of Kentucky}
%
%          \altaffiltext{1}{Astronomy Department, UIUC}
%
% In this example, the first three authors, "Plante", "Roberts", and
% "Crutcher" are affiliated with "NCSA".  "Crutcher" has an alternate 
% affiliation with the "Astronomy Department".  The fourth author,
% "Troland", is affiliated with "University of Kentucky"

\author{Tom Comeau, Bruce Garrett, Joel Richon, Fred Romelfanger }
\affil{Space Telescope Science Institute }

%-----------------------------------------------------------------------
%			 Contact Information
%-----------------------------------------------------------------------
% This information will not appear in the paper but will be used by
% the editors in case you need to be contacted concerning your
% submission.  Enter your name as the contact along with your email
% address.
% 
% EXAMPLE:  \contact{Dennis Crabtree}
%           \email{crabtree@cfht.hawaii.edu}
%

\contact{Tom Comeau}
\email{tcomeau@stsci.edu}

%-----------------------------------------------------------------------
%		      Author Index Specification
%-----------------------------------------------------------------------
% Specify how each author name should appear in the author index.  The 
% \paindex{ } should be used to indicate the primary author, and the
% \aindex for all other co-authors.  You MUST use the following
% syntax: 
%
% SYNTAX:  \aindex{Lastname, F. M.}
% 
% where F is the first initial and M is the second initial (if
% used).  This guarantees that authors that appear in multiple papers
% will appear only once in the author index.  
%
% EXAMPLE: \paindex{Crabtree, D.}
%          \aindex{Manset, N.}        
%          \aindex{Veillet, C.}        
%
% NOTE: this information is also used to build the author list that
% appears in the table of contents.  Authors will be listed in the order
% of the \paindex and \aindex commmands.
%

\paindex{Comeau, T.}
\aindex{Garrett, B.}
\aindex{Richon, J.}
\aindex{Romelfanger, F.}

%-----------------------------------------------------------------------
%		      Author list for page header	
%-----------------------------------------------------------------------
% Please supply a list of author last names for the page header. in
% one of these formats:
%
% EXAMPLES:
% \authormark{Lastname}
% \authormark{Lastname1 \& Lastname2}
% \authormark{Lastname1, Lastname2, ... \& LastnameN}
% \authormark{Lastname et al.}
%
% Use the "et al." form in the case of seven or more authors, or if
% the preferred form is too long to fit in the header.

\authormark{Comeau, Garrett, Richon \& Romelfanger}

%-----------------------------------------------------------------------
%			Subject Index keywords
%-----------------------------------------------------------------------
% Enter a comma separated list of up to 6 keywords describing your
% paper.  These will NOT be printed as part of your paper; however,
% they will be used to generate the subject index for the proceedings.
% There is no standard list; however, you can consult the indices
% for past proceedings (http://adass.org/adass/proceedings/).
%
% EXAMPLE:  \keywords{visualization, astronomy: radio, parallel
%                     computing, AIPS++, Galactic Center}
%
% In this example, the author noticed that "radio astronomy" appeared
% in the ADASS VII Index as "astronomy" being the major keyword and
% "radio" as the minor keyword.  The colon is used to introduce another
% level into the index.

\keywords{Java, Microsoft, software: applications, software: open source, grant funding}

%-----------------------------------------------------------------------
%			       Abstract
%-----------------------------------------------------------------------
% Type abstract in the space below.  Consult the User Guide and Latex
% Information file for a list of supported macros (e.g. for typesetting 
% special symbols). Do not leave a blank line between \begin{abstract} 
% and the start of your text.

\begin{abstract}          % Leave intact
STScI previously used Microsoft Word and Microsoft Access, a Sybase ODBC 
driver, and the Adobe Acrobat PDF writer, along with a substantial amount 
of Visual Basic, to generate a variety of documents for the internal Space 
Telescope Grants Administration System (STGMS). While investigating an 
upgrade to Microsoft Office XP, we began considering alternatives, 
ultimately selecting an open source product, OpenOffice.org. 
This reduces the total number of products required to operate the internal 
STGMS system, simplifies the build system, and opens the possibility of 
moving to a non-Windows platform.  We describe the experience of moving 
from Microsoft Office to OpenOffice.org, and our other internal uses of 
OpenOffice.org in our development environment. 
\end{abstract}

%-----------------------------------------------------------------------
%			      Main Body
%-----------------------------------------------------------------------
% Place the text for the main body of the paper here.  You should use
% the \section command to label the various sections; use of
% \subsection is optional.  Significant words in section titles should
% be capitalized.  Sections and subsections will be numbered
% automatically. 
%
% EXAMPLE:  \section{Introduction}
%           ...
%           \subsection{Our View of the World}
%           ...
%           \section{A New Approach}
%
% It is recommended that you look at the sample papers, sample1.tex
% and sample2.tex, for examples for formatting references, footnotes,
% figures, equations, html links, lists, and other special features.  

\section{Introduction}

The Space Telescope Grants Management System (STGMS) is an integrated set 
of applications and web services used by both internal and external
users to manage HST-related grants.

The external STGMS application is a downloadable Java application used by 
HST investigators and sponsored programs offices.  It allows grantees to 
prepare budgets, manage program funding, and submit performance and 
financial reports.  The external application is written entirely in Java,
and runs on a variety of platforms.

The internal STGMS application is used to administer HST grants.   It
is used only by the Grants Administration and Finance Offices at STScI.
One key feature of STGMS is the ability to generate PDF documents for 
grant awards and modifications, and store those documents in a database.
External users can then retrieve their own documents using the external
application.  

\section{The Original System}

The original system used Microsoft Office to prepare documents, convert
and store documents.  The Microsoft Office interface was extremely 
complicated, relying on Java, VBA, COM objects, two Office components, 
a Sybase ODBC driver, and a separate Adobe PDF Writer.

To create a document, the internal STGMS application invoked a VB program 
which launched Microsoft Word and Microsoft Access,  Access extracted the required data 
from a Sybase database using ODBC into an Access table.  The VB application 
then connected the Access data source to Word document and allowed the
user to make any required changes before submitting the document.  
Word then printed the document to a PDFWriter, and saved the document to 
the database using ODBC.  If the recipient of the document wanted an 
electronic copy mailed, the text of the Word document was extracted and
emailed using VBA.  An outline of the interfaces is shown in 
Figure~\ref{P9.3-fig-1}.

\begin{figure}
\epsscale{.4}
\plotone{P9-3_1.eps}
\caption{The Microsoft Office solution required multiple interfaces, and 
worked only on Windows platforms.} \label{P9.3-fig-1} 
\end{figure}


The entire process was complicated and prone to configuration errors.
Because the Word documents had embedded macros, internal users were not 
allowed to make permanent changes.  All changes required developer 
support, which slowed document changes and increased the cost of changes.

\section{Abandoning Microsoft}

While investigating a possible upgrade to Office XP, we also began 
investigating alternatives and quickly settled on OpenOffice.org.
OpenOffice.org 1.1 was officially released October 1st.  Integration testing of OpenOffice.org 
with STGMS is underway now.  

STGMS uses the Universal Network Objects (UNO) interface to start the 
OpenOffice.org Writer and give the Writer access to STGMS data. All of the data 
access functions have been moved out of VB and  into the Java 
application.  The OpenOffice.org documents have been made as simple as possible,
and significant parts of the existing Java code were reused to
provide the data needed by the OpenOffice.org documents.  The simplified interfaces
are shown in Figure~\ref{P9.3-fig-2}.

Once started, the OpenOffice.org writer uses STGMS classes to 
fill in the user variables (fields)  The application tells the 
Writer to export PDF to a  file, and the application saves the file 
using JDBC.  

\begin{figure}
\epsscale{.65}
\plotone{P9-3_2.eps}
\caption{The OpenOffice.org solution is 
significantly simpler and works across platforms.} \label{P9.3-fig-2}
\end{figure}

OpenOffice.org has an export to PDF facility that eliminates the 
need for the Adobe PDF writer.  This facility is also used by developers 
to exchange documents across platforms.  

Unlike the Microsoft Office implementation, our OpenOffice.org implementation 
uses no embedded macros. Because the document templates are macro-free, 
they can be edited by Grants Administrator, rather than developers. 
This significantly lowers the cost of changes and the time required
to make permanent changes to the templates.


\section{OpenOffice.org Challenges}

From a developer perspective, it is still challenging to understand and 
use the OpenOffice.org API.  JDBC support currently does not work correctly with
some databases, in particular the Sybase JDBC driver.
Access via JDBC would have been useful, but was not essential for our 
project.  Instead we use JDBC from the Java application to extract data 
and pass it to OpenOffice.org documents.

OpenOffice.org has a bean interface, but that interface is not supported, and 
requires that we write native code.  A working bean interface that did
not require native code would have been extremely helpful.  Instead, we 
have implemented changes to the OpenOffice.org menus, substituting our own menu
item for the OpenOffice.org file menu.  The Java application listens for our
custome menu item and takes control back from the OpenOffice.org Writer.

The API is not easy to learn.  The class hierarchy is not obvious, and 
the Java and Python interfaces are clearly add-ons to the underlying 
C++ application.

OpenOffice.org does have a VB-like language, but we are not using that facility.  We 
are explicitly reducing the number of languages used in order to simplify
STGMS maintenance.

\section{Conclusion}

OpenOffice.org reduces the total number of components needed and provides the option 
to move off the Microsoft Windows platform. Because OpenOffice.org works
very well on Windows, we are not moving off Windows at this time. 

From a user perspective, OpenOffice.org does most 
to all of what Microsoft Office does at a much lower cost. Because OpenOffice.org is Open 
Source, and STGMS is able to use simpler interfaces, we expect the cost 
to maintain STGMS with OpenOffice.org will be significantly lower.  



%-----------------------------------------------------------------------
%			      References
%-----------------------------------------------------------------------
% List your references below within the reference environment
% (i.e. between the \begin{references} and \end{references} tags).
% Each new reference should begin with a \reference command which sets
% up the proper indentation.  Observe the following order when listing
% bibliographical information for each reference:  author name(s),
% publication year, journal name, volume, and page number for
% articles.  Note that many journal names are available as macros; see
% the User Guide listing "macro-ized" journals.   
%
% EXAMPLE:  \reference Hagiwara, K., \& Zeppenfeld, D.\  1986, 
%                Nucl.Phys., 274, 1
%           \reference H\'enon, M.\  1961, Ann.d'Ap., 24, 369
%           \reference King, I.\ R.\  1966, \aj, 71, 276
%           \reference King, I.\ R.\  1975, in Dynamics of Stellar 
%                Systems, ed.\ A.\ Hayli (Dordrecht: Reidel), 99
%           \reference Tody, D.\  1998, \adassvii, 146
%           \reference Zacharias, N.\ \& Zacharias, M.\ 2003,
%                \adassxii, \paperref{P7.6}
% 
% Note the following tricks used in the example above:
%
%   o  \& is used to format an ampersand symbol (&).
%   o  \'e puts an accent agu over the letter e.  See the User Guide
%      and the sample files for details on formatting special
%      characters.  
%   o  "\ " after a period prevents LaTeX from interpreting the period 
%      as an end of a sentence.
%   o  \aj is a macro that expands to "Astron. J."  See the User Guide
%      for a full list of journal macros
%   o  \adassvii is a macro that expands to the full title, editor,
%      and publishing information for the ADASS VII conference
%      proceedings.  Such macros are defined for ADASS conferences I
%      through XI.
%   o  When referencing a paper in the current volume, use the
%      \adassxii and \paperref macros.  The argument to \paperref is
%      the paper ID code for the paper you are referencing.  See the 
%      note in the "Paper ID Code" section above for details on how to 
%      determine the paper ID code for the paper you reference.  
%
%\begin{references}




%\end{references}

% Do not place any material after the references section

\end{document}  % Leave intact
