Skip to content

Commit

Permalink
doc diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar committed Mar 18, 2015
1 parent f45fc4e commit 0ba586e
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions docs/diagrams.rst
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;
}

0 comments on commit 0ba586e

Please sign in to comment.