Views
Basic UI building block
Overview
Views represents a piece of User interface , which has a well defined lifecycle.
Every app consists of Tasks, which organize the views in a user meaningful flow.
Each view is represented by:
view class
HTML layout
The view class defines the code to be executed during the view lifecycle.
The HTML layout defines what will be presented/rendered in front of the application user.
Example
So let's start by defining our goal:
we need to present a scrollable list of customers on the screen and allow the user to click over one of them.
Let's assume we are working on a mobile app - we will use mobile UI in this example ( the difference between a mobile and backend app is mostly in the HTML/CSS side).
So let's start with our view class, first.
So, we defined our view called CustomerListView. Our view is actually a simple class, which has a decorator @View. The @View decorator instructs Dynamics Mobile SDK that this class is a view. It means that this class may expose specific lifecycle methods. Let's keep it simple so far and just create our html content to define the UI.
Dynamics Mobile SDK comes with 2 embedded UI libraries:
Mobile Apps: Framework 7
Backend Apps: Bootstrap and Dynamics Mobile specific controls.
So, the UI of the application may have two different layouts, depending on the actual application type that we are building.
Last updated