Looking at modules

To show how crates are put together, we are going to create one. In this case, it will be a simple math crate.

Before we consider this, let's consider something we all know: a car. We will consider the car a crate, as everything to do with the car is held within it.

To start, let's think about the main parts of the car: the engine, fuel, interior, wheels and movement, and electrics.

There are more but, for now, we will ignore them. Let's represent this as a block diagram to make the relationship clearer:

We can, of course, split up each of these blocks (for example, we can split the electrics into ignition, audio, windows, heated windscreens, lights, and interior fan).

The car is the crate. Each block is a module. Each split is a submodule. It's now quite simple to see how crates can be visualized.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset