I’ve been working at Subway for a while now and I think that the use of design patterns relates closely to the sandwich making process. My design pattern process consists of two steps. I first think about the layout and how I want the program to look when someone uses the app. The second step is working on the functionality of that program. This relates to sandwich making because the layout is the bread of the sandwich and the functionality is everything else inside the sandwich.
How is the layout like the bread of the sandwich? Well you can’t really have any functionality without having something interactive on the program. For example you first have to create the button in order to make the button do something. Yes, there are some onload functions that you could use, but other than that, the layout or skeleton must first be created. This is like the bread of a sandwich because you first have to bake the bread before you even start putting together the sandwich.
The functionality of a program comes after the layout or skeleton is created. The functionality can be as simple as a button that changes it’s own text when you click it. The functionality is like the meat, veggies and condiments of a sandwich because the bulk of the sandwich comes after you bake the bread. Just like the functionality of the program you can add whatever you’d like to the sandwich and can be as simple as just lettuce.
Overall the design patterns that I use are like building a sandwich. To make the sandwich you must first bake the bread and then add everything else. To make a program the layout or skeleton must be created and then the functionality is added after. By using this process it becomes easier to build programs by splitting them up into two parts.