{"id":446,"date":"2024-02-25T17:33:54","date_gmt":"2024-02-25T17:33:54","guid":{"rendered":"https:\/\/modelingperspectives.com\/?page_id=446"},"modified":"2024-03-03T15:46:36","modified_gmt":"2024-03-03T15:46:36","slug":"perspectives-design-patterns-ii","status":"publish","type":"page","link":"https:\/\/modelingperspectives.com\/index.php\/perspectives-design-patterns-ii\/","title":{"rendered":"Perspectives Design Patterns II"},"content":{"rendered":"<p>In this second part of the Perspectives Design Patterns we deal with Perspectives on and in Contexts. <\/p><h2 class=\"wp-block-heading\">Perspectives on a Context<\/h2><p>Here is a Host User Role that has a Perspective on a Multi Context. In fact the Host will not have a Perspective in the Context itself but instead on the Context Role of the Chats Context:<\/p><div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex\"><div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"482\" height=\"151\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-40.png\" alt=\"\" class=\"wp-image-450\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-40.png 482w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-40-300x94.png 300w\" sizes=\"(max-width: 482px) 100vw, 482px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"422\" height=\"510\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-41.png\" alt=\"\" class=\"wp-image-451\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-41.png 422w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-41-248x300.png 248w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/figure><\/div><\/div><p>As you can see there is an extra column called Go. This column contains buttons that, when clicked, will navigate to the Context of the row that is selected. Based on the Model so far nothing will happen. The reason is that the Host User Role does not have a Role within the Chats. To make sure it has we change the Model:<\/p><div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-2 wp-block-columns-is-layout-flex\"><div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"325\" height=\"224\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-42.png\" alt=\"\" class=\"wp-image-452\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-42.png 325w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-42-300x207.png 300w\" sizes=\"(max-width: 325px) 100vw, 325px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"307\" height=\"160\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-43.png\" alt=\"\" class=\"wp-image-453\" style=\"width:361px;height:auto\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-43.png 307w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-43-300x156.png 300w\" sizes=\"(max-width: 307px) 100vw, 307px\" \/><\/figure><\/div><\/div><p>Note that the right diagram is the contents of the Chats Multi Context on the left<\/p><div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-3 wp-block-columns-is-layout-flex\"><div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"405\" height=\"777\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-45.png\" alt=\"\" class=\"wp-image-462\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-45.png 405w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-45-156x300.png 156w\" sizes=\"(max-width: 405px) 100vw, 405px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"776\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-46.png\" alt=\"\" class=\"wp-image-463\" style=\"width:350px;height:auto\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-46.png 397w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-46-153x300.png 153w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/figure><\/div><\/div><p>Here the Modeler chose the Smartphone UI for the Host and Host In Chats. There is also a Tablet version available. As expected, when we select the (second) Chat (left), we enter the selected Chat (right) and can add a message.<\/p><h2 class=\"wp-block-heading\">Contexts in Contexts<\/h2><p>As noted before, Contexts can be nested. This can be modeled by an IN relation between the embedded Context and the embedding Context as is shown below.<\/p><figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"538\" height=\"248\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-47.png\" alt=\"\" class=\"wp-image-467\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-47.png 538w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/02\/image-47-300x138.png 300w\" sizes=\"(max-width: 538px) 100vw, 538px\" \/><\/figure><p>Below, the Context Diagram of the embedding Courses Multi Contexts is shown. Note that the Student can make itself a Student in Courses and Student in Courses can make itself a Student in Sessions:<\/p><p><\/p><figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"543\" height=\"229\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image.png\" alt=\"\" class=\"wp-image-472\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image.png 543w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-300x127.png 300w\" sizes=\"(max-width: 543px) 100vw, 543px\" \/><\/figure><p>Being a Student in Sessions it has a Perspectives on the session Presentation.<\/p><p><\/p><figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"133\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-1.png\" alt=\"\" class=\"wp-image-474\" style=\"width:499px;height:auto\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-1.png 397w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-1-300x101.png 300w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/figure><p>The resulting Smartphone Prototype starting with the Student Role will look like this:<\/p><p><\/p><figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"405\" height=\"783\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-3.png\" alt=\"\" class=\"wp-image-476\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-3.png 405w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-3-155x300.png 155w\" sizes=\"(max-width: 405px) 100vw, 405px\" \/><\/figure><p>Entering the first course: Introduction to Perspectives will result in:<\/p><p><\/p><figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"410\" height=\"780\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-8.png\" alt=\"\" class=\"wp-image-482\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-8.png 410w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-8-158x300.png 158w\" sizes=\"(max-width: 410px) 100vw, 410px\" \/><\/figure><p>And subsequently entering the Context of the first Session results in the next Desktop Prototype:<\/p><p><\/p><figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"408\" height=\"788\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-7.png\" alt=\"\" class=\"wp-image-481\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-7.png 408w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-7-155x300.png 155w\" sizes=\"(max-width: 408px) 100vw, 408px\" \/><\/figure><p>Here a Image Widget is added to the Model to show one of the slides of the Presentation. Widgets will be explained in <a href=\"https:\/\/modelingperspectives.com\/index.php\/widgets\/\" data-type=\"page\" data-id=\"485\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#649da9\" class=\"has-inline-color\">this<\/mark><\/a> topic.<\/p><h2 class=\"wp-block-heading\">Aspects<\/h2><p>Aspects are Roles that contribute to other Roles without resulting in Instances. They are used to add Aspects that are Properties and Perspectives to the Roles in a Model. Aspects are indicated by outgreyed IN relations. The Model below is paraphrased as follows:<\/p><pre class=\"wp-block-verse has-text-align-center\">Presenters are Location Users\nSessions are Locations\nLocation Users have a Perspectives on Locations\nPresenters have a Perspective on Sessions\n\n<\/pre><figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"193\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-10.png\" alt=\"\" class=\"wp-image-490\" style=\"width:472px;height:auto\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-10.png 444w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-10-300x130.png 300w\" sizes=\"(max-width: 444px) 100vw, 444px\" \/><\/figure><p class=\"has-text-align-center\">The Location Aspect Role has a Location Property<\/p><p class=\"has-text-align-center\">The Location Aspect Role&#8217;s Location Property has a Map Widget <\/p><p><\/p><figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"233\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-11.png\" alt=\"\" class=\"wp-image-491\" style=\"width:460px;height:auto\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-11.png 598w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-11-300x117.png 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><p class=\"has-text-align-center\">The Session has a Session Title and a Session Date Time<\/p><p><\/p><figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"149\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-12.png\" alt=\"\" class=\"wp-image-492\" style=\"width:455px;height:auto\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-12.png 497w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-12-300x90.png 300w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/figure><p class=\"has-text-align-left\">This results in the following Desktop Prototype for the Presenter User. Note that Location is now added to the Properties of Session and the Presenter now has a Perspective on not only Session but also on Location.<\/p><p><\/p><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"810\" height=\"296\" src=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-9.png\" alt=\"\" class=\"wp-image-489\" srcset=\"https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-9.png 810w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-9-300x110.png 300w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-9-768x281.png 768w, https:\/\/modelingperspectives.com\/wp-content\/uploads\/2024\/03\/image-9-600x219.png 600w\" sizes=\"(max-width: 810px) 100vw, 810px\" \/><\/figure><p>This concludes the second part of the Perspective Patterns. A possible next part is about Calculated Properties which you can find <a href=\"https:\/\/modelingperspectives.com\/index.php\/calculated-properties-and-functions\/\" data-type=\"page\" data-id=\"496\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#77aebc\" class=\"has-inline-color\">here<\/mark><\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>In this second part of the Perspectives Design Patterns we deal with Perspectives on and in Contexts. Perspectives on a Context Here is a Host User Role that has a Perspective on a Multi Context. In fact the Host will not have a Perspective in the Context itself but instead on the Context Role of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-446","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/modelingperspectives.com\/index.php\/wp-json\/wp\/v2\/pages\/446"}],"collection":[{"href":"https:\/\/modelingperspectives.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/modelingperspectives.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/modelingperspectives.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/modelingperspectives.com\/index.php\/wp-json\/wp\/v2\/comments?post=446"}],"version-history":[{"count":17,"href":"https:\/\/modelingperspectives.com\/index.php\/wp-json\/wp\/v2\/pages\/446\/revisions"}],"predecessor-version":[{"id":548,"href":"https:\/\/modelingperspectives.com\/index.php\/wp-json\/wp\/v2\/pages\/446\/revisions\/548"}],"wp:attachment":[{"href":"https:\/\/modelingperspectives.com\/index.php\/wp-json\/wp\/v2\/media?parent=446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}