Freshly Baked Project

29 Apr 2021

Baking

Recently I got back into baking, more specifically baking bread. The basic ingredients for most breads are flour, yeast, sugar, salt, and water. The addition of other ingredients produces different types of breads, airy, dense, sweet or savory, but the dough is pretty much the same. Before the bread is baked or steamed, there are many actions that are done to the dough like proofing (activating the yeast for the dough to rise), kneading, and punching down. Weather conditions play a role in knowing how long or quick the dough will proof. Depending on the type of bread, multiple kneads and proofs may be required, as well as how long to knead, I kneaded a dough for seven minutes! As the baker, creative liberties are taken to shaping and decorating the dough.

“Kneading” Patterns

Design patterns can be applied to bread baking. The basic dough is the factory method’s object and added ingredients are the child classes. The baker uses the observer pattern to monitor the conditions and events of the dough that triggers actions like punching it down and kneading, shaping the dough, and baking or steaming. In a model-view-controller pattern, the ingredients are the model, the dough and baker are the views, and the controller takes the actions from the baker, interacts with the model and views. For example: the baker combines the ingredients to form a dough, the yeast activates causing the dough to rise. The baker punches down and kneads the dough once or multiple times. When the dough is ready, the baker shapes and bakes the dough, resulting in freshly baked bread.

Mainly MVC

In programming projects I’ve created, I mainly use the model-view-controller design pattern where a SQL server or Microsoft Access database is the model. The views are the web pages and forms that contain actionable items like buttons for the end user to interact with the model. The buttons act as the controller to perform a certain type of action such as generating a report or saving data.