Skip to content

Commit

Permalink
Move bisq.core{=>.app}.CoreModule
Browse files Browse the repository at this point in the history
There are two structural / organizational reasons for this move:

 1. References from one package to another should always be upward or
 lateral, never downward, as the latter causes package cycles (aka
 'tangles') which damage the suppleness and understandability of a large
 codebase. Prior to this change the high-level bisq.core.CoreModule
 class imported many classes from child packages like
 bisq.core.{btc,dao,user,util}, etc. By moving CoreModule down into the
 '.app' package, it can reference all these other packages as siblings
 instead of doing so as a parent.

 2. the bisq.core.desktop and bisq.core.app packages are the only
 locations that reference the CoreModule class. By moving the class
 into bisq.core.app, greater cohesion is acheived, again making the
 codebase that much easier to read and understand.
  • Loading branch information
cbeams committed Jan 20, 2020
1 parent 7595387 commit 8b30c22
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions core/src/main/java/bisq/core/app/BisqHeadlessAppMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package bisq.core.app;

import bisq.core.CoreModule;

import bisq.common.UserThread;
import bisq.common.app.AppModule;
import bisq.common.app.Version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/

package bisq.core;
package bisq.core.app;

import bisq.core.alert.AlertModule;
import bisq.core.app.AppOptionKeys;
import bisq.core.app.BisqEnvironment;
import bisq.core.btc.BitcoinModule;
import bisq.core.dao.DaoModule;
import bisq.core.filter.FilterModule;
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/main/java/bisq/desktop/app/BisqAppModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import bisq.desktop.DesktopModule;

import bisq.core.CoreModule;
import bisq.core.app.CoreModule;

import bisq.common.app.AppModule;

Expand Down
2 changes: 1 addition & 1 deletion grpc/src/main/java/bisq/grpc/BisqGrpcServerMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
package bisq.grpc;

import bisq.core.CoreApi;
import bisq.core.CoreModule;
import bisq.core.app.BisqExecutable;
import bisq.core.app.BisqHeadlessAppMain;
import bisq.core.app.BisqSetup;
import bisq.core.app.CoreModule;

import bisq.common.UserThread;
import bisq.common.app.AppModule;
Expand Down

0 comments on commit 8b30c22

Please sign in to comment.