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

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.

主站蜘蛛池模板: 宽甸| 龙陵县| 百色市| 出国| 榆林市| 宾川县| 辉县市| 石台县| 泾源县| 遂川县| 泊头市| 民勤县| 阳朔县| 天台县| 洛浦县| 郎溪县| 江油市| 新巴尔虎右旗| 新沂市| 浦江县| 五指山市| 余江县| 廉江市| 扎囊县| 台中市| 陈巴尔虎旗| 化州市| 博罗县| 禹城市| 松溪县| 辽阳县| 阿拉善右旗| 衡山县| 灵台县| 乐清市| 威海市| 林州市| 乌兰察布市| 抚宁县| 吐鲁番市| 平罗县|