- Mastering Windows Presentation Foundation
- Sheridan Yuen
- 210字
- 2021-06-24 16:49:01
Models
Unlike the other MVVM components, the Model constituent comprises of a number of elements. It encompasses the business data model along with its related validation logic and also the Data Access Layer (DAL), or data repositories, that provide the application with data access and persistence.
The data model represents the classes that hold the data in the application. They typically mirror the columns in the database more or less, although it is common that they are hierarchical in form, and so may require joins to be performed in the data source in order to fully populate them.
One alternative would be to design the data model classes to fit the requirements in the UI, but either way, the business logic or validation rules will typically reside in the same project as the data model.
The code that is used to interface with whatever data persistence technology is used in our application is also included within the Models component of the pattern. Care should be taken when it comes to organizing this component in the code base, as there are a number of issues to take into consideration. We'll investigate this further in a while, but for now, let's continue to find out more about the components in this pattern.
- Instant Testing with CasperJS
- Spring Boot開發(fā)與測(cè)試實(shí)戰(zhàn)
- MongoDB for Java Developers
- Learning Informatica PowerCenter 10.x(Second Edition)
- 匯編語言程序設(shè)計(jì)(第3版)
- Android開發(fā):從0到1 (清華開發(fā)者書庫)
- 并行編程方法與優(yōu)化實(shí)踐
- Mastering jQuery Mobile
- JSP程序設(shè)計(jì)與案例實(shí)戰(zhàn)(慕課版)
- QlikView Unlocked
- Drupal 8 Development Cookbook(Second Edition)
- 關(guān)系數(shù)據(jù)庫與SQL Server 2012(第3版)
- TypeScript High Performance
- Swift iOS Programming for Kids
- 微信小程序開發(fā)圖解案例教程:附精講視頻(第3版)