In my role as Chief Data Evangelist for Progress Software, it’s important to promote best practices for data connectivity and integration patterns. In thinking about an architecture for building enterprise mobile applications at Progress Software, I made the recommendation to leverage OData for the connectivity.
Below is a tutorial on building an enterprise mobile application by leveraging end-to-end solutions in the OData.org ecosystem.
#Building Enterprise Mobile Applications using OData
From the OData ecosystem, we selected the [Telerik Platform for mobile application development] (http://www.telerik.com/platform#overview) and Progress DataDirect Cloud for the Greenfield Data Integration using OData.
Note: New in Telerik Platform Enterprise, DataDirect Cloud connectors are now integrated into a single platform. * Login to DataDirect Cloud by clicking on “Connect Data”.
- You will be redirected to DataDirect Cloud Dashboard. The first step here would be to create a Data Source definition. On the Dashboard, you can click on “Data Sources” tab to the left of Dashboard and then you would have to click on “Data Stores” on the Next Screen.
- You will be presented with list of cloud and on-premise data sources that are currently supported by DataDirect Cloud. For this tutorial I chose Salesforce.com as my cloud data source. For enterprise mobile applications, it’s common to select on-premise data sources such as Oracle or DB2 which can be accessed securely behind the corporate firewall.
- Once you select your data source, you will have to fill in details like Data Source Name, which can be any name you want, User Id and password for your Salesforce account and security token which can be obtained from your account settings in Salesforce.com. Once you have filled in those details, you can click on “Test Connection”. If it is successful, you will be notified and you can save the data source.
- Now we need to enable OData for the above source. Click on OData tab, beside the General tab of Datasource.
- On the OData tab, click Edit Configuration. You will be shown Configure Schema wizard where you can select the Schema and the tables that you want to expose through OData.
- Primary keys will be represented with golden key beside the primary key column. If there is no primary key, you would have to set the primary key manually and click on Save & Close once you are done.
- If OData configuration is done properly, you will have a green tick mark at the Datasource listing as shown below.
- The base access URI for accessing the data sources in DataDirect cloud will be https://service.datadirectcloud.com/api/odata/.
- For more on how to access the data using DataDirect Cloud’s OData API visit here. Next, Log in to your account at Telerik Mobile App Builder platform here
- Click on “Create App” to create a new application. On the next screen, select “Hybrid App” if you want to build the application for Android/Windows/iOS. Select start from a blank app as your starting point and fill in the application name and create the App.
- The platform includes an emulator that you could check app compatible across different operating systems. To do that click on Run on the top header of page and you will be shown the below options.
- The following are the screenshots of Hybrid app running on Android that I built to access the Data from any data source that is supported by DirectData Cloud using its OData API.
Sumit Sarkar, Chief Data Evangelist
Progress Software also serves on the OASIS OData Technical Committee and we’re interested in learning more about your experiences with OData for mobile development.
Special thanks to Saikrishna Teja Bobba, Developer Evangelist with Progress DataDirect, who helped put this tutorial together.