Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 3.4

REVIEW

ChitChat 1.1.3b

Issue: 3.4 (March/April 2005)
Author: Greg Fiumara
Article Description: No description available.
Article Length (in bytes): 4,338
Starting Page Number: 8
Article Number: 3402
Related Web Link(s):

http://chit.sourceforge.net/

Full text of article...

Increasingly, people are turning away from commercial products and turning to open source solutions. One example of this would be not buying Microsoft Office in favor of downloading the free Open Office. These applications are made possible through the hard work of several programmers who code in their spare time to create better, free alternatives. One alternative for the Yahoo! Chat program is a REALbasic open source project called ChitChat, headed by the developer "GostCoder." New and experienced REALbasic programmers alike can use open source endeavors and turn them into learning experiences. One may even find that they become eager to join the open source development community.

ChitChat, although now only for the Mac OS, was originally a cross platform Yahoo! Chat client. Even though Windows is no longer being supported, the code still compiles and runs for Windows. Programmers can learn from the code how to better support multiple platforms from one set of code.

Because ChitChat deals with the Internet, the program makes extensive use of the socket control for TCP/IP communications. Most of the communication deals with proprietary Yahoo! server commands, however the third party httpSocket class by Dan Vanderkam is used to do so. The code GostCoder uses provides the beginning programmer with advice on Internet protocols without having to duplicate the efforts of others.

One of the most beneficial learning points of ChitChat is the main message window. While running the application, one can see that ChitChat beautifully styles text sent by the end user and other chat members. What you see in REALbasic is that instead of a styled editfield, a custom canvas-based control is used. Powering that canvas is a parsing engine and a posting engine. The parsing engine, ChatFieldEngine, among other things, interprets emoticons and HTML styles for REALbasic and then forwards the information to the posting engine. The posting engine places the new styled "text" into the canvas. Although the code looks confusing, the process is very speedy and the display is smooth.

Much of the code in ChitChat is antiquated. Those who have spent many years programming with the various versions of REALbasic may have used several interface "tricks" to support features REALbasic lacked. For example, when balloon help was deprecated in favor of "tool tips," programmers created a borderless window with a yellow background to simulate a tool tip window. When mice with scroll wheels became popular, programmers created canvas controls to compensate. As REALbasic has advanced, support for the aforementioned items has been added, yet these tricks are still used with ChitChat. These hacks slow down the performance of the application greatly and clutter the project with redundant code. The most current release of ChitChat was compiled with REALbasic 5.5 so there is no reason for keeping the hacks.

Supporting projects like ChitChat is important to the success of the open source movement. Although full of needless code, ChitChat provides for an excellent learning opportunity and a great alternative to other applications.

End of article.