How to Change the Default Data Service URL in XAF Mobile Applications at Runtime

We've created a KB article that describes how you can extend your XAF mobile application so that can change the application's Data Service dynamically after logon:

https://www.devexpress.com/go/XAF_Try_Mobile_DataServiceUrlSelection_v17.1_August.aspx

This information will be helpful to those who need to supply the same application to different customers (companies). Company data should be stored separately in different databases. The database (or, to be more precise, the Data Service connected to it) should be selected in one of the following ways: 
- The user enters his or her credentials, and the application's Data Service is changed dynamically based on the logged in user.
- The user specifies his or her Data Service manually in the logon screen.

It's possible that we'll extend this feature so that you'll not need to maintain separate data services for each company (a different database will be chosen dynamically), but first, we would love to learn whether the current implementation covers your specific use-case scenarios.


Your feedback is needed!
This is not an official feature of our Mobile UI (CTP) and our API may change in future release cycles. We are publishing this article prior to the 17.2 release to collect early user feedback and improve overall functionality. We would appreciate your thoughts on this feature once you've had the opportunity to review it. Please report any issues, missing capabilities or suggestions in separate tickets in our Support Center. Thanks for your help in advance!

Test XAF's newest features prior to the 17.2 release!

We want to hear what you think - please don't forget to check out my other blog posts on upcoming XAF features...
    Performance improvements (Core)
    OAuth2 authentication (Web)
    Barcode scanner (Mobile)
    Push Notifications (Mobile)
    Background Geolocation (Mobile)
7 comment(s)
Martin Praxmarer - DevExpress MVP

Nice one - thx Guys :)

25 August, 2017
Martin Brekhof 2

I would like to see option 1 (user enters credentials and nothing more) possible.

For the rest as Martin says :-)

26 August, 2017
Genesis Supsup (QuickZ)

+1 also for "user enters credentials and nothing more"

26 August, 2017
Evgeniy Meyke

Nice work!

I would need to switch the connection string from within the data service :)

Evgeniy

26 August, 2017
Jignesh Thakkar 2

great!

29 August, 2017
Dennis (DevExpress Support)

@All: Thanks for testing this solution in your projects.

@Martin, Genesis Supsup: Did you mean not deploying separate data services targeting each company database, as Evgeniy noted? In either case, please clarify your real problems with the current approach. Thanks in advance.

29 August, 2017
Geoffrey Jones

Thanks very much for developing this new feature - it is great!

The second option: "The user specifies his or her Data Service manually in the logon screen" covers our scenario best. We are a line-of-business SaaS provider with a 1 database per client model. We would provide a user-friendly URL for each client which points to the appropriate data service for their database.

A quick question... Would it be possible to persist the URL, username and password so that the user does not have to enter these every time they use the app?

Thanks!

18 September, 2017

Please login or register to post comments.