Ph Application

HISTORY
Sept, 1992, v3.3
Adaptation for NS 3.3: Re-built  project to work with 3.3 project builder.  Slightly modified some source files as necessary to compile (mostly changes to refer to the correct 3.x headers).  Added colorized icon.  Compiled for m68k and intel. Michael Giddings, giddings@whitewater.chem.wisc.edu.

April, 1992, v2.04, described below

Ph Application

The Ph application gives you access to directory information at several Universities.  It is used to obtain traditional phone book information.  More importantly, for e-mail users, it provides access to e-mail addresses.  Some Universities provide other data such as information about courses, restaurants, and weather.

This release is a partial implementation of the Ph client.  Only queries are allowed; editing has not been implemented.

CSO Nameserver Software

The Computing Services Office (CSO) at the University of Illinois Urbana-Champaign developed the CSO Nameserver software.  The software consists of two programs; a server program which manages the data and a client program which handles user requests.  Ph is the client program which gives you access to the data. 

Many sites installed the CSO Nameserver software to simpify e-mail addresses.  An e-mail address can be an alias, name, or callsign followed by the domain name.  In the case of ambiguous matches, a list of possibilities is returned to allow the sender to make the next attempt successful.  Sending e-mail to pruess@uiowa.edu results in an ambiguous match.  Mail will be returned to the sender with valid possibilities.  Sending e-mail to Rex-Pruess@uiowa.edu is a unique address and the mail will be delivered.

Even if your site does not run the CSO Nameserver software, you can still use Ph to query sites which do.  As of this writing, the following sites were running the CSO Nameserver software:

	Brown University			Eastern Illinois University
	Northwestern University		Notre Dame University		
	Princeton University			Texas A&M University
	U of Arizona			U of Chicago
	U of Florida			U of Illinois at Urbana-Champaign
	U of Iowa				U of Minnesota
	U of Utah				U of Wisconsin at Madison
	U of Laval, Quebec, Canada		U of Waterloo, Ontario, Canada
	Roskilde Universitetscenter, Denmark
	
 More information about the CSO Nameserver  is available in the README.CSO file.

Queries

Ph ignores case and word order when performing queries; Rex Pruess, rex pruess, and Pruess Rex are equivalent and will return the same entry.  The UNIX metacharacters *, ?, and [] are supported too.

Besides querying by name, you can query by other fields.  For example, you can query the University of Illinois Nameserver for restaurant information.  To find the restaurants serving Italian food, query with the name and other fields set to restaurant and italian respectively.
   
You can choose to have the Nameserver fields returned in one of three modes: default, all, or specific.  In the default mode, the e-mail address is re-written as alias@domain.

Servers

Ph sends the following query command to its default Nameserver to obtain the names of other servers:

	query ns-servers type=serverlist return text

Some Nameserver sites do not maintain the ns-servers record.  If your default Nameserver does not return the names of other servers, ask your network administrator to add the record or switch to a different default Nameserver.

Choose Servers from the main menu to see the names of other Nameserver sites.   Select a site to see its server and domain; double-click to initiate a query session with it.

Remote Help

Most Nameserver sites provide site-specific help.  Choose Server from the Help menu to see the help topics.  Ph obtains this help by sending the following command to the Nameserver:

	help nextph
	
Help topics ending with ".rtf" are processed as Rich Text Format files. This allows remote sites to provide attractive  help for NeXT users.

Of particular interest is the remote Nameserver site topic.  Typically, this topic describes the server system, as well as providing an overview of the site's data base.  Who knows, you might find a NeXT server somewhere.
 
Availability

Ph was uploaded to the submissions directory at a few well-known archive sites.  The archive manager will move Ph to its permanent directory as his or her schedule permits.  See the following chart for details.

	Site		Permanent Directory		File
	cs.orst.edu		 /pub/next/sources/next-interface	Ph2.04.tar.Z
 	sonata.cc.purdue.edu	 /pub/next/2.0-release/source	Ph2.04.tar.Z

Source code is included with the Ph distribution.  It is under the terms of the GNU General Public License.  Refer to the file COPYING for details.

Installation

Unpack the source code.

	uncompress -cvV Ph2.04.tar.Z | tar xvf -
	
An executable , stripped version of Ph is provided for you.  Simply copy it to the desired installation directory.  Usually, this is your personal Apps directory, ~/Apps, or the system Apps directory, /LocalApps.  File permission rights should be set to "rwxr-xr-x"  if you want other users to be able to invoke Ph.

To re-make and install Ph from scratch, type:

	cd Ph2.04
	make install

Nameserver Port

If you plan to use Ph regularly, you should add the Nameserver port to your NetInfo services file.  To do so, use NetInfoManager or run the following command as root.

	echo "ns  105/tcp" | niload services .

Services

Ph provides query service to other applications.    For example, if you are reading mail, you can select a name and issue a Ph query via the Services menu.   If you use Ph often from another application, you might want to detach the Query Ph submenu for quick access.   Or, if you prefer to use keyboard alternatives, you can assign them through the Preferences application.

To use the Ph services facility, you must  install Ph in a standard directory, such as /LocalApps or ~/Apps.  Also, you must logout /login before the new severices will appear in menus.  There are known problems with service applications not recognized if installed in /LocalApps.  If you encounter this problem, drag Ph to your dock and see if that helps.  Or, try installing Ph in ~/Apps of /NextApps instead.  Also, you should delete the ~/.NeXT/services/{.applist,.cache} files before you logout/login.

From the Preferences panel, you can select which Ph services you want to appear in Services menus. 

Modifying Services

If you wish to modify the services for your particular Nameserver, you must edit the services file in the Ph subdirectory.  Generally, you can mimic the entries which are already in the file.   A typical entry follows:

	Message: phQueryService
	Port: Ph
	Send Type: NXAsciiPboardType
	User Data: name
	Menu Item: Query Ph/Name

The Message, Port, and Send Type fields should be the same for all entries.  The User Data field must contain the exact name of the corresponding Nameserver field.  This must be an indexed field in the Nameserver database.  The Menu Item field is the name you wish to display in the Services menu.

Use Interface Builder to update the Prefs.nib file in the info.subproj subdirectory.  Update the services matrix to reflect the changes you've made in the services file.  You do not need to make any source code changes, provided you continue to use the prefix Query Ph/ in the menu item names.  If you change the prefix, you will need to change the SERVMENUTITLE define in the Prefs.m file in the info.subproj subdirectory.

After you've made changes, type:

	make clean
	make install

You will need to logout/login before the new services will appear in menus.

Speaker/Listener Methods

Ph supports some Speaker/Listener methods.  Programmers wishing to make use of these methods should refer to the SpeakToPh subdirectory for more information.

The University of Minnesota's gopher application is one example of an application which uses the Ph speaker methods. 

 Author

Ph was written by Rex Pruess, Weeg Computing Center, The University of Iowa.  He is also the author of Remotes and contributed the RPC code for NLoad.