Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.adass.org/adass/proceedings/adass98/dolenskym/
Дата изменения: Sat Jul 17 00:46:46 1999 Дата индексирования: Tue Oct 2 07:08:24 2012 Кодировка: Поисковые слова: md-11 |
STScI's prototype of the new Java interface to the archive, Starview II (SV II) makes use of ST-ECF's stand-alone FITS image viewer JIPA. The interface between these independent Java components is based on two design patterns:
The intent of the observer pattern is a way to define a one-to-many
dependency between objects so that when one object changes state, all
its dependents are notified and update automatically (see, for
example,
http://www.cs.wustl.edu/~schmidt/cs242/patterns.html).
An interface is a collection of method definitions (like C function prototypes) and constant values (Campione & Walrath 1998).
A class implementing an interface provides a method implementation for all the prototypes declared within the interface and its superinterfaces. The interface is a new reference data type which can be used as any other type name in variable declarations and method parameters.
The interface scheme provides an elegant way to separate design and implementation. It is possible to develop (compile) two Java components independently - they just share the interface source file containing the constants and method declarations (Fig. 2).
The archive browser StarView II has various interfaces (Fig. 4). Apart from the user interface, there is the Quick Server which translates queries into SQL statements. Furthermore, there is the JDBC interface to the actual database, and finally there are two more interfaces which communicate with other Java components as described above. Again, these two are the observer/observable pattern (implemented as class UserObject) and design inheritance. As illustrated, JIPA has its own means to access images from the preview DB and DSS catalogue.
Currently, a mixture of CGI (Common Gateway Interface) and JDBC (Java Database Connectivity) is used for network connections. In the future, the three-tier JDBC architecture to a proxy server, which is imposed by Java security restrictions, might be replaced by RMI (Remote Method Invocation).
Campione, M. & Walrath, K. 1998, The Java Tutorial (2nd ed.), (Reading: Addison-Wesley), 145