magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 10 > Features  

A Design Pattern for Inter-Applet Communications

Joseph Cozad

Network-based applications today are becoming increasingly complex, using Web browsers to tie together different technologies like HTML, JavaScript, CGIs, Java, and frames. Sometimes these applications call for more than one Java applet to function. When working with projects that use these applications, developers inevitably ask themselves, "How can I make two or more applets talk to each other effectively?" In some situations, especially if the applets exist in two separately loaded Web pages, the solution to this problem can seem challenging at best.

Inter-applet communication presents several considerations: In what context are applets located? Are the applets within the same HTML document or distributed across several frames or browser windows? Should the applets maintain references to all the other applets in the application? How do the applets recognize what other applets are available? This article will offer three approaches to solving the inter-applet communication question. It will also examine applets within the context of the same HTML document, distributed across several frames, and distributed across several windows. I'll look at an all Java-based implementation method and a Java/Java Script implementation method, and the considerations involved when applying each method to a particular context.

The Basics

As an example, I'll use two simple applets. One is responsible for accepting some text from the user and sending that text to the other applet for display.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2