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

Xamarin application anatomy

When developing a Xamarin.Forms application, the essentials of the application includes the target platform projects – which act as a harness to initialize the Xamarin.Forms framework and application, as well as the native rendering or API implementations – and a platform-agnostic project that contains the Xamarin.Forms views, as well as the abstractions, so that the custom components can be implemented on platform-specific projects.

As the project grows in size, developers will need to create a separate project that would only contain the view-model and platform-agnostic services implementation. In this case, the project would become the main target of the unit testing process, since this layer does not depend on the UI elements or platform services directly. Additionally, a separate project can be used to share data transfer object (DTO) models between the services layer and the client applications. In a setup like this, the overall architectural layout will look similar to the following:

In some implementations where platform-specific APIs need to be tested, platform-specific unit tests are used, which are executed on the target platform rather than the development platform itself.

主站蜘蛛池模板: 灵石县| 桂东县| 鲁甸县| 大理市| 集贤县| 宁阳县| 牙克石市| 旬邑县| 进贤县| 阿勒泰市| 和林格尔县| 榆树市| 滦平县| 聊城市| 阿图什市| 贵溪市| 禄丰县| 昌都县| 辽宁省| 三江| 太谷县| 北宁市| 沭阳县| 肥城市| 奉贤区| 泗阳县| 晋中市| 博湖县| 房产| 姚安县| 平阴县| 海安县| 沈阳市| 旬邑县| 吉林省| 北宁市| 柯坪县| 南岸区| 简阳市| 抚顺县| 临高县|