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

Xamarin versus Xamarin.Forms

Xamarin, as a runtime and framework, provides developers with all the necessary tools to create cross-platform applications. In this quest, one of the key goals is to create a code base with a minimal amount of resources and time; another is to decrease the maintenance costs of the project. This is where Xamarin.Forms comes into the picture.

As we explained previously, by using the Xamarin classic approach, developers can create native applications. In this approach, we aren't really worried about creating a cross-platform application since we are creating an application, for all the target platforms using the same development tools and language. The shared components between the target platforms would, in this case, be limited to the business logic (that is, view-models) and the data access layer (models). However, in a modern mobile application, the actual business logic would have been migrated to a service-oriented implementation. The application is generally responsible for executing simple service calls through a gateway API facade on the bundle of downstream microservices, as shown in the following diagram:

In an infrastructure setup similar to this, where each client can benefit from a tailored mobile API gateway, the platform implementations diverge from each other, mostly because of the separate UI layer. Moreover, shared business logic and the data access layer cannot really increase the amount of shared code.

As a general rule of thumb, Xamarin classic applications are advised to be used with applications with key features that are dependent on the platform they are running on (peripheral APIs, intrinsic UI components, performance requirements, and so on). However, for a general purpose mobile application with a cloud-base service backend, it might be a better option to use Xamarin.Forms.

The Xamarin.Forms framework aims to standardize the UI implementation process while preserving the nativity of the application on multiple platforms. In essence, applications that are created with Xamarin.Forms are rendered with native UI elements from the target platform. As a matter of fact, once compiled and linked, a Xamarin application is not any different than a Xamarin.Forms application for any given target platform.

主站蜘蛛池模板: 常宁市| 东辽县| 宁晋县| 手机| 靖宇县| 安远县| 丹寨县| 惠水县| 玉溪市| 阿图什市| 宜兴市| 安达市| 焦作市| 禄丰县| 南华县| 蒙自县| 弥勒县| 邓州市| 卢湾区| 乌拉特后旗| 临澧县| 蓬溪县| 韶山市| 达拉特旗| 定兴县| 忻州市| 东阿县| 邢台县| 茂名市| 原平市| 茶陵县| 昌黎县| 剑阁县| 嫩江县| 镇平县| 庆城县| 夏津县| 格尔木市| 商河县| 长顺县| 永靖县|