.KEYWORD coolets
.FLYINGHEAD PROGRAMMING POWER
.TITLE Using coolets in an enterprise environment
.FEATURE
.SUMMARY Coolets are snippets of information that can be effortlessly synchronized to your Palm handheld through a click of the mouse. In this article, Shawn Googins and Charles Boxill show you how, with a little slick coding, you can turn coolets into a powerful enterprise tool that can quickly and efficiently distribute information to the Palm handhelds of your sales force, field support, in-house staff, or even your customers.
.AUTHOR Shawn Googins and Charles Boxill
Have you heard of coolets? Coolets, from Coola, Inc. (at http://www.coola.com) are snippets of information that can be effortlessly synchronized to your Palm handheld through a click of the mouse on your Internet connected computer. Coolets can be an event (Date Book entry), Address Book or Memo Pad entry, a signature (your electronic business card), or a document in .PDB format. Coolets can be created by an individual user or generated "en mass" by a webmaster or developer. These coolets are then processed by the Coola server and synchronized to the client’s handheld on a coolet enabled computer.
Prior to performing a HotSync, the individual user has the ability to control which coolets will actually be sent to the Palm handheld by reviewing or editing the "un-synchronized" coolets section of their own Coola account. You can learn more about how coolets work in the article, "A Coola way to get information," by Dan Wolfson in the October 2000 issue of PalmPower at http://www.palmpower.com/issues/issue200010/coola001.html.
After discovering Coola and sending a barrage of signature, event, and memo coolets to defenseless friends and co-workers (overwhelmed at the shear volume of single coolets), I got to thinking. There had to be a way to send multiple coolets encompassing many Date Book events, memos, or Palm documents and to distribute them to a workforce in an enterprise or small business environment.
What if you could interface the production of these coolets with an Oracle database? Imagine your sales force, field support, in-house staff, or better yet, your customers madly synchronizing data with their PDAs (Personal Digital Assistants). Important information that they need, and more importantly, that you want them to have. Staff meeting dates and agendas, project deadlines, client addresses, sports events, promotional materials, safety checklists, driving directions, updated service manuals, product release information, or novels can be synchronized to a Palm handheld using coolets. Towards that end, we’ve come up with "enterprise" coolets.
.H1 Some background
In our environment at the National Institutes of Health in Bethesda, MD we have a staff of health physicists (radiation safety specialists) who are Palm handheld-enabled (using Palm IIIx, Palm IIIxe, Palm V, and Symbol Technologies SPT-1500 devices). Areas of the facility are geographically distributed so that each individual is responsible for safety oversight of approximately 200 laboratories, 600 individuals, and the radioactive materials and radiation producing equipment used in biomedical research in these areas. We run an Oracle 8.0.1.5.0 database on a Microsoft NT network that contains comprehensive information regarding personnel radiation exposure, radioactive materials inventory, receipt and disposal of radioactive materials, laboratory analysis, and survey data. Essentially everything to enable regulatory compliance and a safe working environment is tracked in the database.
.H1 What we did
We set up an intranet "Coola Sync Site" to allow staff members to synchronize common- or area-specific meeting dates, Address Book entries, emergency call lists, staff listings for each area, standard operating procedures (.PDB documents), quick notes (Memo Pad entries), and other safety related information. An example of a central Coola Sync Site can be seen in Figure A.
.FIGPAIR A Here’s an example of a central Coola Sync Site.
An example of an area-specific synchronization point is pictured in Figure B.
.FIGPAIR B Here’s an example of an area-specific synchronization point.
The code for extracting information from our database and making it available in several formats (in this case Address Book and Memo Pad entries) is listed below. However, first you have to install Coola’s software.
.H2 Coola PC software installation
The first step is to configure the client PCs. Figure that it will take approximately five minutes per PC.
First, download and install the Coola.exe file to the client PC from http://www.coola.com. Double-click on the file to begin the installation. You can copy the coola.exe file to your network drive to allow for faster installations.
Next, download and install Coola. Right Click to enable Web page coolet creation by the user. This allows an individual user to create a coolet to capture information directly from a Web page by selecting text and right-clicking.
Finally, sign up for a Coola account for the user.
.H2 Coola handheld software installation
Installation of the Coola.prc file on Palm handhelds should take less than a minute (or whatever your standard synchronization time is). The software allows you to reset your login, as shown in Figure C, and allows you to retrieve coolets on any Coola configured computer, not just your own.
.FIG C The Coola application allows you to reset your login.
It’s important to note that if coolets are retrieved on a "foreign" machine, other complications need to be considered. The HotSync manager needs to be configured to "do nothing" for other applications which may conflict.
.H1 Creating the code
The next step is to implement a routine that will dynamically create an HTML (Hyper Text Markup Language) page containing the hidden fields used to populate the Palmhandheld. In the example to follow, an Oracle PL/SQL (Procedural Language/Structured Query Language) procedure (written using Oracle’s Web Toolkit packages) is used to populate and dynamically create the HTML page. Completion times for this step vary, but the Address Book portion took us approximately one hour. This included coding and debugging.
Here’s the PL/SQL code:
.BEGIN_CODE
CREATE OR REPLACE PACKAGE BODY coolaweb IS
PROCEDURE SYNCDATA (hpcode varchar2) AS
.END_CODE
Cursor AU_CUR is used to generate the hidden fields for an HTML form that will contain a coolet for synchronizing the Address Book. This coolet will be used to update the Address Book information for various active authorized researchers in a given geographical area, specified by the hpcode parameter.
.BEGIN_CODE
CURSOR au_cur (hpcode varchar2) IS
SELECT ‘PARTNERID=XXXXX||RECORDID=’|| TO_CHAR(USER_ID) || ‘||LAST_NAME=’ || rtrim(last_name) || ‘||FIRST_NAME=’ || rtrim(first_name) || ‘||TITLE=’ || decode(title_code,1,’Mr.’,2,’Mrs.’,3,’Miss’,4,’Dr.’,5,’Ms.’,’ ‘) ||
‘||COMPANY=’ || rtrim(u.institute_id) || ‘||ADDRESS=’ || building || building_sufx || floor || wing || room || room_sufx || ‘||CITY=BETHESDA||STATE=MD||COUNTRY=USA’ || ‘||EMAIL=’ || substr(rtrim(E_MAIL_ADDRESS),1,50) || ‘||WORK_PHONE=’ || to_char(phone_num) || ‘||FAX=’ || to_char(fax_no) || ‘||NOTE= USERID(‘ || TO_CHAR(USER_ID) || ‘) MAIL ADDRESS IS ‘ || MAIL_ADDRESS || ‘ HP AREA IS ‘ || HP_CODE || ‘||’ AUCOOLA
from oracle8.users u, oracle8.institutes i where u.institute_id = i.institute_id and u.status = ‘A’ and u.authorized = ‘Y’ and (u.hp_code=hpcode);
aurec au_cur%ROWTYPE;
.END_CODE
Cursor MEMO_CUR is used to generate the hidden fields for an HTML form that will contain a coolet for synchronizing the Memo Pad.
.BEGIN_CODE
CURSOR memo_cur is
select ‘PARTNERID=12345||RECORDID=’|| SUBSTR(S.section_name,1,66) || ‘||TITLE=’||S.SECTION_NAME || ‘||NOTE=’ || S.section_topic || ‘||’ MEMOCOOLA from oracle8.sections s where s.disable=’Y’;
memorec memo_cur%rowtype;
i integer;
.END_CODE
Build the HTML page to display the coolet using the Oracle PL/SQL Web Toolkit packages.
.BEGIN_CODE
BEGIN
htp.htmlOpen;
htp.headOpen;
htp.title( ‘Coola Web Site’);
htp.print(‘‘);
htp.print( ‘‘ );
htp.print(‘‘);
htp.headClose;
htp.bodyOpen(cattributes =>’class =”bodycopy1″‘);
.END_CODE
Generate the form containing hidden fields for the Address Book coolet using the AU_CUR cursor.
.BEGIN_CODE
htp.formOpen( curl => ‘http:\//www.coola.com/cgi?bin/addinfo.cgi’, cmethod => ‘POST’,cattributes =>’onsubmit=”coolapopup()” TARGET=”coolawindow”‘);
i:=0;
for aurec in au_cur(hpcode) loop
i := 1;
htp.formHidden(cname => ‘ADDRESS’, cvalue => AUREC.AUCOOLA);
end loop;
htp.tableOpen( calign => ‘CENTER’, cattributes => ‘ border=”1″ cellspacing=”0″ cellpadding=”0″ width=”100%”‘ );
htp.tableRowOpen;
htp.tableData( htf.centerOpen ||
‘This Snap shot syncs the data for Authorized Users in HP Area ‘ || hpcode || ‘‘ ||
htf.centerClose,cattributes =>’width = “100%”‘);
htp.tableRowClose;
htp.tableRowOpen;
if i != 0 then
htp.tableData( ‘‘, cattributes => ‘ width=”100%”‘, calign => ‘CENTER’);
else
htp.tableData( ‘No Authorized Users for this HP Area‘, cattributes => ‘ width=”100%”‘, calign => ‘CENTER’);
end if;
htp.tabLERowClose;
htp.tableClose;
htp.formClose;
.END_CODE
Generate the form containing hidden fields for the Memo Pad coolet using the MEMO_CUR cursor.
.BEGIN_CODE
htp.formOpen( curl => ‘http:\//www.coola.com/cgi?bin/addinfo.cgi’, cmethod => ‘POST’,cattributes =>’onsubmit=”coolapopup()” TARGET=”coolawindow”‘);
htp.tableOpen( calign => ‘CENTER’, cattributes => ‘ border=”1″ cellspacing=”0″ cellpadding=”0″ width=”100%”‘ );
htp.tableRowOpen;
htp.tableData( htf.centerOpen ||
‘Special Announcements ‘ ||
htf.centerClose,cattributes =>’width = “100%”‘);
htp.tableRowClose;
htp.tableRowOpen;
htp.tableData( ‘‘, cattributes => ‘ width=”100%”‘, calign => ‘CENTER’);
htp.tabLERowClose;
htp.tableClose;
for memorec in memo_cur loop
htp.formHidden(cname => ‘MEMO’, cvalue =>MEMOREC.MEMOCOOLA);
END LOOP;
htp.formClose;
htp.bodyclose;
END;
END coolaweb;
.END_CODE
An important point to note here is that hidden fields for updating both the Address Book and Memo Pad, as well as .PDB files, can be placed in one HTML form.
The general format for a coolet to be placed in an HTML page itself is listed below. It’s extremely important to note that each record has a unique record ID.
The HTML command that displays the button on the HTML page and transfers the information coolet is divided into the following four sections. The sample code pictured in Figure D is provided courtesy of Coola.
.FIGPAIR D The information coolet is divided into four sections.
.H2 Section 1
Section 1 loads a small JavaScript that’s used to pop up a menu-less, title-less window that notifies the user whether the coolet was loaded properly. The script also closes the window after 10 seconds. This section should appear only once on the page before all the Coola buttons, even if you have multiple buttons on the page.
.H2 Section 2
Section 2 begins the FORM tag.
.H2 Section 3
Section 3 loads an image from the Coola hub that’s displayed as the synchronization button. Partners can cache this button on their Web site for better performance.
.H2 Section 4
Section 4 specifies the information to be sent to the Coola hub when a Coola user clicks on the Coola synchronization button. This field has TYPE hidden so it doesn’t display on the Web browser. This section is repeated multiple times for multiple coolets.
.H1 Test the application
We have a number of development devices that are configured with all the identical software that’s used in the field. We have successfully synchronized several hundred Address Book entries and attached Address Book notes to these entries. In addition, we have created multi-entry type coolets that simultaneously contain address book entries, memos, documents, and date book entries. This enables one button to add a meeting date, an address contact for the meeting, and a meeting agenda to the Palm handheld all at once.
Hopefully this article has helped you think about coolets in a new way. This can be an extremely valuable technology for the enterprise.
One final note: the use of trade and product names in this article does not imply endorsement of the product by the National Institutes of Health. The opinions expressed are those of the authors and do not constitute official policy.
.BEGIN_SIDEBAR
.H1 Product availability and resources
For more information on Coola, Inc., visit http://www.coola.com,
For the article, "A Coola way to get information," by Dan Wolfson in the October 2000 of PalmPower, visit http://www.palmpower.com/issues/issue200010/coola001.html.
For more information about Palm computers, visit http://www.palm.com.
.H1 Bulk reprints
Bulk reprints of this article (in quantities of 100 or more) are available for a fee from Reprint Services, a ZATZ business partner. Contact them at reprints@zatz.com or by calling 1-800-217-7874.
.END_SIDEBAR
.BIO Shawn Googins, M.S., CHP is Chief of the Technical Services Section in the Radiation Safety Branch of the Division of Safety, Office of Research Services, NIH, Bethesda, MD. He is an avid Palm handheld user and Oracle DBA. Charles Boxill is a Senior Applications Programmer/Analyst for Computer Management Associates (CMS), Burtonsville, MD. Charles has become a Palm convert.
.DISCUSS http://powerboards.zatz.com/cgi-bin/webx?50@@.ee6f61d


