When working with concrete5 blocks and single pages, you'll come in contact with a pattern called MVC. It's short for Model-View-Controller and is one of the most-used patterns in software design.
It tries to make sure that the code stays clean, has a structure which is easy to understand, and keeps the application stable. It achieves this by splitting the code into different parts. Let's have a look at the following diagram:
We've added two elements, Browser and MySQL Database, which don't belong to the actual pattern. They are just included to make it easier for you to understand how this pattern works. You can see that if you request a page, it will be forwarded to Controller. The validation of the data should be a part of Model, and View contains the actual output template. Controller knows how to handle all of these parts. It's the element that connects most of the things.
If there is any persistent data involved, you'll quite likely have...