Answer the question
In order to leave comments, you need to log in
An example of a good Golang web application architecture?
Give an example of a good Golang web application architecture. By good, I mean fast scalability and weak dependency of the main parts of the application. It would also be interesting to see a real example (links to repositories). Thank you.
Answer the question
In order to leave comments, you need to log in
I myself am looking for the perfect answer to your question, but here are some things to think about:
1. https://github.com/gothinkster/realworld (not only Golang here)
2. https://github.com/golang -standards/project-layout
Just as a small example:
1. Patterns and Examples for Building a Go Web App - ...
I like the Clean architecture
approach
Here's a nice modification:
Article
Code
But the most important thing for good scalability and weak component dependency is:
- don't use global variables/singletons.
- do not pass objects through functions / methods / etc., where only one variable from this object is needed.
- use interfaces and pure models (without logic).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question