Skip to content

Commit

Permalink
highlevel explanation in types/module.go
Browse files Browse the repository at this point in the history
  • Loading branch information
rigelrozanski committed May 8, 2019
1 parent 8948d80 commit 2053b83
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion types/module.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
This file contains application module patterns and associated "manager" functionality.
The module pattern has been broken down by:
- independent module functionality (AppModuleBasic)
- inter-dependent module functionality (AppModule)
inter-dependent module functionality is module functionality which somehow
depends on other modules, typically through the module keeper. Many of the
module keepers are dependent on each other, thus in order to access the full
set of module functionality we need to define all the keepers/params-store/keys
etc. This full set of advanced functionality is defined by the AppModule interface.
Independent module functions are separated to allow for the construction of the
basic application structures required early on in the application definition
and used to enable the definition of full module functionality later in the
process. This separation is necessary, however we still want to allow for a
high level pattern for modules to follow - for instance, such that we don't
have to manually register all of the codecs for all the modules. This basic
procedure as well as other basic patterns are handled through the use of
ModuleBasicManager.
*/
package types

import (
Expand All @@ -15,7 +36,7 @@ type ModuleClient interface {
}

//__________________________________________________________________________________________
// AppModule is the standard form for basic non-dependant elements of an application module
// AppModule is the standard form for basic non-dependant elements of an application module.
type AppModuleBasic interface {
Name() string
RegisterCodec(*codec.Codec)
Expand Down

0 comments on commit 2053b83

Please sign in to comment.