官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 上杭县| 固阳县| 台南县| 龙泉市| 乐亭县| 百色市| 大石桥市| 邯郸县| 巴南区| 锡林郭勒盟| 宁晋县| 佛山市| 元朗区| 喀喇沁旗| 安乡县| 嘉黎县| 宜春市| 安岳县| 南丹县| 和硕县| 大宁县| 乌兰察布市| 长丰县| 进贤县| 来安县| 广丰县| 蛟河市| 宁武县| 洞口县| 邵阳县| 大名县| 汉阴县| 霍林郭勒市| 五常市| 西盟| 拉萨市| 保靖县| 依兰县| 昌都县| 阿荣旗| 罗定市|