Chat Application

In this example we will create a "chat" application from scratch then enhance it to sort typed data by lines. The chat application conveys typed-in lines between two computers. In an enhancement, lines typed into one computer appear sorted on the other computer.

Step 1: Create an application with the basic function on one computer

Discussion: The text box widget in the palette is of a "multiple line" variety but there is also a "single line" variety. A single line text box will defocus when the user types "return."

Step 2: Make the program run on two computers

Discussion: During execution, each NetAlive instance is both a client and server; they use an extension of HTTP permitting program loading.

Step 3: Adjust the GUI's appearance

Discussion: Just like any IDE, NetAlive lets you edit a program and then test it. This requires extra technology because NetAlive's applications span multiple computers. The extra technology must first figure out which version of the application is newest and then propagate the newer program across the network. Resizing the widgets on MONO creates a newer version of the program through a mechanism involving a document's "dirty bit" and a version number. A new version arriving across the network supersedes the old version on COLOR.

Step 4: Add sorting

Discussion: Note that the sort task has a "button" border whereas the others have a "resizing" border. There are two types of tasks: Functional tasks appear in the functional views with a button border and do not appear at all in the document views. Widget tasks appear in the functional views with an ornamental resizing border. This is a mnemonic that widgets can be resized, but they can only be resized in the document views. Widget tasks initially appear in the document view at the same position and size as in the functional view, but the user may move and resize them.

Automatic GUI Support for Concurrency

The colored borders in the previous figure are a result of Net Alive!'s automatic generation of visual cues for concurrent actions. The GUI cannot ignore Internet delays because they are too long. To accommodate this, the NetAlive system creates visual queues in the GUI to for the benefit of the user. Specifically, NetAlive follows the Intertask's graph forwards and backwards from each task causing delay to a task visible to the user. Tasks found in the forward direction get a red border indicating 'pending change' and the backward tasks get a green border indicating 'data still being processed.' The adjacent figure was "snapped" immediately after typing "2 1" so the green border is still visible. The GUI remains fully functional during delay.

Completing the Application

[Up][NetAlive Home Page]