Twin Cities Code Camp

David Berry

Applying Design Patterns to Everyday Problems

by David Berry

Sat, Apr 21, 2018
Room: Garden Room
Time: 13:45

Have you read about design patterns but weren’t quite sure how or where to apply them in your application? Have you heard of principles like loose coupling and programming to an abstraction, but didn’t know if you were really doing it right? If so, this talk is for you. In this talk, I’ll work from several example code segments and show how to recognize which design pattern would be appropriate. I’ll then show how to refactor the existing code to use the chosen design pattern and demonstrate how the resulting code is more understandable, easier to maintain and easier to test. Among the examples I will show is how a dependency on an external system can be refactored using an interface and applying the bridge and adaptor pattern. I’ll also show how to use the decorator pattern to cache results from an external call. Finally, I’ll show examples of how patterns like the strategy pattern and chain of responsibility pattern can replace large blocks of if/else if statements to create a simpler design that is easier to test. When this talk is complete, you will have a good idea of how to recognize where these patterns can be applied in your codebase and how you go about implementing them.

About the Author

I'm a Solutions Architect with over 20 years of experience in building software systems. I started out as a Java developer and then switched to .NET in 2003. I've also done significant work with SQL Server and Oracle. I'm a Pluralsight author and have presented at community events throughout the Midwest.. I try to bring a pragmatic approach to everything I do, making sure the software I build is simple, understandable and balances responsibilities between different components of the system. When speaking or teaching, I emphasize real world scenarios encountered by developers every day and show how to solve them so you can be more effective at what you do.