Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Moving source code to src/pkg/app directory #29

Open
Hyaxia opened this issue Jun 29, 2019 · 2 comments
Open

Moving source code to src/pkg/app directory #29

Hyaxia opened this issue Jun 29, 2019 · 2 comments

Comments

@Hyaxia
Copy link

Hyaxia commented Jun 29, 2019

Its just my opinion, but I think it will be much cleaner if you would take all the code that
is connected to the project itself and put it into an additional directory.
I have red that you want it to be as flat as possible, and it will be still flat, the code that matters, the way you implement DDD, all that is related somehow to the domain, application and infrastructure layers will all be in the same level as it is right now, but only inside another directory, separated from the other files that have a different purpose.
And then at the first level of the folder tree you would have the cmd directory, pkg (or src or app or whatever you want to call it) and all the other remaining files that are related to setting up the application itself, like docker files etc...

@marcusolsson
Copy link
Owner

I'm on the fence on this, I'm not a huge fan of the pkg directory due to the extra level of indirection. Your arguments are valid though, so I would open this up for discussion.

@Hyaxia
Copy link
Author

Hyaxia commented Jul 5, 2019

mattermost Have a pretty neat app structure that follows DDD principles (I guess you can say that it also follows the clean architecture).
They have a model directory, it contains lots of file, that if would have been in the in the top level of the folder structure hierarchy would confuse you, and make you search for the README.md, or anything else that is related to the distribution of the project.

An even better name to what i proposed would be like in the project of Mattermost, to name the directory that holds all of the domain layer files, "model".
Descriptive name of what it contains and leave the first directory clean of confustion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants