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

Provide more abstract concept than the package level for describing the target architecture #28

Open
gunnarmorling opened this issue Jan 16, 2019 · 2 comments
Assignees

Comments

@gunnarmorling
Copy link
Member

gunnarmorling commented Jan 16, 2019

Currently the target architecture to validate a code base against is described in terms of allowed package references. This does the job, but it is desirable to have the possibility to describe the architecture in more coarse-grained units, i.e. "components" (which may contain one more packages). My current thinking is along these lines (using JSON as a notation, could be a DSL or anything else of course):

{
    "components" : [
        {
            "name" : "COMPONENT_1",
            "contains" : [ list of package name patterns, ... ]
            "reads" : [ "COMPONENT_2", "COMPONENT_..."]
        },
        {
            "name" : "COMPONENT_2",
            "contains" : [ list of package name patterns ]
            "reads" : [ "COMPONENT_3", "COMPONENT_..."]
        },
    ],
    # whitelist as today; that's an implicit component containing the given packages which is read by all other components
    "whitelisted" : [

    ]
}

The current design is just a special case of this model, with a 1:1 relationship from component to packages. In that suggested model, an error will be raised, if one package is matched by the expressions of more than one component.

@gunnarmorling
Copy link
Member Author

The ANALYZE mode should be expanded with a new option, which takes a list of (name:pattern) tuples describing components to be created in the generated descriptor (similar to the existing whitelist option).

@gunnarmorling
Copy link
Member Author

A related question is whether we should go below the package level for the architecture description. I can see how some people would like to have that capability, although I personally don't find it too valuable in practice (e.g. I wouldn't mind having a cycle between two classes in the same package).

@gunnarmorling gunnarmorling self-assigned this Jan 19, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 19, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 19, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
A component can comprise one or more package, the architecture is now
defined in terms of component relationships. The external format (deptective.json)
is still based on packages, using a 1:1 relationship between packages and
components.
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
A component can comprise one or more package, the architecture is now
defined in terms of component relationships. The external format (deptective.json)
is still based on packages, using a 1:1 relationship between packages and
components.
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
A component can comprise one or more package, the architecture is now
defined in terms of component relationships. The external format (deptective.json)
is still based on packages, using a 1:1 relationship between packages and
components.
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
A component can comprise one or more package, the architecture is now
defined in terms of component relationships. The external format (deptective.json)
is still based on packages, using a 1:1 relationship between packages and
components.
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
A component can comprise one or more package, the architecture is now
defined in terms of component relationships. The external format (deptective.json)
is still based on packages, using a 1:1 relationship between packages and
components.
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 20, 2019
gunnarmorling added a commit to gunnarmorling/deptective that referenced this issue Jan 23, 2019
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

No branches or pull requests

1 participant