On October 23rd, 2014, we updated our
By continuing to use LinkedIn’s SlideShare service, you agree to the revised terms, so please take a few minutes to review them.
Vanskelig å legge til ny funksjonalitet eller erstatte eksisterende
Vanskelig å teste og deploye
Hvordan lage løsere kobling?
Hvordan dekomponere GUI koden?
Hvor kommer WPF inn i bildet?
” Program to an interface, not an implementation”
Separation Of Concerns
Presentation Model Presentation Model Represents the state and the behavior of the presentation independently of the GUI controls used in the interface. Martin Fowler Design Pattern Guru
Presentation Model Presentation Model is a pattern that pulls presentation behavior from a view .
Presentation Model It's useful for allowing you to test without the UI, support for some form of multiple view and a separation of concerns which may make it easier to develop the user interface.
View (XAML) Data Binding Change notification “ It is easier to consider Presentation Model as an abstract of the view that is not dependent on a specific GUI framework.” “ A view then simply projects the state of the presentation model onto the glass.” Presentation Model State Name, Description, Estimate, IsSaveButtonEnabled Operations Save, Delete Data Model WS DB FS
Probably the most annoying part of Presentation Model is the synchronization between Presentation Model and view.
Presentation Model Ideally some kind of framework could handle this, which I'm hoping will happen some day with technologies like .NET's data binding .
WPF Data Binding!
View (XAML) Data Binding Change notification Presentation Model State Name, Description, Estimate, IsSaveButtonEnabled Operations Save, Delete Data Model WS DB FS Designer Developer Integration/Database developer