Laura Lemay
201 West 103rd Street, Indianapolis, Indiana 46290
Copyright © 1997 by Sams.net Publishing
FIRST EDITION
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. For information, address Sams.net Publishing, 201 W. 103rd St., Indianapolis, IN 46290.
International Standard Book Number: 1-57521-255-2
Library of Congress Catalog Card Number: 96-71499
2000 99 98 97 4 3 2 1
Interpretation of the printing code: the rightmost double-digit number is the year of the book's printing; the rightmost single-digit, the number of the book's printing. For example, a printing code of 97-1 shows that the first printing of the book occurred in 1997.
Composed in XXX and MCPdigital by Macmillan Computer Publishing
Printed in the United States of America
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams.net Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.
Publisher and President: Richard K. Swadley
Publishing Manager: Mark Taber
Director of Editorial Services: Cindy Morrow
Assistant Marketing Managers: Kristina Perry
Rachel Wolfe
Acquisitions Editor
Mark Taber
Development Editor
Fran Hatton
Software Development Specialist
Bob Correll
Production Editor
Mary Inderstrodt
Copy Editors
David Bradford
Fran Hatton
Chuck Hutchinson
Ryan Rader
Indexer
Tom Dinse
Technical Reviewer
Jeffrey Vagg
Editorial Coordinator
Katie Wise
Technical Edit Coordinator
Lorraine Schaffer
Resource Coordinator
Deborah Frisby
Editorial Assistants
Carol Ackerman
Andi Richter
Rhonda Tinch-Mize
Book Designer
Alyssa Yesh
Copy Writer
Peter Fuller
Production Team Supervisor
Brad Chinn
Introduction
Part I An Introduction to Castanet
1 Castanet Tuner
2 Installing and Configuring the Tuner
3 Using The Tuner
Part II Castanet Transmitter
4 Installing and Configuring the Transmitter
5 Installing and Broadcasting Channels
6 Transmitter Administration and Performance Tuning
Part III Developing Channels
7 How Channels Work
8 Building Simple Channels
9 Creating Presentations and Channels with Bongo
10 Creating Application Channels
11 Managing Updates and User Information
12 Creating Transmitter Plug-Ins
13 Inside WordSmith
14 An Overview of the Marimba Classes
Part IV Appendixes
A Tuner Reference
B Transmitter and Publish Reference
C Tuner Extensions
Index
To Marimba, for asking me to write this book and for being so helpful while it was being written, and especially to Maurice Balick, Sami Shaio, Arthur van Hoff, Jonathan Payne, and Josh Sirota for answering silly questions.
To all the nice folks at Sams.net for tolerating my oddities, and particularly to Mark Taber and Fran Hatton, without whom these books would not A. exist, B. be as good as they are.
To all the things that kept me sane during the writing of this book: Mary Toth (the uber-assistant), Mountain Dew, grande-skim-lattes, the WeLL, the Barnes & Noble in Redwood City CA, www.amazon.com, www.cdnow.com, www.minds.com, www.stim.com, www.salon1999.com, www.motorcycle.com. And Eric, of course.
In just two years, Laura Lemay has gone from being an overworked, overstressed technical writer to being one of the most popular overworked, overstressed computer book authors in the country. A confessed nerd, she lives in Northern California with a boyfriend, two cats, eight computers, too many motorcycles, and enormous electric and Internet bills. She has written several incarnations of Teach Yourself Web Publishing with HTML, Teach Yourself Java in 21 Days, and is the series editor for the Laura Lemay's Web Workshop books, all published by Sams.net. She also writes a monthly column on HTML for Web Techniques Magazine and hosts the Web Tech conference on Electric Minds (http://www.minds.com/).
If she had any spare time, she would probably spend it trying to catch up with her e-mail. Visit her Web site at http://www.lne.com/lemay/.
As a reader, you are the most important critic and commentator of our books. We value your opinion and want to know what we're doing right, what we could do better, what areas you'd like to see us publish in, and any other words of wisdom you're willing to pass our way. You can help us make strong books that meet your needs and give you the computer guidance you require.
Do you have access to CompuServe or the World Wide Web? Then check out our CompuServe forum by typing GO SAMS at any prompt.
NoteIf you have a technical question about this book, call the technical support line at (800) 571-5840, ext. 3668.
As the publishing manager of the group that created this book, I welcome your comments. You can fax, e-mail, or write me directly to let me know what you did or didn't like about this book–as well as what we can do to make our books better. Here's the information:
Fax: 317/581-4669
E-mail: newtech_mgr@sams.mcp.com
Mail: Mark Taber
Sams.net Publishing
201 W. 103rd Street
Indianapolis, IN 46290
1996 was the year Java took over the world–or so it seemed, from the amount of attention that was given to Sun's language for creating secure, cross-platform applications on and off the Internet. Everywhere you looked, it seemed, there were books, magazines, news articles, announcement of Java products, conferences, and organizations all about working with Java. Although the excitement has faded somewhat, Java companies are still being formed, and Java programmers are still at the top of recruitment lists.
During the Java craze, huge numbers of small startup companies sprang up, dedicated to working with Java. Marimba is one of those companies, formed in February of 1996 by four founding members of the original Sun Java team. Marimba's goal, as stated on their home page, is to "provide the tools and infrastructure for creating a new breed of network-managed applications for consumers and businesses." The implicit goal for Marimba is that they're building on the strengths and success of Java to create a whole new way of creating and distributing applications. In many ways, Marimba is taking Java beyond flashy but pointless Web-based applets to the next step, where Java can really begin to fulfill it promises and live up to–or even exceed–the hype.
Marimba's first two products are Castanet, a mechanism for creating and distributing applications over the Internet, and Bongo, a presentation builder that allows you to create Java applications and interfaces without knowing a whole lot of Java code.
Castanet is the focus of this book. Castanet is made up of two major parts: the Castanet Tuner, which you install on your desktop system and use to locate and subscribe to software channels, and the Castanet Transmitter, which broadcasts or publishes those same channels so that tuners can locate them. Once you've downloaded a channel using a tuner, all updates and changes to that channel–new code features, new information, new data–become available and are downloaded automatically.
This book covers all aspects of Castanet, including installing and using both the Castanet Tuner and Transmitter, as well as full coverage of actually developing Castanet channels. Regardless of the interest you have in Castanet–from the user, administrator, or developer side–this book will provide ample information for getting started with Castanet.
What does the "Official Marimba Guide" mean? It means this book was written with the cooperation and input of the actual Marimba engineers. Unlike other books you might find on the subject, The Official Marimba Guide to Castanet is the only book with the Marimba stamp of approval.
Also available is the Official Marimba Guide to Bongo, which covers Marimba's tool for creating presentations and user interfaces. Although you don't need that book to understand Castanet (the two products and the two books can work equally well independently of each other), there might be some overlap with topics in this book that are explained in more detail in the Bongo book. I'll point these out as they occur throughout the book.
This book covers the features of the 1.0 versions of the Castanet Tuner and Castanet Transmitter software, as well as the procedures for developing channels for Castanet. However, because this book was written before the final version of the software was shipped, there might be very minor differences between the descriptions and pictures in this book and the actual software that you will install and use. These differences should not interfere at all with the procedures in this book or prevent you from using any part of the Castanet technology.
Is this book for you? Probably. If you've picked up this book in a store and read this far, you'll most likely be able to use at least some part of this book. Regardless of whether you're just curious about the Castanet technology, if you want to know how to use the Tuner or the Transmitter, if you've been told to get Castanet up and running for your organization, or if you really want to create your own Castanet channels, there's something in this book for you.
This book is split into fourteen chapters and four parts (including appendixes). Each part provides a different view of the Castanet Technology; you can start at the beginning and progress through learning about the using Tuner, installing and administering the Transmitter, and creating your own channels.
Part I: "An Introduction to Castanet" provides a general overview of the Castanet technology. This will explain what Castanet is all about and why it's really cool.
Chapter 1: "The Castanet Tuner" covers Castanet from the user side–installing and using the Castanet Tuner to subscribe to and use Castanet channels.
Chapter 2: "Installing the Castanet Tuner" explains just that–how to get the Tuner installed, configured, and running on your system.
Chapter 3: "Using the Castanet Tuner" describes the various things you can do with the Castanet tuner and with channels. If the Tuner can do it, you'll learn about it here.
Part II: "The Castanet Transmitter" moves to the other side of the network and describes how to set up and use the Castanet Transmitter to publish and distribute channels.
Chapter 4: "Installing and Configuring the Castanet Transmitter" explains how to install and set up the transmitter on your own system.
Chapter 5: "Installing and Publishing Channels" shows how to make channels available on the transmitter you just installed, including how to set up the channel directory and create channel properties.
Chapter 6 "Transmitter Administration and Performance Tuning" explains how to fine-tune the transmitter for performance after you've got it install and running. It also explains basic transmitter administration and the various forms of log files the transmitter creates.
Part III: "Developing Channels" takes you from Castanet software user to Castanet software producer. In this section you'll learn how to create your own channels, from HTML pages, from applets, all the way up through using Java to create sophisticated updateable channels.
Chapter 7: "How Channels Work" describes, well, how channels work. In this chapter you'll get a more in-depth view of the Castanet update process–how channel data moves from your development directories to the transmitter and eventually to the tuner, and learn about channel feedback and security.
Chapter 8: "Building Simple Channels" provides an overview of how to put together a channel from an HTML Web site or an applet, and describes how to publish and use that channel.
Chapter 9: "Creating Presentations and Channels with Bongo" moves to the next level of channel development: creating presentations with the Castanet Bongo tool.
Chapter 10: "Creating Application Channels" describes how to create full-fledged Castanet channels in the Java language, including how to interface those channels to Bongo presentations and to convert existing Java applications into channels.
Chapter 11: "Managing Updates and User Information" describes the methods and procedures to use in your Java channels for managing automatic updates (to both running and non-running channels) and for saving local state files.
Chapter 12: "Creating Transmitter Plug-Ins" describes how to create programs for the transmitter side of the technology that can receive channel feedback and customize the contents of a channel.
Chapter 13: "Inside WordSmith" provides a walkthrough of a more complex channel that uses many of the features described in previous chapters.
Chapter 14: "An Overview of the Marimba Classes" provides a high-level overview of the Java classes available for developing presentations and channels as part of the marimba packages.