The Views service relies on view templates (segments of user interface and functional code) and code generators. The code generators take the code of the view template you select and filter and populate it based on information you provide. The resulting code is inserted in your app and becomes a fully functional application screen.
If the built-in view templates do not meet your development needs, you can customize the existing templates or create your own. You can later share the templates with your account, so that they become available across apps and among team members. By storing customizable and reusable user interfaces and functionality inside view templates, you can ease the development of apps which share one or more similar screens.
This article contains the following information:
- The Default View Templates
- Sample Cases for Custom View Templates
- Lifecycle of Custom View Templates
By default, the Views service provides the following templates:
|Empty view||Use this view when you want to quickly create your app structure and navigation, or when you want to later define custom content for the view with AppBuilder. If you need to, you can later change the view type to a predefined one.|
|Form view||Use this view to create forms in your app and collect data from users. You can easily add action buttons and various form elements to the view. You can enable data binding for this view.|
|Authentication view||Use this view to provide a mechanism for registration and authentication of users in your app. The logic behind these views is tied to the Backend Services user management and you do not need to write any additional code to implement registration and authentication.|
|Master Detail view||Use this view to present read-only or editable data records to users. You can enable user-side adding, editing and deleting of data entries. You can show data stored in Telerik Backend Services, Progress Data Service or Progress Sitefinity and enable various features to provide easier browsing of the data, like grouping, filtering, master-detail preview, etc.
You can link Master Detail views to represent related data.
|Map view||Use this view to present on a map read-only or editable location data records to users in the form of pointers on the map. You can enable user-side adding, editing and deleting of data entries. You can show data stored in Telerik Backend Services, Progress Data Service or Progress Sitefinity.
You cannot create custom templates from this default template.
|About view||Use this view to share information about you and your app. It will help you stay connected with your users using the different social network "Follow us" links and contact button.|
|Progress Sitefinity-based views||Use any of these views to create a Master Detail view bound to the selected static or dynamic content type. For example, a view bound to the News or Blogs in your Progress Sitefinity.
You cannot create custom templates from these default templates.
This feature is applicable only to hybrid apps.
You cannot directly customize any of these templates. You can base a custom template on the default templates by duplicating them.
You cannot create new view templates from the Progress Sitefinity-based view templates or from the Map template. If you want to use a Progress Sitefinity-based or a Map-based view template across your apps, see Create from View.
Any screen or functionality that you need to share between apps is a candidate for a view template.
For example, when you develop a series of similar apps, you might consider creating view templates for the following elements:
- Social login form
- Active Directory login form
- My Contacts screen
- Contact Us form
- Help and Support screen
- Feedback form
TIP: Carry out the development of your templates inside one Telerik Platform mobile app. Use this app only for template development and preview. This ensures easier and centralized maintenance.
When you develop custom view templates, you are likely to follow a process which resembles these steps:
Create the custom template.
The template is stored in the app that you initially used to create the template.
- (Optional) Modify the code of the hybrid or the NativeScript template.
You might need to modify the code of the template if the customizations provided by the Views service are not sufficient for your development needs. For example, you might need to apply widget configurations which are not exposed by the Views service.
- (Optional) Share the custom template to make it available across the account.
This will let other developers on your team use the template in their apps. They will also be able to modify the code of the template, if needed.
Use the custom template across apps.
Other developers or you can add new views using the template or use it to change the view type of empty views.
- Modify the shared custom template.
Update across apps.
After you update the source of the template, other developers who are using the template inside their apps will be prompted to update their views.
Delete or archive the custom template.
If you no longer need to use or maintain a template, you can delete or archive it. If shared, the template will still be available across apps that are using it but users will no longer be able to apply it in new apps.