Skip to content

Branch: package_by_layer

Vanskarner edited this page Oct 31, 2023 · 3 revisions

Gradle Modules Dependency

Gradle Modules Dependency

Components

In all component diagrams, the rectangles labeled 'UI/Presentation' and 'Data' are used simply as a way of grouping these related components. So for organizational purposes, the dependency representation of these components and the Core component has been simplified to a single line, as doing so for each component would create a lot of visual clutter.

Simplified Showing Main Component
Simplified component diagram Component diagram with main

Main Component

The main component is made up of the module configuration and also includes auto-generated code from the dependency injection framework.

Main Component Configuration

Domain Component

The Movie component is represented by the com.vanskarner.domain package, as shown in the following diagram:

Class diagram of the Domain component

Service Exposure

These are the software artifacts that are visible to the client or consumer of this component:

Service Exposure

Domain dependencies

This diagram shows the dependency of the Domain component on the Core component:

Domain component dependencies

Testing

Locals

Local Tests in com.vanskarner movie

RemoteData Component

The RemoteData component is represented by the com.vanskarner.remotedata package, as shown in the following diagram:

Class diagram of the RemoteData component

RemoteData Dependencies

This diagram shows the dependency of the RemoteData component on the Domain and Core components:

RemoteData component dependencies

Testing

Locals

Local Tests in com.vanskarner.remotedata.movie

LocalData Component

The LocalData component is represented by the com.vanskarner.localdata package, as shown in the following diagram:

Class diagram of the LocalData component

LocalData Dependencies

This diagram shows the dependency of the LocalData component on the Domain and Core components:

LocalData component dependencies

Testing

Locals

Local Tests in com.vanskarner.localdata.movie

Instrumented

Instrumented Tests in com.vanskarner.localdata.movie

UI Components

The UpcomingUI, UpcomingDetailUI and FavoritesUI components are represented by the upcoming, upcomingDetail and favorites packages, respectively:

Class diagram of the UI components

UI Dependencies

This diagram shows the dependency of the UI components on the Domain component:

UI component dependencies

Testing

Locals

Local Tests in com.vanskarner.cleanmovie.ui.movie

Instrumented

Instrumented Tests in com.vanskarner.cleanmovie

Metrics

Application

Summary of application metrics.

Application Metrics in this Branch

Instability/Abstraction Graph

All gradle modules are located in this graph.

Instability/Abstraction Graph

Core

Core Instability/Abstraction Graph

Domain

Domain Instability/Abstraction Graph

RemoteData

RemoteData Instability/Abstraction Graph

LocalData

While this component is placed outside the green band, this is expected due to the way this type of approach is decoupled. In fact, the more features that are added, it will be normal to see it within this band; however, it may be undesirable for analysis. Therefore, the best way to analyze it might be separately for each package representing each added feature.

LocaData Instability/Abstraction Graph

App

Although the gradle module "app" is placed outside the green band, it is important to note that a gradle module does not always represent a component. In fact, the gradle "app" module houses both the Main component and the UI components, such as: upcoming, upcomingDetail and favorites.

App Instability/Abstraction Graph

Therefore, each UI component could be analyzed. For this purpose, a rule called "Distance from main sequence in UI components" has been designed to calculate the metrics Instability, Abstraction and Distance from Main Sequence:

UI Component Metrics

Clone this wiki locally