Splitting Excel into different pieces
We use Excel so much that we don’t pause to think how powerful it is. While it looks like a single block, Excel can be broken down into many different components. Figure 1.8 shows one simple way of breaking out Excel into different parts.
Figure 1.8 – Excel broken into simple model, view, controller pieces
This pattern is a way of breaking up Excel into more simple parts, each with one key job to do:
- You give commands to Excel using the controller. Typically, this means clicking on a command in the toolbar, on the menu, or elsewhere on the page, which makes Excel do something. This something usually changes the model.
- The model is how Excel stores its data. If you’ve imported CSV or other non-Excel formats before, you may have a clearer idea of this. These formats are pure data, without any functions or VBA code.
- Excel can present this data as one or more views. When the model updates...