Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

« Vorherige Version anzeigen Version 42 Nächste Version anzeigen »

Architektur Entscheidungen

Entwurf vom 20.01.2015

  1. Keine _ in keys.
  2. JSON Properties werden Camelcase geschrieben, also boMetaId statt bo_meta_id (sh.:http://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml#Property_Name_Format)
  3. UIDs werden durch FQNs ersetzt:
    1. Statt der UID des BO-Meta wird der Package Name und der Name des BOs genutzt: de_test_Auftrag
    2. Attribute werden (wenn möglich) nicht voll-qualifiziert (Ausnahme: im den VLP, Layout ML-Regeln) - Siehe Diskussion
    3. Attribute werden klein am Anfang geschrieben: de_test_Auftrag_gesamtsumme
  4. Trennung von technischen und fachlichen Attributen: 
    1. Bei BOs wird der fachliche Inhalt unter dem Key "content" aufgelistet (früher "bo_values")
  5. Alle Links werden folgendermaßen gerendert:

    "links": {
    	"self": {  // key ist das "rel"
        	"href": "http://.../bo_metas/de_test_Auftrag/123",	 // FQN bei BO 
           	"methods": [ "GET", "POST"],	// Array
        },
        "bo_meta": {
        	"href": "/bo_metas/de_test_Auftragsposition/",
            "methods": [ "GET"]
       }
    }
  6. URLs:
    1. FQN statt UID
  7. Dependencies:
    1. URL: FQNs statt UIDs, subforms
    2. Inhalt:

      "subforms" : {
      	"de_test_Auftragsposition_auftrag" : {" : {
      		"links": {
                 	"self": {
                 		"href": "/bo_metas/de_test_Auftrag/123/subforms/de_test_Auftragsposition_auftrag/",
                     	"methods": [ "GET", "POST"]
                 	},
                 	"bo_meta": {
                 		"href": "/bo_metas/de_test_Auftragsposition/",
                     	"methods": [ "GET"]
                 	}
             	}
          },
          "de_test_Reklamation_Folgeauftrag" : {
      		"self": {
             		"href": "/bo_metas/de_test_Auftrag/123/subforms/de_test_Reklamation_folgeauftrag/",
                 	"methods": [ "GET", "POST"]
            	},
             	"bo_meta": {
             		"href": "/bo_metas/de_test_Reklamation",
                 	"methods": [ "GET"]
             	}
      	},
      	"de_test_Reklamation_Auftrag" : {
      		"self": {
             		"href": "/bo_metas/de_test_Auftrag/123/subforms/de_test_Reklamation_auftrag/",
                 	"methods": [ "GET", "POST"]
            	},
             	"bo_meta": {
             		"href": "/bo_metas/de_test_Reklamation",
                 	"methods": [ "GET"]
             	}
      	},
      }
      
      
  8. Umbenennungen
    1. cstr (in ContainerRVO.java) -> constraints

Diskussion:

  1. Attribute sollten nicht voll-qualifiziert, weil:
    1. das mehr Traffic erzeugt
    2. das unübersichtlich aussieht
    3. Test-Fälle aufwendiger zu erstellen sind.
  2. Attribute müssen in Layout-ML + VLP Regeln auch zugreifbar sein, insbesondere wenn ein REST Service Client diese Attribute auswertet.
  3. HAL wird nicht verwendet, wegen der Vermischung von fachlichen und technischen Daten.
  4. Dependencies oder "subforms"?
    1. Was ist der key? Der Name des Attributes?
  5. Status Auflistung muss geändert werden:
    1. Beachten: Statuswechsel vs. Daten eingeben inkl. Statuswechsel
    2. URL zum Statuswechsel (ohne Datenänderung), Speichern inkl. Statuswechsel Attribut.
    3. Offen
  6. URLs + Inhalt

 

 

/

{
    "session_id": "ckW5dWQzBxkIfiH2eaWb",
    "username": "nuclos",
    "locale": "de_DE",
	"links": {
		"list" : {"href": "http://localhost:8280/example/rest/bo_metas", "verb": "GET"},
		"menu" : {"href": "http://localhost:8280/example/rest/bo?menu", "verb": "GET"}
	}
} 

 

/bo_metas

{
    "next_link": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302?start=50",
    "list":[
    {
        "bo_meta_id": "A3wu3cgTYSt3iXx8mIeH",
        "name": "Order",
		"links":{
			"self" : {"href": "http://localhost:8280/example/rest/bo_metas/A3wu3cgTYSt3iXx8mIeH", "verb": "GET"},
            "list" : {"href": "http://localhost:8280/example/rest/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos", "verb": "GET, POST"}
		}
    },
    {
        "bo_meta_id": "sYFUgWuHvxtv8MDrpgV2",
        "name": "Customer",
		"links":{
            "self" : {"href": "http://localhost:8280/example/rest/bo_metas/sYFUgWuHvxtv8MDrpgV2", "verb": "GET"},
			"list" : {"href": "http://localhost:8280/example/rest/bo_metas/sYFUgWuHvxtv8MDrpgV2/bos", "verb": "GET, POST"}
		}
    },
    {
        "bo_meta_id": "jVRqzzCD7QdHpwzKvAqQ",
        "name": "Article",
		"links":{
            	"self" : {"href": "http://localhost:8280/example/rest/bo_metas/sYFUgWuHvxtv8MDrpgV2", "verb": "GET"},
			    "list" : {"href": "http://localhost:8280/example/rest/bo_metas/jVRqzzCD7QdHpwzKvAqQ/bos", "verb": "GET"}
		}
    }
]
}

 

/bo_metas/A3wu3cgTYSt3iXx8mIeH

{
    "bo_meta_id": "A3wu3cgTYSt3iXx8mIeH",
    "name": "Order",
	"links":[
		{"rel": "bolist", "href": "http://localhost:8280/example/rest/bo_metas/A3wu3cgTYSt3iXx8mIeH", "verb": "GET, POST"},
		{"rel": "detail_layout", "href": "http://localhost:8280/example/rest/bo/layout/detail/f0PLjlXHogX00oBANPrD", "verb": "GET"}
	],
	"attributes": {
        "oGO8o3jU9P4EPvHqDwDc": {
            "bo_attr_id": "oGO8o3jU9P4EPvHqDwDc",
            "name": "name",
            "type": "String",
            "readonly": false,
            "unique": true,
            "nullable": false,
            "reference": false,
            "order": 1
        },
        "1XvTerXNGs4JYi2pLu5D1": {
            "bo_attr_id": "1XvTerXNGs4JYi2pLu5D1",
            "name": "Created at",
            "type": "InternalTimestamp",
            "readonly": false,
            "unique": false,
            "nullable": true,
            "reference": false,
            "order": 65510
        }
} 

/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos

{
    "links": {"next": {"href" : "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302?start=50", "verb": "GET"}},
    "list": [
        {
            "bo_id": 40000302,
            links:{
				"self" : {"href": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302", "verb": "GET"}
			},
            "title": "1011 Max Mustermann",
            "info": "München, 800700, Teger.., 2014-06-26, 1.50"
        },
        {
            "bo_id": 40000308,
            "href": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000308",
            "title": "1010 Max Mustermann",
            "info": "München, 800700, Teger.., 2014-06-05, 1.50"
        },
        {
            "bo_id": 40000305,
            "href": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000305",
            "title": "1012 Maria Mustermann",
            "info": "Berlin, 100200, .., 2014-06-26, 2014-06-27"
        }
    ]
}

 

/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos/40000302

{
    "bo_instance": {
        "bo_id": 40000302,
        "href": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302",
		"bo_values": {
			"DehvMLszOxRH2OHMcl5D": 1011,
        	"F8oMtVf266iYLHEF91LO": {id: 40000294, name:"Max Mustermann"},
        	"91cxckSRNQyaKskdj0Zl": {id: 40000295, name:"München, 800700, Tegernseeroberlandstr. 119"},
        	"sgVvrtGMgTS4B8l6MuOw": "2014-06-26",
        	"15f8oxrX6cSka7yq0jTS": "1.50",
        	"mkbW5XHJG69FyoxBA4uE": null,
        	"A3wu3cgTYSt3iXx8mIeH10": null
		}
        "bo_meta_id": "A3wu3cgTYSt3iXx8mIeH",
        "readonly": false,
        "layout": "http://localhost:8280/example/rest/meta/layout/-366277574",
        "denpendencies": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302/dependence",
        "title": "1011 Max Mustermann",
        "info": "München, 800700, Teger.., 2014-06-26, 1.50",
        "states": [
            {
                "state_id": "wJHQIygTfOGTRcbZNvd4",
                "name": "Processing",
                "numeral": 10,
                "current": true
            },
            {
                "state_id": "Ovf7rfxjXnUF19dDXHlj",
                "name": "Finished",
                "numeral": 80,
                "current": false
            },
            {
                "state_id": "hZm1rFHbbUvyEQDjELk6",
                "name": "Canceled",
                "numeral": 90,
                "current": false
            }
        ]
    }
}


/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos/40000302/dependencies

{
    "6NnStbGHIp0xVoXK21KL": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302/dependence/6NnStbGHIp0xVoXK21KL"
}

 

/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos/40000302/dependencies/6NnStbGHIp0xVoXK21KL
{
    "all": true,
    "total": 1,
    "title": "Order position",
    "bo_simple_list": [
        {
            "bo_instance_id": 40000303,
            "href": "http://localhost:8280/example/rest/data/WPYYgEC0psVEY9d7C78Z/40000303",
            "title": "2011 20 TB HDD",
            "info": "99.00, 2.00"
        }
    ]
}

/bo?menu

[
    {
        "path": "Example",
        "entries": [
            {
                "name": "Order",
                "bo_meta_id": "A3wu3cgTYSt3iXx8mIeH",
                "href": "http://localhost:8280/example/rest/meta/bometa/A3wu3cgTYSt3iXx8mIeH",
                "icon_href": "http://localhost:8280/example/rest/meta/icon/org.nuclos.client.resource.icon.glyphish.61-brightness.png"
            },
            {
                "name": "Customer",
                "bo_meta_id": "sYFUgWuHvxtv8MDrpgV2",
                "href": "http://localhost:8280/example/rest/meta/bometa/sYFUgWuHvxtv8MDrpgV2",
                "icon_href": "http://localhost:8280/example/rest/meta/icon/org.nuclos.client.resource.icon.glyphish.119-piggy-bank.png"
            },
            {
                "name": "Article",
                "bo_meta_id": "jVRqzzCD7QdHpwzKvAqQ",
                "href": "http://localhost:8280/example/rest/meta/bometa/jVRqzzCD7QdHpwzKvAqQ",
                "icon_href": "http://localhost:8280/example/rest/meta/icon/org.nuclos.client.resource.icon.glyphish.195-barcode.png"
            }
        ]
    }
]

/bo/layout/detail/f0PLjlXHogX00oBANPrD 

 {
    "type": "ROOT",
    "layout": {
        "columns": [
            12,
            120,
            96,
            112,
            180,
            50,
            -1,
            5
        ],
        "rows": [
            12,
            22,
            22,
            22,
            22,
            22,
            22,
            5,
            -1
        ]
    },
    "components": [
        {
            "bo_attr_id": "sgVvrtGMgTS4B8l6MuOw",
            "name": "Order date",
            "type": "Date",
            "readonly": false,
            "unique": false,
            "nullable": true,
            "reference": false,
            "order": 3,
            "group": "Example attribute group 1",
            "tablecstr": {
                "col": 2,
                "row": 5
            },
            "labelcstr": {
                "col": 1,
                "row": 5
            }
        },
        {
            "title": "Tabbedpane_1",
            "type": "TABBEDPANE",
            "cstr": {
                "col": 1,
                "colspan": 6,
                "row": 8
            },
            "components": [
                {
                    "title": "Position",
                    "type": "TAB",
                    "layout": {
                        "columns": [
                            0,
                            -1
                        ],
                        "rows": [
                            0,
                            -1
                        ]
                    },
                    "components": [
                        {
                            "bo_meta_id": "WPYYgEC0psVEY9d7C78Z",
                            "name": "Order position",
                            "parent_bo_attr_id": "6NnStbGHIp0xVoXK21KL",
                            "type": "DEPENDENCE_LIST",
                            "readonly": false,
                            "fields": [
                                {
                                    "bo_attr_id": "6NnStbGHIp0xVoXK21KL",
                                    "name": "Order",
                                    "type": "String",
                                    "readonly": false,
                                    "unique": false,
                                    "nullable": false,
                                    "reference": true,
                                    "referencing_bo_meta_id": "A3wu3cgTYSt3iXx8mIeH",
                                    "order": 0,
                                    "group": "Example attribute group 1"
                                },
                                {
                                    "bo_attr_id": "Aj8AVwwBaIZaBUIaXlzJ",
                                    "name": "Article",
                                    "type": "String",
                                    "readonly": false,
                                    "unique": false,
                                    "nullable": false,
                                    "reference": true,
                                    "referencing_bo_meta_id": "jVRqzzCD7QdHpwzKvAqQ",
                                    "order": 1,
                                    "group": "Example attribute group 1",
                                    "layout_rules": [
                                        {
                                            "type": "lookup",
                                            "source_bo_attr_id": "Aj8AVwwBaIZaBUIaXlzJ",
                                            "dependence_bo_meta_id": "WPYYgEC0psVEY9d7C78Z",
                                            "actions": [
                                                {
                                                    "type": "transfer-lookedup-value",
                                                    "target_bo_attr_id": "9dTVY27oKuuGT67c9Lm2",
                                                    "parameter": "ZAVTJqVqe3ToyhsvtZnA"
                                                }
                                            ]
                                        }
                                    ],
                                    "value_list_provider": {
                                        "type": "ds",
                                        "value": "RK30kN1qDSczSBsUfGvC",
                                        "params": {
                                            "vlp_meta_id": "DJIq.RK30kN1qDSczSBsUfGvC",
                                            "vlp_key_attr_id": "intid",
                                            "vlp_value_attr_id": "strname"
                                        }
                                    }
                                },
                                {
                                    "bo_attr_id": "9dTVY27oKuuGT67c9Lm2",
                                    "name": "Price",
                                    "type": "Decimal",
                                    "readonly": false,
                                    "unique": false,
                                    "nullable": false,
                                    "reference": false,
                                    "order": 2,
                                    "group": "Example attribute group 1"
                                },
                                {
                                    "bo_attr_id": "1sJUnkeLZacxxUIoePiC",
                                    "name": "Quantity",
                                    "type": "Decimal",
                                    "readonly": false,
                                    "unique": false,
                                    "nullable": false,
                                    "reference": false,
                                    "order": 3,
                                    "group": "Example attribute group 1"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "bo_attr_id": "mkbW5XHJG69FyoxBA4uE",
            "name": "Note",
            "type": "String",
            "readonly": false,
            "unique": false,
            "nullable": true,
            "reference": false,
            "order": 5,
            "group": "Example attribute group 1",
            "memo": true,
            "tablecstr": {
                "col": 6,
                "row": 1,
                "rowspan": 6
            },
            "labelcstr": {
                "col": 5,
                "row": 1,
                "valign": "middle"
            }
        },
        {
            "bo_attr_id": "15f8oxrX6cSka7yq0jTS",
            "name": "Discount",
            "type": "Decimal",
            "readonly": false,
            "unique": false,
            "nullable": true,
            "reference": false,
            "order": 4,
            "group": "Example attribute group 1",
            "tablecstr": {
                "col": 2,
                "row": 6,
                "valign": "middle"
            },
            "labelcstr": {
                "col": 1,
                "row": 6,
                "valign": "middle"
            }
        },
        {
            "bo_attr_id": "DehvMLszOxRH2OHMcl5D",
            "name": "Order number",
            "type": "Number",
            "readonly": false,
            "unique": true,
            "nullable": false,
            "reference": false,
            "order": 0,
            "group": "Example attribute group 1",
            "tablecstr": {
                "col": 2,
                "row": 1
            },
            "labelcstr": {
                "col": 1,
                "row": 1
            }
        },
        {
            "bo_attr_id": "F8oMtVf266iYLHEF91LO",
            "name": "Customer",
            "type": "String",
            "readonly": false,
            "unique": false,
            "nullable": true,
            "reference": true,
            "referencing_bo_meta_id": "sYFUgWuHvxtv8MDrpgV2",
            "order": 1,
            "group": "Example attribute group 1",
            "tablecstr": {
                "col": 2,
                "colspan": 2,
                "row": 3
            },
            "labelcstr": {
                "col": 1,
                "row": 3
            },
            "layout_rules": [
                {
                    "type": "lookup",
                    "source_bo_attr_id": "F8oMtVf266iYLHEF91LO",
                    "actions": [
                        {
                            "type": "transfer-lookedup-value",
                            "target_bo_attr_id": "15f8oxrX6cSka7yq0jTS",
                            "parameter": "imCuENAlyLJTKzq5Tkgs"
                        }
                    ]
                },
                {
                    "type": "value-changed",
                    "source_bo_attr_id": "F8oMtVf266iYLHEF91LO",
                    "actions": [
                        {
                            "type": "refresh-valuelist",
                            "target_bo_attr_id": "91cxckSRNQyaKskdj0Zl",
                            "parameter": "customer"
                        },
                        {
                            "type": "clear",
                            "target_bo_attr_id": "91cxckSRNQyaKskdj0Zl"
                        }
                    ]
                }
            ],
            "value_list_provider": {
                "type": "ds",
                "value": "L8KZcyJolYtf5ai9Gssx",
                "params": {
                    "vlp_meta_id": "DJIq.L8KZcyJolYtf5ai9Gssx",
                    "vlp_key_attr_id": "intid",
                    "vlp_value_attr_id": "strname"
                }
            }
        },
        {
            "bo_attr_id": "91cxckSRNQyaKskdj0Zl",
            "name": "Customer address",
            "type": "String",
            "readonly": false,
            "unique": false,
            "nullable": true,
            "reference": true,
            "referencing_bo_meta_id": "iCkm9KpNyzMk7Zi47tYn",
            "order": 2,
            "group": "Example attribute group 1",
            "tablecstr": {
                "col": 2,
                "colspan": 3,
                "row": 4
            },
            "labelcstr": {
                "col": 1,
                "row": 4,
                "valign": "middle"
            },
            "value_list_provider": {
                "type": "ds",
                "value": "bIw5ANNwVMLjBVYW0OMa",
                "params": {
                    "vlp_meta_id": "DJIq.bIw5ANNwVMLjBVYW0OMa",
                    "vlp_key_attr_id": "intid",
                    "customer": "",
                    "vlp_value_attr_id": "strcity"
                }
            }
        },
        {
            "bo_attr_id": "A3wu3cgTYSt3iXx8mIeH10",
            "name": "Action",
            "type": "String",
            "readonly": false,
            "unique": false,
            "nullable": true,
            "reference": true,
            "referencing_bo_meta_id": "ui9l",
            "order": 6,
            "tablecstr": {
                "col": 2,
                "colspan": 2,
                "row": 2
            },
            "labelcstr": {
                "col": 1,
                "row": 2,
                "valign": "middle"
            },
            "value_list_provider": {
                "type": "named",
                "value": "process",
                "params": {}
            }
        }
    ]
}


  • Keine Stichwörter