Closed leaderanalytics closed 4 years ago
What is the difference between a Data Transfer Object and a presentation model?
A DTO is a low level class used to shuttle data back and forth to the database. It usually has a structure that exactly matches the table structure on the database.
A presentation model has these differences:
Usually has logic that is specific to the presentation layer. For example PresentationBoard
calls OnPropertyChanged
. A presentation object written for, say, a html page would not call that method.
Not tied to the structure of the database. TaskDTO has a BoardID property but it it does not have board name. Not very handy if you want a task report with task name and board name. A presentation model is handy when you want to de-normalize objects for reporting or display.
Sometimes stores data in a type other than its native type. Dollar amounts formatted with $ sign and commas are often string properties on presentation models but decimal properties on DTO's.
Known bugs in this merge that will be worked on:
I made a few more changes than I thought I would. In order to make this app (or any app) platform agnostic it has to be layered like an n-tier application.
I moved the model (DTOs) to it's own assembly - need to do that so other layers can resuse it. Same with services.
I did not yet add support for multiple databases but doing so at this point is pretty simple - add another implementation of IKanbanTaskerService. It will be easy to add a web API also.
Issues: The delete button on the panel does not call the bound command. I don't know why - it's a problem for the UWP guys. The SfKanban control does not support the concept of SelectedItem like most other XAML controls that are bound to a collection. This presents a lot of problems for methods that need to act on a selected object.