Jump to: navigation, search

Difference between revisions of "HowTo:Configure the ACM"


({{UBIK}} SmartStudio)
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
The [[Application_Context_Management|ACM (Application Context Management)]] is about controlling how {{UBIK}} satellites see data provided by the {{UBIK}} environment via web service (or the web client).  
 
The [[Application_Context_Management|ACM (Application Context Management)]] is about controlling how {{UBIK}} satellites see data provided by the {{UBIK}} environment via web service (or the web client).  
  
This page describes how the ACM works and how to actually configure it using {{UBIK}} Studio or {{UBIK}} SmartStudio, including creating Application and Context, Scopes, View and View Items and publishing the Meta Definitions.
+
This page describes how to configure the ACM using {{UBIK}} Studio or {{UBIK}} SmartStudio, including creating Application and Context, Scopes, View and View Items and publishing the Meta Definitions.
 
+
== How the ACM works ==
+
Technically, the ACM can be explained separating the following topics:
+
* Application and Context
+
* Scopes
+
* View and View Items
+
* Meta Definitions
+
 
+
=== Application and Context ===
+
An Application is used to identify Contexts. A Context is used to identify a View and all relevant Scopes. {{UBIK}} satellites use these two in order to identify the View that provides data for them, as well as the Scopes that decide what the data looks like. The Application's and Context's names have to be configured in the client's settings.
+
One could say the Context is the central object in every ACM configuration, connecting all the details.
+
 
+
=== Scopes ===
+
Scopes define what a {{UBIK}} object and its properties looks like to a {{UBIK}} satellite. Let's say we have a pump with a lot of properties (that can be used for automatic data processing), but these properties aren't of much use to a human user. In this case, if I publish such pump objects to the user's mobile client (aka. {{UBIK}}} satellite) via ACM, I probably want to give the user a more convenient, specialized version of these objects, containing only useful properties. With Scopes, one can define what an abstract content object should look like. One could say, they are a post-processing filter for Meta Classes. Specifically, you can define which properties are visible, decide which classifications are published and configure rights (e.g. for writing a property value or creating instance objects for the Scope).
+
 
+
=== View and View Items ===
+
The View defines the hierarchical representation of all objects that should be available. The object's look & feel is described by Scopes, but the connection between those objects is described by the View. For example, if I have a root object ''Station A'' and as its child, I have an object ''Unit A.1'', then the View describes that ''Unit A.1'' is a child of ''Station A''.
+
Technically, the view uses View Items in order to describe the connection of objects. View Items are defined for a Meta Class, e.g. for the Meta Class ''Station'', and can provide the children for specific instances of such a Meta Class. In our example, if we have a View Item responsible for getting the Unit-children of a Station, for ''Station A'' (which is an instance of the scope ''Station'') it would retrieve ''Unit A.1''.
+
There are different types of View Items, depending on how the children should be resolved technically. The following types exist:
+
* Reference View Item (only 1 : N relations)
+
* Relation View Item (N : M relations possible)
+
* Query View Item (complex, custom child evaluation possible)
+
Reference View Items use a reference from each child to the parent in order to evaluate the children in a backward manner.
+
Relation View Items use relations from parents to children, where each parent can have multiple children and vice-versa, every child can have multiple parents.
+
Query View Items use a query to evaluate the children, but the parent object has to be the respective query object.
+
A View can have multiple view items for the same Meta Class (target type) in order to make a complex structure possible.
+
 
+
=== Meta Definitions ===
+
Last but not least, the {{UBIK}} satellites need to get Meta Definitions in order to interpret and use the content correctly. Meta Definitions describe (abstract) Meta Classes, Selective Lists, Units and rights as well as some information about the view structure, e.g. possible children of an element (in case the user wants to create a new object, like a picture for example).
+
The Meta Definitions are a result of the Scopes and the View for a specific Context. The customizer (you) has to publish these Meta Definitions actively though, using the [[ACM Manager]].
+
 
+
== How to actually configure the ACM ==
+
There are two programs you can use to configure the ACM: {{UBIK}} Studio and {{UBIK}} SmartStudio.  
+
  
 
=== {{UBIK}} SmartStudio ===
 
=== {{UBIK}} SmartStudio ===
With {{UBIK}} SmartStudio, you can assemble the whole ACM graphically; the technical details are edited automatically by {{UBIK}} SmartStudio, so it is significantly less work (you don't have to care about View Items at all, you just create Scopes and connect them, using drag & drop). On the other hand, only 1 : N connections can be created using {{UBIK}} SmartStudio.
+
With [[SmartStudio|{{UBIK}} SmartStudio]], you can assemble the whole ACM graphically; the technical details are edited automatically by {{UBIK}} SmartStudio, so it is significantly less work (e.g., you don't have to care about View Items at all, you just create Scopes and connect them, using drag & drop).  
{{UBIK}} SmartStudio tries to satisfy all common, major use cases in a comfortable manner, at the cost of detail functionality.
+
  
 
# Open {{UBIK}} SmartStudio.
 
# Open {{UBIK}} SmartStudio.
 
# Create a new project or open an existing one.  
 
# Create a new project or open an existing one.  
 
# If necessary, design new Meta Classes (for objects to provide to the client) using the Inheritance Graph or connect to a {{UBIK}} environment (database) and use the Meta Classes defined there.
 
# If necessary, design new Meta Classes (for objects to provide to the client) using the Inheritance Graph or connect to a {{UBIK}} environment (database) and use the Meta Classes defined there.
 +
# Make sure there are a {{UBIK}} Environment including a database and functioning web services, as well as a content object you want to show on the mobile client.
 
# Open a new Application Graph worksheet.
 
# Open a new Application Graph worksheet.
# Create Application and Context objects and connect them.
+
# Add a Application by dragging it into the worksheet from a picker (existing Apps) or the toolbox (new App), available to the left of the worksheet area.
# Use drag & drop to define Scopes for previously created Meta Classes (available in pickers on the left side).
+
# Add a Context by dragging it into the worksheet from a picker (existing Contexts) or the toolbox (new Context), available to the left of the worksheet area.
# Connect the Scopes in order to define the hierarchy. Also connect at least one Scope to the Context as a child.
+
# Connect the Context to the Application by dragging a connection between the two.
# If necessary, define queries for the root and infrastructure objects and connect them to the Context as input elements.
+
# In order to support the object you want to make appear on the mobile client, add a Scope by dragging a compatible MetaClass into the worksheet from a picker (existing MetaClasses) or the toolbox (new MetaClasses), available to the left of the worksheet area. Such a Scope is a configuration for all instances of the respective MetaClass delivered to the mobile client.
# Make sure the target {{UBIK}} environment is connected.
+
# Configure the Scope by adjusting the access rights for its MetaProperties.
# Perform the staging process for saving the new Application Graph to the {{UBIK}} environment (database).
+
# Connect the Scope to the Context. This means, instances of the scoped MetaClass will be presentable as root objects (first navigation level on the mobile client).
 +
# You can add further Scopes to the Application Graph in the same manner.
 +
# Connect the Scopes in order to define the hierarchy. Instances of the right-hand scoped MetaClass will be presentable in the hierarchy level below the left-hand scoped MetaClass' instances.
 +
## Scope connections can be established by dragging connections between the output connector of the parent Scope and the input connector of the child Scope.
 +
## Configure the connections by choosing the way the instances are actually connected to each other (selecting a relation or link property). For an instance of the left-hand scoped MetaClass, the configured link property or relation will be used to find instances of the right-hand scoped MetaClass to be listed as children of the first instance on the mobile client.
 +
## If you want an object to be shown as the child of another on the mobile client, use a relation or link property to connect the two. This relation or link property can then be configured in a connection between two compatible Scopes.
 +
# Connect at least one Scope to the Context as a child. Instances of the scoped MetaClass will be presentable as root objects (first navigation level on the mobile client).
 +
# Configure a root objects Query for the Context by dragging a Query into the worksheet from a picker (existing Queries) or the toolbox (new Queries), available to the left of the worksheet area, and connecting it to the Context, using its root objects input connector. This means, the query finds all instances to show on the root level of the app. The Context must have a compatible scope connected to it in order for the instances to be displayed correctly.
 +
# Make sure the target {{UBIK}} Environment is connected.
 +
# Save the application graph to the desired {{UBIK}} Environment, using the menu bar or context menu.
 
# Open the {{UBIK}} environment page and select the ACM management sub-section.
 
# Open the {{UBIK}} environment page and select the ACM management sub-section.
# Publish the Meta Definitions.
+
# Select the relevant Application and Context, and assemble and publish the Meta Definitions.
 
# Restart the {{UBIK}} web services.
 
# Restart the {{UBIK}} web services.
 
# Test the results using any {{UBIK}} satellite.
 
# Test the results using any {{UBIK}} satellite.
 
  
 
=== {{UBIK}} Studio ===
 
=== {{UBIK}} Studio ===
{{UBIK}} Studio provides a higher grade of technical detail and more possibilities. If you cannot satisfy your demands using {{UBIK}} SmartStudio, e.g. if you need to create N : M connections, you have to use {{UBIK}} Studio.  
+
[[UBIK_Studio|{{UBIK}} Studio]] provides more basic tools, providing the full range of {{UBIK}} data model features, but perhaps less comfortably so.  
  
 
# Start {{UBIK}} Studio and connect to a database.
 
# Start {{UBIK}} Studio and connect to a database.
 
# If necessary, create new Meta Classes for objects to provide to the client.
 
# If necessary, create new Meta Classes for objects to provide to the client.
# Use the Relation editor to define MetaProperties for your Scopes. Using the Relation Data inspector, you can edit rights for each property.
+
# Create Application, Context and View instances using the bulk editor for the respective MetaClasses (Application, Context, [[HowTo:Create_a_new_View|View]]).
# Create Application, Context and View instances using the bulk editor for the respective MetaClasses (Application, Context, View).
+
 
# Find out which different connections your ACM hierarchy should provide; more specifically, which parent meta classes should lead to which child meta classes, and what kind of View Items you need for that (depending on how the children should be evaluated technically).
 
# Find out which different connections your ACM hierarchy should provide; more specifically, which parent meta classes should lead to which child meta classes, and what kind of View Items you need for that (depending on how the children should be evaluated technically).
 
# If necessary, modify the Meta Classes so they can describe their parents or children. The way to do this depends on the type of View Item you're going to use, e.g. for a Reference View Item, you'll have to create a Reference and add a respective Reference Meta Property to the Meta Class that describes the children, in order for the child instances to refer to their parents using this Reference. Make sure the target type is set correctly.
 
# If necessary, modify the Meta Classes so they can describe their parents or children. The way to do this depends on the type of View Item you're going to use, e.g. for a Reference View Item, you'll have to create a Reference and add a respective Reference Meta Property to the Meta Class that describes the children, in order for the child instances to refer to their parents using this Reference. Make sure the target type is set correctly.
# Create and configure View Item instances (of the System Meta Class [[VIEWITEM_REFERENCE]], [[VIEWITEM_RELATION]] or [[VIEWITEM_QUERY]]) for each level of the hierarchy and every parent & child type (Meta Class) using the bulk editor.  
+
# Create and configure View Item instances (of the System Meta Class [[REFERENCEVIEWITEM]], [[RELATIONVIEWITEM]] or [[QUERYVIEWITEM]]) for each level of the hierarchy and every parent & child type (Meta Class) using the bulk editor.  
 +
# Connect the View Items to the View (see [[HowTo:Create_a_new_View#Testing_the_View]])
 
# Create Scopes as instances of the [[METACLASSSCOPE]] System Meta Class (or [[QUERYSCOPE]] for queries).
 
# Create Scopes as instances of the [[METACLASSSCOPE]] System Meta Class (or [[QUERYSCOPE]] for queries).
# Connect the Context to the Application and add all necessary Scopes to the Context using relations.
+
# Use the Relation editor to define MetaProperties for your Scopes. Using the Relation Data inspector, you can edit rights for each property.
 +
# Connect the Context to the Application and add all necessary Scopes to the Context using relations (see [[HowTo:Create_a_new_MetaClassScope]], point 6).
 
# Connect the root and infrastructure objects and/or queries to the Context.
 
# Connect the root and infrastructure objects and/or queries to the Context.
 
# If necessary, manage the content objects to be delivered by the ACM (e.g., create or import the data and fill in reference property values).
 
# If necessary, manage the content objects to be delivered by the ACM (e.g., create or import the data and fill in reference property values).
Line 73: Line 49:
 
# Restart the {{UBIK}} web services.
 
# Restart the {{UBIK}} web services.
 
# Test the results using any {{UBIK}} satellite.
 
# Test the results using any {{UBIK}} satellite.
 +
  
 
=== See also ===
 
=== See also ===
Line 79: Line 56:
 
* [[HowTo:Create a new Context]]
 
* [[HowTo:Create a new Context]]
 
* [[HowTo:Create a new MetaClassScope]] or [[HowTo:Create a new QueryScope]]
 
* [[HowTo:Create a new MetaClassScope]] or [[HowTo:Create a new QueryScope]]
 +
* [[HowTo:Create_a_new_View]]
 +
* [[SmartStudio]]
 +
 +
[[Category:How-To|Configure the ACM]]
 +
[[Category:Publishing|Configure the ACM]]
 +
[[Category:Studio|Configure the ACM]]
 +
[[Category:Web service|Configure the ACM]]

Latest revision as of 15:00, 20 November 2019

The ACM (Application Context Management) is about controlling how UBIK® satellites see data provided by the UBIK® environment via web service (or the web client).

This page describes how to configure the ACM using UBIK® Studio or UBIK® SmartStudio, including creating Application and Context, Scopes, View and View Items and publishing the Meta Definitions.

UBIK® SmartStudio

With UBIK® SmartStudio, you can assemble the whole ACM graphically; the technical details are edited automatically by UBIK® SmartStudio, so it is significantly less work (e.g., you don't have to care about View Items at all, you just create Scopes and connect them, using drag & drop).

  1. Open UBIK® SmartStudio.
  2. Create a new project or open an existing one.
  3. If necessary, design new Meta Classes (for objects to provide to the client) using the Inheritance Graph or connect to a UBIK® environment (database) and use the Meta Classes defined there.
  4. Make sure there are a UBIK® Environment including a database and functioning web services, as well as a content object you want to show on the mobile client.
  5. Open a new Application Graph worksheet.
  6. Add a Application by dragging it into the worksheet from a picker (existing Apps) or the toolbox (new App), available to the left of the worksheet area.
  7. Add a Context by dragging it into the worksheet from a picker (existing Contexts) or the toolbox (new Context), available to the left of the worksheet area.
  8. Connect the Context to the Application by dragging a connection between the two.
  9. In order to support the object you want to make appear on the mobile client, add a Scope by dragging a compatible MetaClass into the worksheet from a picker (existing MetaClasses) or the toolbox (new MetaClasses), available to the left of the worksheet area. Such a Scope is a configuration for all instances of the respective MetaClass delivered to the mobile client.
  10. Configure the Scope by adjusting the access rights for its MetaProperties.
  11. Connect the Scope to the Context. This means, instances of the scoped MetaClass will be presentable as root objects (first navigation level on the mobile client).
  12. You can add further Scopes to the Application Graph in the same manner.
  13. Connect the Scopes in order to define the hierarchy. Instances of the right-hand scoped MetaClass will be presentable in the hierarchy level below the left-hand scoped MetaClass' instances.
    1. Scope connections can be established by dragging connections between the output connector of the parent Scope and the input connector of the child Scope.
    2. Configure the connections by choosing the way the instances are actually connected to each other (selecting a relation or link property). For an instance of the left-hand scoped MetaClass, the configured link property or relation will be used to find instances of the right-hand scoped MetaClass to be listed as children of the first instance on the mobile client.
    3. If you want an object to be shown as the child of another on the mobile client, use a relation or link property to connect the two. This relation or link property can then be configured in a connection between two compatible Scopes.
  14. Connect at least one Scope to the Context as a child. Instances of the scoped MetaClass will be presentable as root objects (first navigation level on the mobile client).
  15. Configure a root objects Query for the Context by dragging a Query into the worksheet from a picker (existing Queries) or the toolbox (new Queries), available to the left of the worksheet area, and connecting it to the Context, using its root objects input connector. This means, the query finds all instances to show on the root level of the app. The Context must have a compatible scope connected to it in order for the instances to be displayed correctly.
  16. Make sure the target UBIK® Environment is connected.
  17. Save the application graph to the desired UBIK® Environment, using the menu bar or context menu.
  18. Open the UBIK® environment page and select the ACM management sub-section.
  19. Select the relevant Application and Context, and assemble and publish the Meta Definitions.
  20. Restart the UBIK® web services.
  21. Test the results using any UBIK® satellite.

UBIK® Studio

UBIK® Studio provides more basic tools, providing the full range of UBIK® data model features, but perhaps less comfortably so.

  1. Start UBIK® Studio and connect to a database.
  2. If necessary, create new Meta Classes for objects to provide to the client.
  3. Create Application, Context and View instances using the bulk editor for the respective MetaClasses (Application, Context, View).
  4. Find out which different connections your ACM hierarchy should provide; more specifically, which parent meta classes should lead to which child meta classes, and what kind of View Items you need for that (depending on how the children should be evaluated technically).
  5. If necessary, modify the Meta Classes so they can describe their parents or children. The way to do this depends on the type of View Item you're going to use, e.g. for a Reference View Item, you'll have to create a Reference and add a respective Reference Meta Property to the Meta Class that describes the children, in order for the child instances to refer to their parents using this Reference. Make sure the target type is set correctly.
  6. Create and configure View Item instances (of the System Meta Class REFERENCEVIEWITEM, RELATIONVIEWITEM or QUERYVIEWITEM) for each level of the hierarchy and every parent & child type (Meta Class) using the bulk editor.
  7. Connect the View Items to the View (see Create a new View)
  8. Create Scopes as instances of the METACLASSSCOPE System Meta Class (or QUERYSCOPE for queries).
  9. Use the Relation editor to define MetaProperties for your Scopes. Using the Relation Data inspector, you can edit rights for each property.
  10. Connect the Context to the Application and add all necessary Scopes to the Context using relations (see Create a new MetaClassScope, point 6).
  11. Connect the root and infrastructure objects and/or queries to the Context.
  12. If necessary, manage the content objects to be delivered by the ACM (e.g., create or import the data and fill in reference property values).
  13. Open the ACM Manager and publish the Context's Meta Definitions.
  14. Restart the UBIK® web services.
  15. Test the results using any UBIK® satellite.


See also