Ompluscator's Blog
  • Home
  • All Articles
  • Golang
  • Tools

orm

September 20, 2023

Golang Tutorial: Generics with Gorm

Can we expect to have a comprehensive ORM and DBAL framework, similar to Doctrine, for Go?

After months and years of talking, trying things out, and testing, we’ve finally reached a big moment in our favorite programming language. The new Golang version, 1.18, is here. We knew it would bring significant changes to Go’s codebase, even before Generics was officially released. For a long time, when we wanted to make our code more general and abstract, we used code generators in Go. Learning what the “Go way” of doing things was challenging for many of us, but it also led to many breakthroughs.
September 18, 2023

Practical SOLID in Golang: Interface Segregation Principle

We continue our journey through the SOLID principles by discussing the one that has a profound impact on code design: The Interface Segregation Principle.

When beginners embark on their programming journey, the initial focus is typically on algorithms and adapting to a new way of thinking. After some time, they delve into Object-Oriented Programming (OOP). If this transition is delayed, it can be challenging to shift from a functional programming mindset. However, eventually, they embrace the use of objects and incorporate them into their code where necessary, sometimes even where they’re not needed. As they learn about abstractions and strive to make their code more reusable, they may overgeneralize, resulting in abstractions applied everywhere, which can hinder future development.
September 18, 2023

Practical DDD in Golang: Repository

Implementing the Anti-Corruption layer using a well-known DDD pattern: Repository.

Today, it is hard to imagine writing an application without accessing some form of storage at runtime. This includes not only writing application code but also deployment scripts, which often need to access configuration files, which are also a type of storage in a sense. When developing applications to solve real-world business problems, connecting to databases, external APIs, caching systems, or other forms of storage is practically unavoidable. It’s no surprise, then, that Domain-Driven Design (DDD) includes patterns like the Repository pattern to address these needs.
🍺 Support my Blogging work

Join the Ompluscator's Blog Community

Hey there! Want to be part of our awesome community? Just drop your email below, and we'll send you the good stuff – cool articles, fun updates, and more. No spam, we promise!

Thank you for subscribing!

© Ompluscator's Blog 2024
  • Cookie Policy
  • Privacy Policy
  • Terms and Conditions
  • Consent Preferences

${title}

${content}