JohT/code-graph-analysis-pipeline

Depicting child package depencies in parent package depencies

MaltePetersen opened this issue · 4 comments

Hey, right now the pipeline calculates the incoming and outgoing depencies of the classes in the package but it ignores the depencies of child packages with packages outside of the parent package. For example if I have the following file structure:
-feature1
---Entity
---Service
----FeatureService1(dependsOn FeatureService2)
---Repo
-feature2
---Entity
---Service
----FeatureService2
---Repo

Then the package feature1 would have no incoming or outgoing depencies in the metrics, eventough its child service package has depencies to another package.

I feel like this metric is quite intersting because it shows the actual coupling between features in sliced-onion/vertical/screaming Architectures.

JohT commented

Taking only the package itself without its sub packages also applies for the DEPENDS_ON relationship between Java Packages that comes with the so called "Concept" java:PackageDependency of jQAssistant (see jQAssistant User Manual)

The properties incomingDependencies and outgoingDependencies are - as you've written - calculated the same way. Reference: Analyze java package metrics in a graph database (Part 2) based on Calculate Metrics (seems to be down)

Your idea sounds very interesting, especially with a package structure like you're describing. And it shouldn't be too hard to create a query that aggregates (sums) all incoming and outgoing dependencies of the Package including all sub packages. I'll see if I can come up with a Cypher query for that...

This could be a great addition to the existing queries and reports. Let's see....

That sounds great ! :)

JohT commented

Please have a look at the updated Object Oriented Design Quality Metrics (Jupyter Notebook) and the Object Oriented Design Quality Metrics (CSV). The new properties end with IncludingSubpackages e.g., incomingDependenciesIncludingSubpackages.

Let me know of this suits your use case.

Hey, thats excatly what I was looking for! This is really useful to me! Thank you alot !