C# .NET Web Developer's Guide

Example TCP Command Transmission and Processing

The example in this section has a strict separation between the presentation layer and the functional layer. The presentation layer is the user interface (UI). In this example, you use a console application because you should focus first on communication and then concentrate on creating a good-looking UI. The functional layer is the part of the application that does all the work for example, a business object for calculating something. Figure 5.12 shows the simplified architecture of the first example.


Figure 5.12: Example Architecture

For the presentation layer, where the functionality is executed is unimportant. You can implement the functional layer within the same application, in another process on the same computer, or on another computer anywhere in a LAN or on the Internet. To make this architecture more flexible, you will add a command processor between the presentation and functional layers. The command processor is a standardized interface for the functional layer. The presentation layer is giving its requests in the form of commands to the processor. The processor is executing methods of the functional layer based on the commands. Finally, the command processor will take the results and give it back to the presentation layer. Figure 5.13 shows the extended architecture.


Figure 5.13: Example Architecture with Command Processor

The command processor makes it simple to access the functional layer in various ways either within the same application or via network communication on another computer. Figure 5.14 shows an example with a...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Protocol Stack Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.