The Xamarin architecture helps you develop cross-platform apps for Android, iOS, and Universal Windows desktop platforms with ease, because Xamarin uses a shared project concept where you can create a single app that can be deployed to all three platforms. It also provides complete access to the underlying platform APIs and fast processing using the underlying native code of the deployed platform. To assist with developing a Xamarin app, ePortal integrates automatic REST API Client generation and scaffolding of the elements defined in the ePortal Data Source project. The following figure shows major components of the ePortal Xamarin architecture:
The following table describes the components shown in Components of ePortal Xamarin Architecture.
Component | Description |
ePortal Web API Application | An ePortal Web API exposes a RESTful interface for applications running on ClearPath and AB Suite Windows Runtime back-end servers.
Note: To facilitate the generation of Views and ViewModels, some custom schema filters are included in ePortal Web API project. These filters serve to include vendor extensions into the OpenAPI Specification for scaffolding Views and ViewModels. |
REST API Client | The Xamarin project contains an ePortal menu extension that is used to generate a REST API Client for the project. The Swagger definitions from the ePortal Web API are used to generate the client proxy and the associated data models. |
Data Models | The generated data models map to the operations exposed by the Web API endpoint. Data models contain the request and response fields needed to perform requests to the Web API and receive responses. AutoRest is used to generate the Data models from the OpenAPI definition. |
NuGet Package | This is a dependency for the ePortal Xamarin project. You must install the NuGet packages after creating the Xamarin project. After installing the appropriate NuGet packages, the T4 files and other helper files are available. |
T4 Templates (Text Template Transformation Toolkit) | These templates define the structure of the Views and ViewModels for the Xamarin project. The properties of the data models and the Swagger document are used by the templates to scaffold individual Views and ViewModels for each operation of the Web API. |