Gooop was created out of a personal need to learn Go and to apply object-oriented programming (OOP) principles in Go. Although Go is not what I would consider to be an object-oriented language under-the-hood with messages and objects, it does provide powerful tools such as structs, object methods, interfaces, and composition to develop object-oriented applications. Is Go an object-oriented programming language? Maybe.
The primary inspiration for this project came from my experience of learning OOD in Ruby with the book from Sandi Metz titled "Practical Object-Oriented Design in Ruby" (POODR). I consider this to be THE standard in OOD and this project walks through each chapter with examples written in Go rather than Ruby.
Further inspiration for working on this project came from one of my favorite episodes of Go Time: "Might Go actually be OOP?" hosted by Ronna Steinberg. I also attended a session of Ronna's at Gophercon 2022: "A Path to Object-Oriented Design with Go". In that session we worked through the https://github.com/ronna-s/go-ood/ repo that provides an excellent walk through of applying OOD principles in Go.
Topic | POODR Chapter |
---|---|
Single Responsibility | 2 |
Managing Dependencies | 3 |
Flexible Interfaces | 4 |
Duck Typing | 5 |
Inheritance | 6 |
Modules | 7 |
Composition | 8 |
Testing | 9 |