- 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.
- Learn ECMAScript(Second Edition)
- Kibana Essentials
- Vue.js 2 and Bootstrap 4 Web Development
- PHP 7底層設(shè)計與源碼實現(xiàn)
- MATLAB應(yīng)用與實驗教程
- 基于Swift語言的iOS App 商業(yè)實戰(zhàn)教程
- Learning ArcGIS for Desktop
- 深入淺出React和Redux
- 從程序員角度學(xué)習(xí)數(shù)據(jù)庫技術(shù)(藍橋杯軟件大賽培訓(xùn)教材-Java方向)
- ASP.NET Web API Security Essentials
- Tableau Desktop可視化高級應(yīng)用
- Android Studio開發(fā)實戰(zhàn):從零基礎(chǔ)到App上線 (移動開發(fā)叢書)
- 大學(xué)計算機基礎(chǔ)實訓(xùn)教程
- Visual Basic程序設(shè)計實驗指導(dǎo)及考試指南
- C語言程序設(shè)計