The front controller pattern has saved me a ton of time in my recycling efforts.  I started recycling about 2 years ago.  My first procedure was unsatisfactory.  I bought two trash cans, and would put all the trash we identified as recyclable into them.  Once they were full I would take them to the recycling center and put them in the appropriate containers.  The sorting procedure was executed at the facility and everything was sorted at one time.  This was both a time consuming and tedious procedure (kinda gross too).

Enter the front controller pattern…

I decided to buy separate containers and sort trash on the fly.  By moving the sorting procedure to the ‘front’ of the process, I was able to save time and effort.  Now I spend about 5 minutes at the facility and don’t have to handle any stinky trash.  From time to time I see a person who is sorting at the facility.  If only they knew how easy it was to implement the front controller.

Design Patterns for Everyday Living is a regular feature that describes how we can apply software design principles to our daily life.  Saving time, increasing productivity, and gaining a better understanding of their use in the software world.

View more Design Patterns for Everyday Living

Tags: ,