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

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.

主站蜘蛛池模板: 巫溪县| 汾西县| 平安县| 明溪县| 利川市| 昌宁县| 库车县| 邯郸市| 大洼县| 高唐县| 宁明县| 尖扎县| 博罗县| 连平县| 荔浦县| 罗山县| 高密市| 东阳市| 淮北市| 灵丘县| 比如县| 郧西县| 长治市| 德江县| 西峡县| 兴隆县| 旺苍县| 富宁县| 揭东县| 历史| 大关县| 扎兰屯市| 南郑县| 奉新县| 吉安县| 柞水县| 双鸭山市| 伽师县| 翼城县| 宜昌市| 绥阳县|