Repository :
http://git.fedorahosted.org/git/?p=conga-luci-1stgen.git
On branch : RHEL5-active
---------------------------------------------------------------
commit c90556211a3853d101fef2c1c831bfc66822ab9e
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Fri Apr 25 16:40:44 2014 +0200
luci/MAINTAINERS.rst: desing incl. approximate MVC decomposition
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
---------------------------------------------------------------
luci/MAINTAINERS.rst | 58 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/luci/MAINTAINERS.rst b/luci/MAINTAINERS.rst
index 52a6aab..fe0d806 100644
--- a/luci/MAINTAINERS.rst
+++ b/luci/MAINTAINERS.rst
@@ -180,8 +180,62 @@ Sidelink:
http://jone.github.io/plone-hotfixes/
Briefly on the design
=====================
-Common template flow structure
-------------------------------
+Commons
+-------
+
+There are 4 main logical/navigational sections (further denoted X'):
+- cluster
+- homebase
+- storage
+- logs
+
+With X, we denote X' \ {logs} as this is a "weak" section.
+
+There is an attempt after MVC model but falls short, as the templates
+(view) is becoming the master triggering processing of both outgoing
+("lazy" templates content) and incoming (handling the requested and
+previously offered actions).
+
+Common section entry point is index_html which then, while pulling
+data it needs to work with, triggers further execution in the controller
+or model layer. Usually, the particular screen under section is
+distinguished with "pagetype" attribute according to which the
+particular macro(s) from <X>/form-macros are chosen in <X>/form-chooser
+
+Let's decompose the files using MVC lense:
+- model: data (persistent) objects and apart from that, cluster model
+ representing particular cluster.conf
+ - files for cluster model:
+ - site/luci/Extensions/ClusterModel/*
+ - files for persisted objects:
+ - site/luci/Products/ManagedSystem/*
+ - Data.fs as a storage, manipulators are native to Zope environment
+- view: templates
+ - located in <X'>/* (index_html et al.)
+- controller: various Python files
+ - adapters: between the template and helpers to delegate processing to
+ - site/luci/Extensions/<X>_adapters.py
+ (there is also system_adapters.py)
+ - also serves for back-end validation
+ - mediator between model/persistence layer and controller
+ - site/luci/Extensions/LuciDB.py
+ - incoming requests/action handler
+ - site/luci/Extensions/LuciClusterActions.py
+ - good to start with backtracing from where which action can be
+ triggered
+ - related communication part:
+ - site/luci/Extensions/RicciQueries.py
+ - site/luci/Extensions/ricci_communicator.py
+ - outgoing responses/template content handler
+ - site/luci/Extensions/LuciClusterInfo.py
+ - site/luci/Extensions/LuciZopeClusterPortal.py
+
+Other notable files:
+- site/luci/Extensions/LuciZopeExternal.py:
+ packs everything to be used within templates
+
+Homebase template flow structure (for example)
+----------------------------------------------
1. {X = cluster,homebase,storage}/index_html defers to
2a. site/luci/Extensions/<X>_adapters.py:<X>Control that, in turn,