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

New feature - Type based dependency rules #42

Open
mcintyre321 opened this issue Dec 17, 2018 · 1 comment
Open

New feature - Type based dependency rules #42

mcintyre321 opened this issue Dec 17, 2018 · 1 comment
Milestone

Comments

@mcintyre321
Copy link
Contributor

mcintyre321 commented Dec 17, 2018

I don't know if this is possible or not, but I would find it useful to be able to have rules associated with Types as well as namespaces. If you are trying to partition your code in "Vertical Slices"
(grouping by feature, rather than by layer) you often have several different infrastructure types in the same namespace, e.g. the FooController and FooRepository are in the same directory.

It would be cool to be able to prevent the FooRepository from referencing the FooController in this situation, maybe with <Disallowed From="*Respository" FromKind="Type" To="*Controller" ToKind="Type" />

NB this doesn't mean that namespace dependencies aren't being used, it's just that they are being used to keep features apart, e.g. preventing 'EmailTemplates' from talking to 'OrderProcessor;

I'm not sure if this would work best by identifying the Types using 1. name conventions, 2. base class conventions or 3. explicit marker attributes or 4. something else.

@realvizu
Copy link
Owner

Let me think this through together with #28 in a next version.

@realvizu realvizu added this to the v1.9 milestone Dec 19, 2018
@realvizu realvizu modified the milestones: v1.9, v2.x Feb 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants