{"id":1465,"date":"2014-11-02T09:21:15","date_gmt":"2014-11-02T08:21:15","guid":{"rendered":"http:\/\/doena-journal.net\/en\/?p=1465"},"modified":"2021-09-27T15:44:13","modified_gmt":"2021-09-27T13:44:13","slug":"wpf-mvvm-viewmodel-model-messageboxes","status":"publish","type":"post","link":"http:\/\/doena-journal.net\/en\/1465\/wpf-mvvm-viewmodel-model-messageboxes","title":{"rendered":"WPF: MVVM, ViewModel, Model &amp; MessageBoxes"},"content":{"rendered":"<p><a href=\"http:\/\/doena-journal.net\/2287\/wpf-mvvm-viewmodel-model-messageboxen\">Deutsche Version<\/a><\/p>\n<p>I&#8217;ve never been much of a GUI developer and my programs look it.<\/p>\n<p>Where I&#8217;m good at is the Businesslogic part of the application.<\/p>\n<p>That&#8217;s why I&#8217;ve always stuck to known territory, where you can align controls along lines and it looked halfway decent (though not pretty).<\/p>\n<p>But times they are a-Changin&#8217; and now I&#8217;ve challenged myself o the topic of WPF (Windows Presentation Foundation) in tandem with MVVM (Model-View-ViewModel).<\/p>\n<p>As a starting point I took a program I wanted to write anyway and as such it was ideal as a training ground.<\/p>\n<p>In the ZIP file linked below you&#8217;ll find the result. It contains a classic Windows Forms program which is designed as MVVM as well as its WPF counterpart.<\/p>\n<p>Both programs use the same model but have tailored ViewModels.<\/p>\n<p>All accesses from the Model to either the UI (i.e. File Dialogs or MessageBoxes) or the file system are completely encapsulated and are provided by the clients of the Model.<\/p>\n<p>Thus the program should be completely testable by Unit tests since all interfaces are mockable.<\/p>\n<p>I believe the resulting code is quite clear and should be understandable by a developer who wants to delve into the topic of MVVM.<\/p>\n<p><a href=\"http:\/\/doena-journal.net\/wp-content\/uploads\/2014\/11\/MVVM.zip\">MVVM.zip<\/a><\/p>\n<p>The sequel: <a href=\"http:\/\/doena-journal.net\/en\/1468\/wpf-mvvm-responsive-ui\">WPF: MVVM &#038; Responsive UI<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deutsche Version I&#8217;ve never been much of a GUI developer and my programs look it. Where I&#8217;m good at is the Businesslogic part of the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,870],"tags":[1454,1453,1730,1729],"class_list":["post-1465","post","type-post","status-publish","format-standard","hentry","category-misc","category-software","tag-net","tag-c","tag-mvvm","tag-wpf"],"_links":{"self":[{"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/posts\/1465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/comments?post=1465"}],"version-history":[{"count":3,"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/posts\/1465\/revisions"}],"predecessor-version":[{"id":1477,"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/posts\/1465\/revisions\/1477"}],"wp:attachment":[{"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/media?parent=1465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/categories?post=1465"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/doena-journal.net\/en\/wp-json\/wp\/v2\/tags?post=1465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}