Today, the bridge design pattern! Twitter: / panpit0 • 🧠 DESIGN PATTERNS 🧠 • 🎥 GO FOR IT! 🎥 • 📚 PUBLISHING YOUR LIBR... • 💥 ALL ABOUT GO 💥 --- Golang version: 1.16 IDE: Goland OS: Windows Accent: French
Пікірлер: 5
@ozzyfromspace Жыл бұрын
Funny, I use this pattern all the time but didn't know it had a name 😂. I'm working at a startup where our go server uses a ports-and-adapters architecture, and this "bridge" pattern is how we define all of our functions; using interfaces instead of types. That way, if we have a function that, say, expects MongoDB (which is, at the end of the day, just a database with CRUD operations) we can replace it easily with another db that has the same operational interface. We create interfaces for all our backend resources and entities, then use dependency injection on functions and structs use this bridge pattern. Awesome video! tiny correction: I believe you mean't "area" whenever you wrote "perimeter". Otherwise, excellent presentation, Panpito!
@deadwait3162 жыл бұрын
thanks you for all your videos, I find the explanations very easy to understand. Will wait for more stuff.