Previous Lecture | Exercises | Top Level

Basic Client/Server Model

"Don't write big programs"

Contents


Next Section | Contents

Divide and Conquer

As programs get bigger, the number of possible interactions between parts of the program increases dramatically:

complexity

In order to keep this complexity increase under control, different ways of chunking parts have emerged. We have already met two techniques:

Chunking into subtasks
One way to do this is to align the tasks into a pipeline. Every element in the pipeline performs a particular task and hands over the result to the next element in line. As we have seen in lecture 4, our monopoly project consists of a two element pipeline, of which we are only going to do the first one: the monopoly engine.

Chunking into objects
Objects provide a way to group data and functions into one structure. We thereby encapsulate and hide the internal communications between the elements within an object and provide a clean interface for other objects to use.

Both techniques work by reducing the number of relationships between objects, like so:

decomposition


Next Section | Previous Section

Streamlining Communications

Another way to simplify big programs is to streamline the way objects interact:

protocol


Next Section | Previous Section

Client/Server in our Monopoly Project


Contents | Previous Section

Delegation in our Monopoly Project


Previous Lecture | Exercises | Contents
Christian Goetze