pkritiotis / pkritiotis.github.io

http://pkritiotis.github.io
1 stars 1 forks source link

clean-architecture-in-golang/ #10

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Clean Architecture in Go | pkritiotis Software Engineering

This article covers the fundamentals of the Clean Architecture design concept and demonstrates how to apply its principles in Go through a simple web app implementation.

https://pkritiotis.io/clean-architecture-in-golang/

Abdulmoiz-Ahmer commented 2 years ago

Hey man awesome stuff. I have been trying to wrap my head around this architecture for a while now. This is by far the best article i have found on web. Also where do you think the validation and error handling would fit in this architecture?

pkritiotis commented 2 years ago

Hey @Abdulmoiz-Ahmer 👋 ! Thank you for the comment. I'm very glad you liked the article 😄 !

Validation and error handling is handled in each layer separately on the scope of their responsibilities.

For the infra layer,

The input ports components

The external/outbound adapters

The application layer components

The domain layer

I hope this helps 🙏

vr-devil commented 1 year ago

Thank you, this is the most practical article I have seen so far on using clean architecture in golang projects. The explanation of each layer in the article is in place, and how to realize it is also described clearly.

After reading your article, it is very useful, and I will use it in my project, thank you again.

In addition, I would like to add a layer, which can be called the system layer. The [adapters/app/domain] layer will depend on the system layer. The role of the system layer is mainly to define some system architecture interfaces, realize system-level configuration management, some general mechanisms, some general libraries, and so on.

deltakroneker commented 11 months ago

Well isn't this just a best article on Clean Architecture for Go web servers! Thank you for writing on this topic with very in-depth approach. I am also a Go-beginner and I've been overwhelmed with Go community outright downvoting (without giving scalable alternative) many approaches people make due to the simplistic nature of the language, and I especially love the 'Thoughts' segment where you gave concrete reasoning for this type of package management. I'll be using this for my first Go API pet project as a role model and will give my feedback on how it goes. P.S. Bonus kudos for a fellow climbers' domain :)