vFunction Logo

Product Controller

  1. Select the ProductController domain; notice that its sphere has an arrow pointing to the InventoryController domain because of the entry point we added in the previous section. Hovering over that line shows the method we marked as the new entry point. The dynamic and static class exclusivities are already 100%.

  2. Click VIEW next to the Dead-code class of the domain. You’ll see that ShippingService is listed as a dead-code class. This means that vFunction recommends removing ShippingService from ProductController’s scope, although there is a compile time dependency to this class. Note that ShippingService is used by other domains, in other words, it is not a dead-code class at the application level.

  3. Click on DETAILS next to ShippingService - a graph showing the compile‑time dependency from ProductService to ShippingService will open..

  4. Click UNMARK DEAD CODE for ShippingService and wait for the analysis to complete.

  5. Now go back to the domains and see the static classes of ProductController. You will see there are two non-exclusive static classes: ShippingService and ShippingRepository. ShippingRepository shows up because ShippingService has a dependency to it (you can see it in the static graph)

  6. Select ShippingService and mark it as dead-code (undoing the previous action) since, as vFunction indicated, it should be excluded from the ProductController domain.

  7. Go back and view the non-exclusive resources. We see that this domain uses three database tables that are also used by other domains. This is expected, and we don’t need to do anything.

  8. Go Back to Domains

vFunction Logo