{"id":390,"date":"2023-02-06T21:54:00","date_gmt":"2023-02-06T21:54:00","guid":{"rendered":"https:\/\/automatethemundane.com\/index.php\/2023\/02\/06\/building-a-model-driven-app-part-1-design\/"},"modified":"2023-02-06T21:54:00","modified_gmt":"2023-02-06T21:54:00","slug":"building-a-model-driven-app-part-1-design","status":"publish","type":"post","link":"https:\/\/automatethemundane.com\/index.php\/2023\/02\/06\/building-a-model-driven-app-part-1-design\/","title":{"rendered":"Building a Model Driven App Part 1-Design"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n<h1 class=\"wp-block-heading\">The Why<\/h1>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Model Driven Apps (MDA) while simple in interface, allow for quick builds and built in components that would take hours to replicate in a Canvas app. <\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">This guide will be the first part in a series of how to build a MDA. Throughout this guide we will be simulating an organization that needs to track purchase requests and approvals. The scenario will have a user submit a request that a supervisor has to evaluate. Then based upon the request amount have it go down one of three (small, medium, large) paths. All the while it will be going through the stage gates of finance, budget, and management. <\/p>\n\n\n<h1 class=\"wp-block-heading\">The How<\/h1>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">As with all good projects planning is the most important part. While it is tempting to go and just start delivering, it is vital to first create an ERD (Entity Relationship Diagram), a DFD (Data Flow Diagram), and map out security roles. These three documents allow will center and guide the project and mitigate (hopefully) rework. <\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">I create these documents within Viso. It is has all of the blocks\/languages needed for this endeavor built in. <\/p>\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color: rgb(253, 235, 236)\"><a href=\"https:\/\/1drv.ms\/u\/s!AqeHEKexdV-_le0HegvxX74hwPHWSQ?e=KxKh7X\">Model Driven App Template<\/a><\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">However even before building these documents a discovery session needs to occur, this is where you the developer will get all the necessary requirements written down to later be deciphered into the formal documents. I prefer to use <a href=\"https:\/\/app.whiteboard.microsoft.com\/\">Whiteboard <\/a>as a means of capturing everything quickly. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/05\/process-whiteboard-1024x417.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Process Whiteboard<\/figcaption><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Draw the data<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/05\/image.png\" alt=\"\"\/><\/figure>\n\n\n<h2 class=\"wp-block-heading\">ERD<\/h2>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">For ERD diagrams I prefer to use the Crows foot Notation. I know that others may be more \u201cscholarly\u201d in their approach, but it works for me when building a MDA. <\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">For this scenario we will be build a custom table with lookups to standard table. Using standard tables minimizes the amount of data entry required. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/05\/image-1-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n<h2 class=\"wp-block-heading\">DFD<\/h2>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">As with the ERD I use Visio to build out the DFD. I like to use BPMN 2.0 as the language. It is language managed by <a href=\"https:\/\/www.omg.org\/\">OMG <\/a>and provides more than enough detail for MDA. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/05\/image-2-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n<h2 class=\"wp-block-heading\">Security<\/h2>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Security is broken down into two parts Row Level Security (RLS) and Column Level Security (CLS).<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">In the same Visio Document I like to create three tables. RLS, CLS, and roles to user mapping. This way when it comes time to create the roles I can just copy and paste. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/05\/image-3-1024x576.png\" alt=\"\"\/><\/figure>\n\n","protected":false},"excerpt":{"rendered":"<p>The Why Model Driven Apps (MDA) while simple in interface, allow for quick builds and built in components that would take hours to replicate in a Canvas app. This guide will be the first part in a series of how to build a MDA. Throughout this guide we will be simulating an organization that needs [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":81,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[4],"class_list":["post-390","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-model-driven-app","tag-mda","entry","has-media"],"jetpack_featured_media_url":"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/05\/cover-scaled.jpg","_links":{"self":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/comments?post=390"}],"version-history":[{"count":0,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/390\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media\/81"}],"wp:attachment":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media?parent=390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/categories?post=390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/tags?post=390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}