The Component REST AppBlock allows you to create pages in your app that use data from your REST database. This article assumes you are familiar with the various Page Layout Types.
Each page will have its own REST call, a URL that returns data when executed. That data can then be used when executing the next URL, as you will see in the following example.
For this example, let's say we are a hospital and we want to give our mobile app users the ability to find information about a specific doctor. The user should first see a list of specialties (Cardiology, Oncology, etc) - that is the first page. The user can tap on a specialty and then see a list of all doctors in that specialty - that is the second page. Finally, the user can tap a doctor and then see more detailed information about that doctor - that is the third page.
Each page will need its own REST call. Let's assume we have a REST database with all the necessary data, and that we also have the following REST calls:
https://hospitaldomain.com/rest/specialties
https://hospitaldomain.com/rest/doctors/specialty_id={specialty_id}
https://hospitaldomain.com/rest/doctors/doctor_id={doctor)id}
When the app user goes to the specialties page, the app will execute this URL:
https://hospitaldomains.com/rest/specialties
https://hospitaldomain.com/rest/doctors/specialty_id=12
Let's take a look at how you would create this app in the MobileSmith platform.
Now you are ready to connect all the pages.
Now let's take a look at what happens on the user's phone:
|