From 671956c74c74b55d7ec83d349ed5eec25b5c0894 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Sat, 16 Jun 2018 22:14:38 -0700 Subject: [PATCH] baseapp --- docs/sdk/README.md | 11 ++++++----- docs/sdk/core/baseapp.md | 19 +++++++++++++++++++ docs/sdk/core/{store.md => multistore.md} | 0 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 docs/sdk/core/baseapp.md rename docs/sdk/core/{store.md => multistore.md} (100%) diff --git a/docs/sdk/README.md b/docs/sdk/README.md index 5a71378ef1..d64408e6b9 100644 --- a/docs/sdk/README.md +++ b/docs/sdk/README.md @@ -4,12 +4,13 @@ NOTE: This documentation is a work-in-progress! - [Overview](overview) - [Overview](overview/overview.md) - An overview of the Cosmos-SDK - - [The Object-Capability Model](overview/capabilities.md) - - - [Application Architecture](overview/apps.md) - Understanding SDK - application architecture -- [Install](install.md) - Install the SDK library and example applications + - [The Object-Capability Model](overview/capabilities.md) - Security by + least-privilege + - [Application Architecture](overview/apps.md) - Layers in the application architecture +- [Install](install.md) - Install the library and example applications - [Core](core) - - [The Store](core/store.md) - How to work with the database + - [BaseApp](core/baseapp.md) - BaseApp is the base layer of the appication + - [The MultiStore](core/multistore.md) - MultiStore is a rich Merkle database - [Messages](core/messages.md) - Messages contain the content of a transaction - [Handlers](core/handlers.md) - Handlers are the workhorse of the app! - [Amino](core/amino.md) - Amino is the primary serialization library used in the SDK diff --git a/docs/sdk/core/baseapp.md b/docs/sdk/core/baseapp.md new file mode 100644 index 0000000000..7029b16ea4 --- /dev/null +++ b/docs/sdk/core/baseapp.md @@ -0,0 +1,19 @@ +# BaseApp + +The BaseApp is an abstraction over the [Tendermint +ABCI](https://github.com/tendermint/abci) that +simplifies application development by handling common low-level concerns. +It serves as the mediator between the two key components of an SDK app: the store +and the message handlers. + +The BaseApp implements the +[`abci.Application`](https://godoc.org/github.com/tendermint/abci/types#Application) interface. +It uses a `MultiStore` to manage the state, a `Router` for transaction handling, and +`Set` methods to specify functions to run at the beginning and end of every +block. + +Every SDK app begins with a BaseApp: + +``` +app := baseapp.NewBaseApp(appName, cdc, logger, db), +``` diff --git a/docs/sdk/core/store.md b/docs/sdk/core/multistore.md similarity index 100% rename from docs/sdk/core/store.md rename to docs/sdk/core/multistore.md