Implementation :


Client-server model
This program consists of two modules, drawserver and drawclient. The work at server side is basically connection setup, messages broadcast and connection termination. Most of the work is at the client side. The advantage of this strategy is scalability. One user or ten users doesn't make much difference in terms of performance because the work load at the server doesn't increase too much. The connection is setup by socket. All the communication among clients and the server is message passing. Any action in the application can be transformed into an corresponding message and then it can be sent to notify other clients the change. The messages of the private canvas is buffered first and sent out until the SHOW button is pressed. String- capability of Java is very useful for this kind of message passing and processing.
Multi-threaded application
At the server side, whenever a connection is set up, a socket-handler thread is created to handle all the communication to and from that client. It is much more efficient compared to one single thread structure because if one socket handler is blocked (when the client is idle), others can still continues without the waste of CPU time. At the client side, there is a thread in charge of updating the changes by other clients. Whenever there is some change, the main thread will be notified and update its own public canvas. Any local window event is actually a thread then it occurs. In a word, multi-threaded structure greatly enhances the efficiency at both the server and the client side.
Graphical user interface
Almost every kind of window components is used in this application. Buttons, images, scrollbars, choices, textfields, canvases and checkboxes are used for different purposes. Java has a good support for layout management. It is easy to have different layouts by using different layout managers in the library.
Object-oriented programming
Java is a object-oriented language inherited from C++. In addition to the ordinary class inheritance, the very special feature in C++ and Java is delayed-binding, which is the keyword "virtual" in C++ and "abstract" in Java. That means the type of the object and its methods is determined until run-time. The shapes which are created in the object mode of WebPainter are good applications of this concept. That is, line, rectangle, circle and triangle inherits from the SHAPE class, however, we can't determine what kind of shape it is until it is created by the user.

In the process of the development of WebPainter, I found that Java is absolutely the best programming language not only in Internet programming but also in general software development. It is friendly, extendible, portable, complete and useful. I think it will be the main stream of software development in the near future.