Skip to content

Commit

Permalink
Add some background to README
Browse files Browse the repository at this point in the history
  • Loading branch information
dam5s committed Oct 9, 2023
1 parent ce5d1de commit 291a1ff
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

This is a small cyclic dependency checker for Dart projects.

## Background

One of the most common mistakes we see when writing frontend applications (or even backend applications) is
how the code is organized. Ever since the advent of Ruby on Rails, engineers started organizing code by "function
in the framework", for example a `Controller` goes into the `controllers` folder.
The problem with this approach is that it makes the codebase harder to manage / re-structure / re-architecture
over time.

If you ever need to extract a specific feature set, you will have to go all over the codebase to extract it.
It might not even be possible because of tight coupling.

**Tight coupling is introduced by cyclic dependencies.**

This tool assumes that you will organize your code by features
instead of "which part of the framework does this match?".
Our [flutter-starter](https://github.com/initialcapacity/flutter-starter) shows an example of code organization
and usage of this tool.

## Setup

From inside one of your Dart projects
Expand All @@ -10,6 +28,8 @@ From inside one of your Dart projects
dart pub add cyclic_dependency_checks --git-url=https://github.com/dam5s/cyclic_dependency_checks.git --git-ref=release/0.2.0
```

`release/0.2.0` here is a tag from [one of the releases](releases).

## Running it

Again, from inside your Dart project
Expand Down

0 comments on commit 291a1ff

Please sign in to comment.