- Xamarin 4 By Example
- Matteo Bortolu Engin Polat
- 197字
- 2021-07-14 10:19:43
Chapter 2. Sharing Code between Platforms
As we mentioned in the previous chapter, in mobile development there are features that we can share between platforms and features that need to be platform specific.
In this chapter we will explore all the ways we have in Xamarin to share code between platforms.
We will understand and develop a cross-platform pattern called Model-View-View-Model (MVVM) that helps us to separate the business and presentation logic of our application from its user interface. We will use this paradigm in the rest of the book.
Note
The business logic is the part of a program that determines how data can be displayed, stored, created and changed.
The presentation logic is the part of the program that describes how and when business objects are displayed.
MVVM will help us to make our application easier to test, maintain and evolve. It also improves the amount of code we can share between platforms.
It is important to understand that MVVM and separated logics is not the only way to share the code between different platforms. That's the reason why we are going to have a quick overview of the other possibilities we have.
- DevOps:軟件架構(gòu)師行動(dòng)指南
- 嵌入式軟件系統(tǒng)測(cè)試:基于形式化方法的自動(dòng)化測(cè)試解決方案
- 自己動(dòng)手寫搜索引擎
- 我的第一本算法書
- 精通搜索分析
- Learning Informatica PowerCenter 10.x(Second Edition)
- Spring Cloud、Nginx高并發(fā)核心編程
- QGIS By Example
- 程序設(shè)計(jì)基礎(chǔ)教程:C語(yǔ)言
- C#程序設(shè)計(jì)教程(第3版)
- App Inventor少兒趣味編程動(dòng)手做
- Python+Office:輕松實(shí)現(xiàn)Python辦公自動(dòng)化
- Mapping with ArcGIS Pro
- iOS Development with Xamarin Cookbook
- 大話代碼架構(gòu):項(xiàng)目實(shí)戰(zhàn)版