-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
Diagrams | ||
======== | ||
|
||
This page will show various diagrams about the framework structure. | ||
|
||
Class View Diagram Tree | ||
----------------------- | ||
|
||
All class views tree reflect functionality each layer is responsible for a certain goal. You will be essentially using | ||
BaseViews, IndexViews and the leafs ModelView, chart views and form views. | ||
|
||
.. blockdiag:: | ||
|
||
blockdiag admin { | ||
|
||
BaseView; | ||
BaseView -> UtilView; | ||
BaseView -> IndexView; | ||
BaseView -> SimpleFormView; | ||
BaseView -> PublicFormView; | ||
BaseView -> BaseModelView; | ||
BaseModelView -> BaseChartView; | ||
BaseModelView -> BaseCRUDView; | ||
BaseChartView -> GroupByChartView; | ||
BaseChartView -> DirectByChartView; | ||
BaseCRUDView -> RestCRUDView -> ModelView; | ||
} | ||
|
||
|
||
Next is a summary explanation for each class: | ||
|
||
:BaseView: Collects all the exposed methods, creates the Flask blueprint and registers the URLs, initializes base permissions. | ||
:UtilView: Implements exposes **back** for special back UI functionality. | ||
:IndexView: Special view for rendering the index page. | ||
:SimpleFormView: Subclass it to render WTForms. | ||
:PublicFormView: Same as SimpleFormView but with public access only. | ||
:BaseModelView: Class responsible for an initial datamodel layer, implements search form and filters. | ||
:BaseChartView: Basic chart view functionality. | ||
:GroupByChartView: Subclass it to render Google charts with group by queries. | ||
:DirectByChartView: Subclass it to render Google charts with queries. | ||
:BaseCRUDView: Implement base functionality for add, edit, delete, creates all forms. | ||
:RestCRUDView: Exposes the JSON REST API for CRUD methods and more. | ||
:ModelView: Subclass it to render your views based on models, with complete CRUD UI functionality. | ||
|
||
Class Data Diagram Tree | ||
----------------------- | ||
|
||
All classes for data access aim for abstracting the backend. | ||
|
||
.. blockdiag:: | ||
|
||
blockdiag admin { | ||
|
||
BaseInterface; | ||
BaseInterface -> SQLAInterface; | ||
BaseInterface -> MongoEngineInterface; | ||
BaseInterface -> GenericInterface; | ||
} | ||
|
||
:BaseInterface: Interface class, imposes a unique API layer for data access. | ||
:SQLAInterface: Data access for SQLAlchemy. | ||
:MongoEngineInterface: Data access for MongoEngine (MongoDB). | ||
:GenericInterface: Data access for custom data structures. | ||
|
||
Security Models ERD | ||
------------------- | ||
|
||
This is the ERD of the frameworks security models. | ||
|
||
.. blockdiag:: | ||
|
||
blockdiag admin { | ||
default_shape = roundedbox | ||
|
||
User; | ||
Role; | ||
Permission; | ||
ViewMenu; | ||
PermissionView; | ||
|
||
User <-> Role <-> PermissionView; | ||
PermissionView <- Permission; | ||
PermissionView <- ViewMenu; | ||
} | ||
|