- 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.
- Mastering Concurrency Programming with Java 8
- Java加密與解密的藝術(第2版)
- Mastering Python Scripting for System Administrators
- UI智能化與前端智能化:工程技術、實現方法與編程思想
- 你不知道的JavaScript(中卷)
- Python Data Analysis Cookbook
- Getting Started with Greenplum for Big Data Analytics
- Active Directory with PowerShell
- Python從入門到精通(第3版)
- 零基礎學HTML+CSS第2版
- 征服C指針(第2版)
- JBoss AS 7 Development
- Mastering Clojure
- INSTANT EaselJS Starter
- SAP HANA Starter