💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide.
The Adapter pattern is really useful if you need to connect your application with another system, but you can't change the code of that system and you want to reduce coupling. In this video, I show you how the pattern works, and then show you a functional variant of the pattern using partial application.
The code I worked on in this video is available here: https://github.com/ArjanCodes/2022-adapter.
🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/
🎓 Sign up to Brilliant now and get 20% off the annual subscription: https://brilliant.sjv.io/arjancodes.
🔖 Chapters:
0:00 Intro
0:55 Explaining the example
2:13 Using another config type
3:16 What is the Adapter pattern?
3:57 Object-based Adapter
5:33 Changing the code to use an (object-based) XML adapter
12:21 Class-based Adapter
13:12 Changing the code to use a class-based adapter
15:25 Using a partially applied function as an adapter
18:44 Changing the XML adapter to a functional variant
#arjancodes #softwaredesign #python