Table of Contents Previous Next
Logo
Chapter 3
Copyright © 2003-2008 ZeroC, Inc.

Chapter 3 

A Hello World Application

3.1 Chapter Overview

In this chapter, we will see how to create a very simple client–server application in C++ (Section 3.3), Java (Section 3.4), C# (Section 3.5), Visual Basic (Section 3.6), Python (Section 3.7), and Ruby (Section 3.8). Rather than reading the entire chapter, we suggest that you read Section 3.2 and then skip to the section that deals with the programming language of your choice.
The application enables remote printing: a client sends the text to be printed to a server, which in turn sends that text to a printer. For simplicity (and because we do not want to concern ourselves with the idiosyncrasies of print spoolers for various platforms), our printer will simply print to a terminal instead of a real printer. This is no great loss: the purpose of the exercise is to show how a client can communicate with a server; once the thread of control has reached the server application code, that code can of course do anything it likes (including sending the text to a real printer). How to do this is independent of Ice and therefore not relevant here.
Note that much of the detail of the source code will remain unexplained for now. The intent is to show you how to get started and give you a feel for what the development environment looks like; we will provide all the detail throughout the remainder of this book.
Table of Contents Previous Next
Logo