Golang – Dave Cheney talking about SOLID Go Design principle

I started learning Golang since last year and till today I have had some go API built and in production for some medium and large projects.

As a programmer coming from a PHP background, Golang’s concurrency model looks mind-blowing to me in the first place and the performance is indeed awesome.

The outcome of my recent project for Glencore Australia calculation API speed upgrade was astonishing – the 7-year old legacy calculation API – which was written in Python – had been re-written completely in Go. The performance gain was pretty much guaranteed as we knew it even when in the early stage of planning and prototyping. Just as what Dropbox did a while ago – follow the link to read the Dropbox official blog post “Open Sourcing Our Go Libraries”:

Dropbox owes a large share of its success to Python, a language that enabled us to iterate and develop quickly. However, as our infrastructure matures to support our ever growing user base, we started exploring ways to scale our systems in a more efficient manner. About a year ago, we decided to migrate our performance-critical backends from Python to Go to leverage better concurrency support and faster execution speed. This was a massive effort–around 200,000 lines of Go code–undertaken by a small team of engineers. At this point, we have successfully moved major parts of our infrastructure to Go.

It’s been a year now and I’m quite enjoying doing heavy lifting API’s in Golang, it’s a really beautiful language with bare metal performance. For front-end, the most projects I would still use PHP, as Laravel stack is really nice to do all the regular CRUD – for performance critical API’s let’s leave to Go to do the magic. 🙂

No matter what programming language you use, having a good software design is always challenging. Designing an application that is maintainable and lasting for changes takes a lot of thinking. SOLID (object-oriented design)  is the group of those principles that could help a programmer to achieve the goal.

In Golang, there’s no class. So how does SOLID work in Go? Let’s just follow Dave Cheney (Go contributor and author – Australian!) to get into the SOLID design in Go. This is not a new video and it’s almost 30 minutes, but well worth watching.