The plugin consist of following component:
- plugin setting manager
- it controls the settings of the plugin
- responsible for loading and saving setting
- global graph view, a wrapper of graph setting manager and force graph
- local graph view, a wrapper of graph setting manager and force graph
- graph setting manager
- each graph view will have a graph setting manager
- it resposible for the control of the whole graph, then tell the force graph how to respond for setting changes
- the setting manager can be isolated from force graph because it follow separation of concern principle
- force graph
- the graph itself render the the nodes and links
- interaction manager
- it is responsible to handle all the interaction of the user and the force graph
- Graph Command
- has very simple API to extends commands
classDiagram
class pluginSettingManager {
+ controls the settings of the plugin
+ loads and saves setting
}
class globalGraphView {
}
class localGraphView {
}
class graphSettingManager {
+ controls the whole graph
+ communicates setting changes to force graph
}
class forceGraph {
+ renders nodes and links
}
class interactionManager {
+ handles user interaction with force graph
}
class GraphCommand {
+ extends commands through simple API
}
pluginSettingManager --|> globalGraphView: contains
pluginSettingManager --|> localGraphView: contains
graphSettingManager --|> globalGraphView: contains
graphSettingManager --|> localGraphView: contains
forceGraph --|> globalGraphView: contains
forceGraph --|> localGraphView: contains
interactionManager --|> forceGraph: is part of
GraphCommand --|> globalGraphView: can be used by
GraphCommand --|> localGraphView: can be used by
- Each component here follow separation of concern principle. They can be isolated easily and still functions properly.