ardanlabs / service

Starter-kit for writing services in Go using Kubernetes.

Home Page:https://www.ardanlabs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modular

himynamej opened this issue · comments

I tried to write a big program with the help of your structure, but I think we should be more modular. What do you think about adding modules to core part?
like that https://www.ompluscator.com/article/golang/practical-ddd-module/

with complex prrogram It quickly starts to get messy.

each domin must be a more complex layout to have more store and logic

My domain, like accounting, is more complicated than the user ,It is a complete program ,It has several different stores and has a complex logic

I would not do it. I would experiment with layering. That's all a module is, a new firewall. So find a layering structure that works for you. Under core you could layer at a module level.

in your opinion we can be complex in each core ?
for example can i add more than 4 store in one domin and 20 func for the accounting to be a part of a big program
how can i divided domins properly ?
my app is flight booking app
in my app i have a company and site each conpany can have multi site and each site have multi users ,i have a flight suplier and the supliers must convert to the one struct for sell flight ticket ,and the accounting section for each company,and the payment gateways The app is multilingual and supports multiple currencies.

The domains are related to data. So you need to start there. Understand the data models and where the firewalls need to be related to the data. Then you build the core business packages around that. If a core business package can have 4 different ways to persist and retrieve data, that's not a problem. You will have 4 different packages under the stores layer for that core business package.

You might be trying to break the domains down to granular. Stop and look at the data you are managing. Look to see where you want to place the vertical firewalls. What data could be in its own schema or DB.

Stop for 30 minutes and ask yourself these questions. Not every table needs to be in its own domain. At the same time, the entire schema can't be in a single domain.

Understand the data better, and you will understand how to solve the problem.

I can work on this with you if you like.

I would greatly appreciate it if you could work with me on this.How can we do it?

We just need to schedule an hour. Send me an email to bill@ardanlabs.com. I have time on this Friday.