draft a concept for command instantiation (#1070)
This commit is contained in:
parent
2f538f5f95
commit
789246fc3a
6 changed files with 613 additions and 17 deletions
63
src/gui/interact/cmd-accessor.cpp
Normal file
63
src/gui/interact/cmd-accessor.cpp
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
CmdAccessor - interface to access command invocation services within the UI
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2017, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
* *****************************************************/
|
||||
|
||||
|
||||
/** @file cmd-accessor.cpp
|
||||
** Implementation details of command invocation services for the UI.
|
||||
**
|
||||
** @see TODO___cmd-accessor-test.cpp
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
//#include "lib/util.hpp"
|
||||
//#include "lib/symbol.hpp"
|
||||
//#include "include/logging.h"
|
||||
#include "gui/interact/cmd-accessor.hpp"
|
||||
|
||||
//#include <boost/noncopyable.hpp>
|
||||
//#include <string>
|
||||
//#include <map>
|
||||
|
||||
//using std::map;
|
||||
//using std::string;
|
||||
|
||||
//using util::contains;
|
||||
//using util::isnil;
|
||||
|
||||
namespace gui {
|
||||
namespace interact {
|
||||
|
||||
namespace { // internal details
|
||||
|
||||
} // internal details
|
||||
|
||||
|
||||
|
||||
CmdAccessor::~CmdAccessor() { } // Emit dtors of embedded objects here...
|
||||
|
||||
|
||||
|
||||
|
||||
/** nonsense */
|
||||
|
||||
}} // namespace gui::interact
|
||||
86
src/gui/interact/cmd-accessor.hpp
Normal file
86
src/gui/interact/cmd-accessor.hpp
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
CMD-ACCESSOR.hpp - interface to access command invocation services within the UI
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2017, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/** @file cmd-accessor.hpp
|
||||
** Abstraction: access to command invocation for UI-Elements.
|
||||
** The interact::CmdAccessor front-end is used by any UI element about to invoke and dispatch
|
||||
** commands into the session via ProcDispatcher. To invoke a command, typically it is necessary
|
||||
** to prepare a _command instance_ and to pick up and bind _command arguments._ This can be achieved
|
||||
** with the help of an intermediary, known as InteractionStateManager. Thus, CmdAccessor allows to
|
||||
** discover a specific InteractionStateManager instance, which
|
||||
** - is responsible for the specific command to be invoked
|
||||
** - can handle context information related to a specific _control system_ (e.g mouse, keyboard,
|
||||
** hardware controller, pen)
|
||||
** - might handle changing contextual state and thus decide if a command can be invoked
|
||||
** From the InteractionStateManager, it is possible to retrieve a concrete InvocationTrail for
|
||||
** this specific command instance about to be invoked. This InvocationTrail is an embedded command ID
|
||||
** and can be used, to bind arguments and finally trigger the command invocation.
|
||||
**
|
||||
** @todo as of 3/2017 this is a early design draft and WIP-WIP-WIP
|
||||
**
|
||||
** @see TODO___cmd-accessor-test.cpp
|
||||
** @see ////TODO_test usage example
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GUI_INTERACT_CMD_ACCESSOR_H
|
||||
#define GUI_INTERACT_CMD_ACCESSOR_H
|
||||
|
||||
|
||||
#include "lib/error.hpp"
|
||||
//#include "gui/ctrl/bus-term.hpp"
|
||||
//#include "lib/idi/entry-id.hpp"
|
||||
//#include "lib/symbol.hpp"
|
||||
//#include "lib/util.hpp"
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace gui {
|
||||
namespace interact {
|
||||
|
||||
// using lib::HashVal;
|
||||
// using util::isnil;
|
||||
using std::string;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract foundation of UI state tracking components.
|
||||
* @todo write type comment...
|
||||
*/
|
||||
class CmdAccessor
|
||||
: boost::noncopyable
|
||||
{
|
||||
|
||||
public:
|
||||
~CmdAccessor(); ///< @todo do we need a VTable / virtual dtor?
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
}} // namespace gui::interact
|
||||
#endif /*GUI_INTERACT_CMD_ACCESSOR_H*/
|
||||
73
src/proc/control/command-instance-manager.cpp
Normal file
73
src/proc/control/command-instance-manager.cpp
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
CommandInstanceManager - Key abstraction for proc/edit operations and UNDO management
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2017, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
* *****************************************************/
|
||||
|
||||
|
||||
/** @file command-instance-manager.cpp
|
||||
** Implementation details of instance management for command invocation by the GUI.
|
||||
**
|
||||
** @see command.hpp
|
||||
** @see command-registry.hpp
|
||||
** @see TODO_CommandInstanceManager_test
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#include "lib/error.hpp"
|
||||
//#include "lib/symbol.hpp"
|
||||
//#include "lib/format-string.hpp"
|
||||
#include "proc/control/command-instance-manager.hpp"
|
||||
|
||||
//#include <string>
|
||||
|
||||
//using std::string;
|
||||
//using util::cStr;
|
||||
//using util::_Fmt;
|
||||
|
||||
|
||||
namespace proc {
|
||||
namespace control {
|
||||
namespace error = lumiera::error;
|
||||
|
||||
|
||||
|
||||
namespace { // implementation helper...
|
||||
}//(End) implementation helper
|
||||
|
||||
|
||||
|
||||
|
||||
/** storage for.... */
|
||||
|
||||
|
||||
// emit dtors of embedded objects here....
|
||||
CommandInstanceManager::~CommandInstanceManager() { }
|
||||
|
||||
CommandInstanceManager::CommandInstanceManager() { }
|
||||
|
||||
|
||||
|
||||
|
||||
/** more to come here...*/
|
||||
|
||||
|
||||
|
||||
}} // namespace proc::control
|
||||
97
src/proc/control/command-instance-manager.hpp
Normal file
97
src/proc/control/command-instance-manager.hpp
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
COMMAND-INSTANCE-MANAGER.hpp - Key abstraction for proc/edit operations and UNDO management
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2017, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/** @file command-instance-manager.hpp
|
||||
** Service to support forming and invocation of command instances for use by the UI.
|
||||
** A *Proc-Layer command* is a functor, which can be parametrised with concrete arguments.
|
||||
** Typically, these arguments are to be picked up from the actual usage context in the GUI.
|
||||
** This creates the specific twist that possible command instances for invocation can and will
|
||||
** be formed during an extended time period, non-deterministically -- since the actual context
|
||||
** depends on the user interactions. Within the UI, there is a dedicated mechanism to form such
|
||||
** command invocation similar to forming sentences of a language (with subject, predication and
|
||||
** possibly some further objects). The UI manages several InteractionStateManager instances to
|
||||
** observe and pick up contextual state, finally leading to a complete parametrisation of a command.
|
||||
** The CommandInstanceManager is a service to support this process; it prepares command instances
|
||||
** and provides dedicated instance IDs, which can be stored in the UI and later used to retrieve
|
||||
** those instances for invocation. These IDs are created by decorating a base command ID, allowing
|
||||
** for several competing invocations to exist at the same time. When finally a given invocation is
|
||||
** about to happen, a corresponding registration handle is transfered to the ProcDispatcher, where
|
||||
** it is enqueued for execution.
|
||||
**
|
||||
** @see command-def.hpp
|
||||
** @see command.hpp
|
||||
** @see command-accessor.hpp
|
||||
** @see TODO_CommandInstanceManager_test
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef CONTROL_COMMAND_INSTANCE_MANAGER_H
|
||||
#define CONTROL_COMMAND_INSTANCE_MANAGER_H
|
||||
|
||||
#include "lib/error.hpp"
|
||||
//#include "lib/symbol.hpp"
|
||||
//#include "proc/common.hpp"
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
//#include <string>
|
||||
|
||||
|
||||
|
||||
|
||||
namespace proc {
|
||||
namespace control {
|
||||
|
||||
// using std::string;
|
||||
// using lib::Symbol;
|
||||
//using std::shared_ptr;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @todo write type comment
|
||||
*/
|
||||
class CommandInstanceManager
|
||||
: boost::noncopyable
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
CommandInstanceManager();
|
||||
~CommandInstanceManager();
|
||||
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/** */
|
||||
|
||||
|
||||
|
||||
|
||||
}} // namespace proc::control
|
||||
#endif /*CONTROL_COMMAND_INSTANCE_MANAGER_H*/
|
||||
|
|
@ -2582,7 +2582,7 @@ This contrastive approach attempts to keep knowledge and definition clustered in
|
|||
&rarr; GuiCommandCycle
|
||||
</pre>
|
||||
</div>
|
||||
<div title="GuiCommandCycle" creator="Ichthyostega" modifier="Ichthyostega" created="201703031817" modified="201703050151" tags="design operational GuiPattern GuiIntegration draft discuss" changecount="14">
|
||||
<div title="GuiCommandCycle" creator="Ichthyostega" modifier="Ichthyostega" created="201703031817" modified="201703080252" tags="design operational GuiPattern GuiIntegration draft discuss" changecount="18">
|
||||
<pre>//the process of issuing a session command from the UI//
|
||||
Within the Lumiera UI, we distinguish between core concerns and the //local mechanics of the UI.// The latter is addressed in the usual way, based on a variation of the [[MVC-Pattern|http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller]]. The UI toolkit set, here the GTK, affords ample ways to express actions and reactions within this framework, where widgets in the presentation view are wired with the corresponding controllers vice versa (GTK terms these connections as //"signals"//, we rely on {{{libSigC++}}} for implementation).
|
||||
A naive approach would extend these mature mechanisms to also cover the actual functionality of the application. This compelling solution allows quickly to get "something tangible" up and running, yet -- on the long run -- inevitably leads to core concerns being tangled into the presentation layer, which in turn becomes hard to maintain and loaded with "code behind". Since we are here "for the long run", we immediately draw the distinction between UI mechanics and core concerns. The latter are, by decree and axiom, required to perform without even an UI layer running. This decision gives rise to the challenge how to form and integrate the invocation of ''core commands'' into the presentation layer.
|
||||
|
|
@ -2609,7 +2609,19 @@ from these use cases, we can derive the //crucial activities for command handlin
|
|||
:a widget just wants to invoke a command, yet it needs the help of "some" InteractionStateManager for
|
||||
:* creating the command instance, so arguments can be bound
|
||||
:* fill in missing values for the arguments, depending on context
|
||||
</pre>
|
||||
|
||||
!command invocation protocol
|
||||
* at start-up, command definitions are created in Proc, hard wired
|
||||
* ~UI-Elements know the basic ~Command-IDs relevant to their functionality. These are defined in some central header
|
||||
* when command usage is indicated, some part in the UI queries the {{{CmdAccessor}}} for an InteractionStateManager
|
||||
* the latter in turn retrieves a new command instance ID from the {{{CmdInstanceManager}}} in Proc
|
||||
* and the latter keeps a smart-ptr corresponding to this instance in its internal registration table
|
||||
* within the UI, a command instance corresponds to a specific invocation trail, and is thus stored within the managing {{{InteractionStateManager}}}
|
||||
* ~UI-Elements use the services of the InteractionStateManager, either to get arguments directly, or to act as observer of state changes
|
||||
* when a command is completely parametrised, it can be invoked. The managing {{{InteractionStateManager}}} knows about this
|
||||
* on invocation, the ID of the instance is sent via UI-Bus to the {{{CmdInstanceManager}}}
|
||||
* which in turn removes the instance handle from its registration table and hands it over into the ProcDispatcher
|
||||
Consequently this means that command instances will be formed //per {{{InteractionStateManager}}} instance.// Thus, each distinct kind of control system has its own instances, which are kept around, until they are ready for invocation. Each invocation "burns" an instance -- on next access, a new instance ID will be allocated, and the next command invocation cycle starts...</pre>
|
||||
</div>
|
||||
<div title="GuiConnection" modifier="Ichthyostega" created="200812050543" modified="201703031816" tags="GuiIntegration overview" changecount="9">
|
||||
<pre>All communication between Proc-Layer and GUI has to be routed through the respective LayerSeparationInterfaces. Following a fundamental design decision within Lumiera, these interface are //intended to be language agnostic// &mdash; forcing them to stick to the least common denominator. Which creates the additional problem of how to create a smooth integration without forcing the architecture into functional decomposition style. To solve this problem, we rely on ''messaging'' rather than on a //business facade// -- our facade interfaces are rather narrow and limited to lifecycle management. In addition, the UI exposes a [[notification facade|GuiNotificationFacade]] for pushing back status information created as result of the edit operations, the build process and the render tasks.
|
||||
|
|
|
|||
|
|
@ -2486,9 +2486,9 @@
|
|||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1488677721565" ID="ID_850989325" MODIFIED="1488678049693" TEXT="Problem: Zugang">
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1488677721565" ID="ID_850989325" MODIFIED="1488940144847" TEXT="Problem: Zugang">
|
||||
<linktarget COLOR="#a9b4c1" DESTINATION="ID_850989325" ENDARROW="Default" ENDINCLINATION="183;-575;" ID="Arrow_ID_1002016515" SOURCE="ID_1520540731" STARTARROW="None" STARTINCLINATION="341;286;"/>
|
||||
<linktarget COLOR="#9f5680" DESTINATION="ID_850989325" ENDARROW="Default" ENDINCLINATION="211;189;" ID="Arrow_ID_1007188680" SOURCE="ID_827179653" STARTARROW="None" STARTINCLINATION="908;-975;"/>
|
||||
<linktarget COLOR="#9f5680" DESTINATION="ID_850989325" ENDARROW="Default" ENDINCLINATION="211;189;" ID="Arrow_ID_1007188680" SOURCE="ID_827179653" STARTARROW="None" STARTINCLINATION="912;-974;"/>
|
||||
<icon BUILTIN="flag-pink"/>
|
||||
<node CREATED="1488677729388" ID="ID_764102285" MODIFIED="1488677736385" TEXT="grundsätziches Problem">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
|
|
@ -11124,20 +11124,37 @@
|
|||
<node CREATED="1488674721265" ID="ID_1409487095" MODIFIED="1488674735629" TEXT="aber: benannte Instanzen leben einfach weiter">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1488677059648" ID="ID_1869818470" MODIFIED="1488677072562" TEXT="war eigentlich nur für "Spezialisierungen" gedacht"/>
|
||||
<node CREATED="1488936223175" ID="ID_1105962999" MODIFIED="1488936233654" TEXT="zu prüfen: overhead">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1488936242413" ID="ID_1255236132" MODIFIED="1488936261039" TEXT="könnte eigener, dritter Typus werden">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1488936634128" ID="ID_857930488" MODIFIED="1488936700939" TEXT="Konsequenz">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1488936638247" ID="ID_699367403" MODIFIED="1488936651353" TEXT="man sollte auf das Bauchgefühl hören"/>
|
||||
<node CREATED="1488936653341" ID="ID_629143054" MODIFIED="1488936669310" TEXT="Design leitet in richtige Bahnen"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1488936670970" ID="ID_697148715" MODIFIED="1488936742194" TEXT="die Trennung respektieren">
|
||||
<arrowlink COLOR="#79d29b" DESTINATION="ID_1131387570" ENDARROW="Default" ENDINCLINATION="-48;-109;" ID="Arrow_ID_1598234794" STARTARROW="None" STARTINCLINATION="-421;-27;"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1488675785223" ID="ID_134788782" MODIFIED="1488675850639" TEXT="Aufgaben">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1488675788278" ID="ID_241828684" MODIFIED="1488675873111" TEXT="wer erzeugt die Instanz?">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1488676735628" ID="ID_845338567" MODIFIED="1488676745534" TEXT="der InteractionStateManager">
|
||||
<icon BUILTIN="help"/>
|
||||
<node COLOR="#338800" CREATED="1488675788278" ID="ID_241828684" MODIFIED="1488936420989" TEXT="wer erzeugt die Instanz?">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1488676735628" ID="ID_845338567" MODIFIED="1488936413573" TEXT="der InteractionStateManager">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
</node>
|
||||
<node CREATED="1488676746667" ID="ID_1675443482" MODIFIED="1488676751306" TEXT="jemand in Proc">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1488676746667" ID="ID_1675443482" MODIFIED="1488936417954" TEXT="jemand in Proc">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1488936425628" ID="ID_273815265" MODIFIED="1488936428431" TEXT="neue Entität"/>
|
||||
<node CREATED="1488936429139" ID="ID_858892843" MODIFIED="1488936433830" TEXT="gehört zum Command-System"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1488675795485" ID="ID_560742641" MODIFIED="1488675865907" TEXT="wer benennt die Instanz?">
|
||||
<node CREATED="1488675795485" ID="ID_560742641" MODIFIED="1488936760622" TEXT="wer benennt die Instanz?">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1488676790165" ID="ID_450420022" MODIFIED="1488676795858" TEXT="der der sie erzeugt">
|
||||
<icon BUILTIN="help"/>
|
||||
|
|
@ -11149,8 +11166,8 @@
|
|||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1488675800668" ID="ID_260870361" MODIFIED="1488675862145" TEXT="wer hält die Instanz (am Leben)?">
|
||||
<icon BUILTIN="help"/>
|
||||
<node COLOR="#338800" CREATED="1488675800668" ID="ID_260870361" MODIFIED="1488936768854" TEXT="wer hält die Instanz (am Leben)?">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1488676827432" ID="ID_1354771185" MODIFIED="1488676881245" TEXT="Problem: air-Gap">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
|
@ -11189,7 +11206,8 @@
|
|||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1488677212907" ID="ID_1525612446" MODIFIED="1488677229204" TEXT="Idee: im InteractionStateManager">
|
||||
<node CREATED="1488677212907" ID="ID_1525612446" MODIFIED="1488936784410" TEXT="Idee: im InteractionStateManager">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
<node CREATED="1488677232640" ID="ID_1033002023" MODIFIED="1488677274454" TEXT="null oder maximal eine pro Command"/>
|
||||
<node CREATED="1488677258932" ID="ID_1695115228" MODIFIED="1488677268487" TEXT="andere Geste -> andere Command-Instanz"/>
|
||||
<node COLOR="#c15a5d" CREATED="1488677333066" ID="ID_182292267" MODIFIED="1488677344667" TEXT="Aber">
|
||||
|
|
@ -11220,8 +11238,81 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1488936070394" ID="ID_1131387570" MODIFIED="1488936736607" TEXT="Schlußfolgerung">
|
||||
<linktarget COLOR="#79d29b" DESTINATION="ID_1131387570" ENDARROW="Default" ENDINCLINATION="-48;-109;" ID="Arrow_ID_1598234794" SOURCE="ID_697148715" STARTARROW="None" STARTINCLINATION="-421;-27;"/>
|
||||
<icon BUILTIN="forward"/>
|
||||
<node CREATED="1488936102272" ID="ID_414025307" MODIFIED="1488936125740" TEXT="eigenes Instantiierungs-Protokoll">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1488677859619" ID="ID_827179653" MODIFIED="1488678049693" TEXT="Problem: Service-Zugang">
|
||||
<node CREATED="1488936115534" ID="ID_1508575123" MODIFIED="1488936128074" TEXT="explizit in Proc zu unterstützen">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1488936129180" ID="ID_62638556" MODIFIED="1488936137127" TEXT="hand-over">
|
||||
<node CREATED="1488936140275" ID="ID_61978297" MODIFIED="1488936152237" TEXT="entfernt Registrierung"/>
|
||||
<node CREATED="1488936152849" ID="ID_525023498" MODIFIED="1488936164963" TEXT="erzeugt anonyme Instanz"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1488936910756" HGAP="200" ID="ID_208733336" MODIFIED="1488936924589" TEXT="neues Design" VSHIFT="14">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1488937072267" ID="ID_1765750778" MODIFIED="1488937082039" TEXT="separation of concerns">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node CREATED="1488936925448" ID="ID_1949523361" MODIFIED="1488937085712" TEXT="zwei neue Entitäten">
|
||||
<icon BUILTIN="yes"/>
|
||||
<node CREATED="1488936938742" ID="ID_1388901840" MODIFIED="1488939645006">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
GUI: <b>CmdAccessor</b>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<node CREATED="1488936962690" ID="ID_399848637" MODIFIED="1488936995228" TEXT="vermittelt InvocationStateManager"/>
|
||||
<node CREATED="1488937001406" ID="ID_1747520920" MODIFIED="1488937012304" TEXT="letzterer ist Interface für UI-Entitäten"/>
|
||||
</node>
|
||||
<node CREATED="1488936942317" ID="ID_222608258" MODIFIED="1488939548823">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Proc: <b>CmdInstanceManager</b>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<node CREATED="1488937028202" ID="ID_1121930542" MODIFIED="1488937033253" TEXT="erzeugt die Instanzen"/>
|
||||
<node CREATED="1488937033769" ID="ID_1795817178" MODIFIED="1488937045947" TEXT="verwaltet deren Lebenszyklus"/>
|
||||
<node CREATED="1488937046591" ID="ID_1911259949" MODIFIED="1488937055426" TEXT="vom UI allein per ID ansprechbar"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1488938186100" ID="ID_98580620" MODIFIED="1488938192567" TEXT="Command-Definition erweitern">
|
||||
<node CREATED="1488938195387" ID="ID_1831459518" MODIFIED="1488938202950" TEXT="Möglichkeit, Regeln vorzugeben"/>
|
||||
<node CREATED="1488938222135" ID="ID_1365861102" MODIFIED="1488938232250" TEXT="werden fest mit dem Command zusammen konfiguriert"/>
|
||||
<node CREATED="1488938205266" ID="ID_1560120611" MODIFIED="1488938215411" TEXT="diese können aus der Command-Def bezogen werden"/>
|
||||
</node>
|
||||
<node CREATED="1488939658004" ID="ID_726054321" MODIFIED="1488939668212" TEXT="Interaktionen">
|
||||
<icon BUILTIN="info"/>
|
||||
<node CREATED="1488939675705" ID="ID_1515081819" MODIFIED="1488939724134" TEXT="UI-Element fragt CmdAccessor nach InteractionStateManager"/>
|
||||
<node CREATED="1488939946828" ID="ID_1817986480" MODIFIED="1488940966027" TEXT="CmdAccessor speichert InteractionStateManager"/>
|
||||
<node CREATED="1488939748247" ID="ID_589914539" MODIFIED="1488940949864" TEXT="InteractionstateManager belegt beim CmdInstanceManager neue ID..."/>
|
||||
<node CREATED="1488940951052" ID="ID_1899882798" MODIFIED="1488940964629" TEXT="...und erzeugt daraus neuen InvocationTrail"/>
|
||||
<node CREATED="1488940222591" ID="ID_1071611814" MODIFIED="1488940241768" TEXT="UI-Element fragt InteractionStateManager: "kann dieses Command ausgeführt werden"?"/>
|
||||
<node CREATED="1488940254106" ID="ID_1373320189" MODIFIED="1488940276539" TEXT="UI-Element bezieht vom InteractionStateManager einen InvocationTrail"/>
|
||||
<node CREATED="1488940300116" ID="ID_172216455" MODIFIED="1488940331244" TEXT="UI-Element registriert sich beim InteractionStateManager (als Observer)"/>
|
||||
<node CREATED="1488940435601" ID="ID_1906295137" MODIFIED="1488940468681" TEXT="UI-Element verwendet InvocationTrail, um Command zu triggern"/>
|
||||
<node CREATED="1488940469365" ID="ID_130562988" MODIFIED="1488940518450" TEXT="CmdInstanceManager übergibt (move) die Instanz an den ProcDispatcher"/>
|
||||
<node CREATED="1488940519518" ID="ID_1875791797" MODIFIED="1488940533992" TEXT="bei nächster Anfrage wird CmdInstanceManager daher neue Instanz anlegen"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1488677859619" HGAP="-15" ID="ID_827179653" MODIFIED="1488940144847" TEXT="Problem: Service-Zugang" VSHIFT="24">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
|
|
@ -11239,12 +11330,186 @@
|
|||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<arrowlink COLOR="#9f5680" DESTINATION="ID_850989325" ENDARROW="Default" ENDINCLINATION="211;189;" ID="Arrow_ID_1007188680" STARTARROW="None" STARTINCLINATION="908;-975;"/>
|
||||
<arrowlink COLOR="#9f5680" DESTINATION="ID_850989325" ENDARROW="Default" ENDINCLINATION="211;189;" ID="Arrow_ID_1007188680" STARTARROW="None" STARTINCLINATION="912;-974;"/>
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1488936835940" ID="ID_1322149090" MODIFIED="1488937388772" TEXT="separates Problem">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
hat überhaupt nichts mit dem Zugang zu Commands zu tun,
|
||||
</p>
|
||||
<p>
|
||||
und auch nichts mit der Trennung zwischen Layern und Subsystemen
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1488936840059" ID="ID_1305671938" MODIFIED="1488937417519" TEXT="generisches Problem">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
es geht um Service-Dependencies
|
||||
</p>
|
||||
<p>
|
||||
aka DependencyInjection + Lifecycle Management
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<node CREATED="1488937419308" ID="ID_994813744" MODIFIED="1488937424552" TEXT="lib::Depend ausbauen"/>
|
||||
<node CREATED="1488937436890" ID="ID_1184288068" MODIFIED="1488937442437" TEXT="kann auf später vertagt werden"/>
|
||||
<node CREATED="1488937424996" ID="ID_1712367280" MODIFIED="1488937434311" TEXT="vorerst eigenes Front-End verwenden"/>
|
||||
<node CREATED="1488937449896" ID="ID_1352702920" MODIFIED="1488937496324" TEXT="Idee klar">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<ul>
|
||||
<li>
|
||||
man hat ein statisches Front-End, d.h. by-name access
|
||||
</li>
|
||||
<li>
|
||||
hinter dem liegt eine Factory
|
||||
</li>
|
||||
<li>
|
||||
die Instanz kann von innen her wieder geschlossen werden
|
||||
</li>
|
||||
<li>
|
||||
wenn geschlossen, dann Fehler werfen
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1488674268407" ID="ID_284516869" MODIFIED="1488674271114" TEXT="Parameter">
|
||||
<node CREATED="1488937542963" ID="ID_853531623" MODIFIED="1488937550998" TEXT="passiert im InvocationStateManager"/>
|
||||
<node CREATED="1488937551514" ID="ID_1024843173" MODIFIED="1488937557157" TEXT="es könnte Binde-Regeln geben"/>
|
||||
<node CREATED="1488937996901" ID="ID_1000532365" MODIFIED="1488940083440" TEXT="Lösungsweg vom Command vorkonfiguriert">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
...nicht klar, ob das notwendig (und gut) ist
|
||||
</p>
|
||||
<p>
|
||||
es könnte auch ausreichen, einfach die passende InteractionStateManager-Impl zu verwenden
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
<node CREATED="1488937565632" ID="ID_1990212985" MODIFIED="1488940116992" TEXT="dem User (UI-Element) ist das egal">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
denn InteractionStateManager ist ein <b>Interface</b>!
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1488937651021" ID="ID_1956085726" MODIFIED="1488937977999" TEXT="Binde-Muster">
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1488937670778" ID="ID_696645875" MODIFIED="1488937783542" TEXT="fest hinterlegte Eintität einsetzen">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
...das UI weiß,
|
||||
</p>
|
||||
<p>
|
||||
wer das konkret immer sein wird.
|
||||
</p>
|
||||
<p>
|
||||
D.h. beim Start des UI wird eine Verbindung irgendwo hinterlegt
|
||||
</p>
|
||||
<p>
|
||||
Das könnte ein <i>Advice</i> sein
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1488937682649" ID="ID_1090053275" MODIFIED="1488937855797" TEXT="aktuelles Element (mit Typ-Check)">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
vom Command her ist der Typ festgelegt
|
||||
</p>
|
||||
<p>
|
||||
auf das "aktuelle Element" wir eine Art Typ-Match gemacht.
|
||||
</p>
|
||||
<p>
|
||||
Wenn der paßt, kann das aktuelle Element verwendet werden.
|
||||
</p>
|
||||
<p>
|
||||
In diesem Fall wird das Command <i>enabled</i>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1488937711053" ID="ID_586793367" MODIFIED="1488937890369" TEXT="partial application">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
eine Argumentliste mit mehreren Parametern wir Schritt für Schritt geschlossen
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1488937724867" ID="ID_231519502" MODIFIED="1488937932885" TEXT="Ordnung nach Scope">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
wenn mehrere Objekte als Argumente in Frage kommen,
|
||||
</p>
|
||||
<p>
|
||||
wird das gemäß Scope "nächstgelegne" genommen
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1488937933566" ID="ID_170827087" MODIFIED="1488937945712" TEXT="das sind komplexe Pläne">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1488937947004" ID="ID_1297081811" MODIFIED="1488937965632" TEXT="Schlußfolgerung: nur die Strategie vorsehen">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1488674268407" ID="ID_284516869" MODIFIED="1488674271114" TEXT="Parameter"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1488672976664" ID="ID_476262016" MODIFIED="1488672983866" TEXT="Rollen">
|
||||
|
|
|
|||
Loading…
Reference in a new issue