diff --git a/README.md b/README.md index e05760e..b57dd28 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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