Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(sln): functional grouping of projects #863

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

riezebosch
Copy link

@riezebosch riezebosch commented Apr 3, 2023

functional cohesion to ease navigation.

It prevents you from jumping up and down in the solution explorer by placing the tests and the sut more close together. Give it a shot and see if you like it.

Screenshot 2023-04-04 at 10 15 25

@netlify
Copy link

netlify bot commented Apr 3, 2023

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 7f7ccf0
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/646b66ba58d96a0007566eb6
😎 Deploy Preview https://deploy-preview-863--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@riezebosch riezebosch force-pushed the refactor/project-grouping branch from f243e28 to 4f0d4fb Compare April 4, 2023 08:15
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your pull request. I have been using the updated structure since yesterday. I frequently jump around various modules and must admit that it doesn't appeal to me just yet (I do not like the nesting). Personally, I preferred the previous configuration more, but I will give it a try. Perhaps it will just take some time until I get used to it.

@riezebosch
Copy link
Author

The idea for this PR stems from the cohesion theory that functional cohesion is much better than logical cohesion. This is what I nowadays do in projects where I do hexagonal architecture/ports & adapters. I then put the adapters in separate projects and group them into solution folders with the test and integration test projects. It is my experience that there's less jumping around in the solution tree that way since when working on an adapter it makes sense that the tests covering that adapter are nearby.

This same theory also applies to some extend to your project, but I can imagine it for you being less ideal. Like you said, when changing something in the "core" you need to update all "adapters" as well. So no hard feelings when it doesn't work out for you. More then happy that you showed the willingness to give it a shot 🤟🏻

@HofmeisterAn
Copy link
Collaborator

With more modules, this structure may make even more sense. I am currently thinking about minor adjustments. I will prepare a proposal.

@riezebosch
Copy link
Author

You don't need a proposal, you're the maintainer 😎 It would be great if you could cherry-pick my commit and amend it to properly attribute it to me ❤️

functional cohesion to ease navigation
@riezebosch riezebosch force-pushed the refactor/project-grouping branch from 4f0d4fb to 7f7ccf0 Compare May 22, 2023 12:57
@HofmeisterAn
Copy link
Collaborator

Right now, I am playing around with different configurations, considering generating Visual Studio Solution files for each module automatically. This has the advantage that we do not need to load and compile all projects. However, we need to keep in mind that refactoring may require loading all projects anyway.

@samtrion
Copy link

Right now, I am playing around with different configurations, considering generating Visual Studio Solution files for each module automatically. This has the advantage that we do not need to load and compile all projects. However, we need to keep in mind that refactoring may require loading all projects anyway.

Instead of creating solution files per module, you can also create solution filter files. With that you have still a fully maintained solution with all modules in place, and you can load a specific module also...

@HofmeisterAn
Copy link
Collaborator

Right now, I am playing around with different configurations, considering generating Visual Studio Solution files for each module automatically. This has the advantage that we do not need to load and compile all projects. However, we need to keep in mind that refactoring may require loading all projects anyway.

Instead of creating solution files per module, you can also create solution filter files. With that you have still a fully maintained solution with all modules in place, and you can load a specific module also...

Good idea. Maybe we can put them in the module directory? Then devs can open only the module they are interested in.

@samtrion
Copy link

samtrion commented May 23, 2024

Good idea. Maybe we can put them in the module directory? Then devs can open only the module they are interested in.

It may be a good idea to collect the set of *.slnf files in a central root folder, such as /filters. instead of scattering them all over the tree.

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

Successfully merging this pull request may close these issues.

3 participants