Leveraging OData annotations to build a CRUD native mobile app in minutes
I finally got around to testing out the new OData annotations feature in the Mobile Development Kit. It is pretty awesome! Yes, I am biased. I was able to create a fully functional CRUD native mobile application for iOS and Android devices in a few minutes. When I say a few minutes, I mean 5 minutes. Don’t believe me? Well, I created a video to prove it.
Mobile development kit (MDK) is a feature of SAP Cloud Platform Mobile Services. If this is your first introduction to the mobile development kit, I suggest you first review the Learning Map which provides overview topics, blogs, videos, and tutorials.
If you are a Fiori app designer, you are probably already familiar with OData annotations and smart templates. If not, let me give you a brief description.
SAP Fiori elements provide designs for UI patterns and predefined templates for common application use cases. App developers can use SAP Fiori elements to create SAP Fiori applications based on OData services and annotations. With little or no coding, you can create SAP Fiori applications. UI5 has a Web solution, named smart templates, that builds a starter application by parsing the annotations in your OData service.
Mobile Development Kit 3.0 brings these capabilities to your native mobile applications. For this release, the editor supports generating List/Detail pages based on annotations. List / Detail pages are similar to a Master / Detail page, but it is two pages instead of one. The Mobile Development Kit editor parses existing annotations to give you a huge leap forward in your native mobile application.
Key features include
- Generate all pages for a CRUD application for each entity selected in the wizard
- List page
- Detail page
- Filter page
- Create page
- Update page
- Generate all actions required to support CRUD operations in pages for each entity selected.
- Page Navigation actions
- CreateEntity actions
- UpdateEntity actions
- DeleteEntity actions
- ChangeSet actions
- Additional Close Page actions
- Success Message actions
- Failure Message actions
- Generate rules to support the actions
Pages, actions and rules created are a starting point. You can edit those pages and make it your own. At this point the MDK editor is no longer reading the annotations from OData.
Note: If the OData designer updates the backend services data schema (annotations), the MDK pages will stay as originally created. It will not automatically update the pages or overwrite your changes. You are “disconnected” from the annotations at this point.
For the List page, MDK supports the List Report. To create a Detail page, MDK requires ‘UI.LineItem’ and ‘UI.HeaderInfo’ in the annotation file. For more information, check out the MDK help portal.
+++ Update: Check out this tutorial: https://developers.sap.com/tutorials/cp-mobile-dev-kit-annotations.html +++
You can also check out more information on the Fiori elements list report and smart templates.
Great blog Sue!!
Where can I get the MDK Android Client so that I can experiment
Ah good question.
The MDK Android client is available for Early Adopter Care customers and partners right now.
And the end of this blog, there is a link to Apply to the program.
Thanks for the reply Sue.
BTW when can we expect the GA release of Android MDK Client?
I used the mobile services sample service (EntitySet = Products) too, but for me not all the MDK objects (Actions, rules, etc.) were created. It would be helpfull, if you share your annotations file. I think I made some mistakes there.
Here is the tutorial covering similar content with up-to-date information: https://developers.sap.com/tutorials/cp-mobile-dev-kit-annotations.html