The new SData Mobile Client is a client-side
each page, the entire application is downloaded, and then transactional data is
retrieved as necessary from an SData web service portal. In this blog post, I’m
going to point out a few things you should know about setting up your SData
data source, and how to configure the mobile client to use it.
If you’re working with the source code from github,
you should be aware of the two files in the environment folder, developer.js and default.js. This is where we configure the SData connection. The
developer.js file is used when you’re executing the “debug” version of the
application via index-dev.html. When
you “build” (minify) the application and run it via index.html, default.js is
used. By default, we have developer.js
pointing at an SData test server, while default.js
sets the server to “window.location.hostname” (the server where the mobile
client is installed).
If you want to work with an SData source other than our test server, you're going to need SalesLogix 7.5.3 HF3, which is about to go into Beta. This mobile client will not work with previous versions of the SalesLogix SData provider, as there have been some important modifications and API additions. For example, HF3 introduces UserOptions and Picklist system APIs.
recommended deployment approach is to stick with the out-of-the-box setting in default.js and install the mobile client
portal to the same server as your SData portal. Moving the SData host to
another server will introduce cross-origin requests from the client
application, which your browser won’t allow (without some fiddling).
If you really want to install your SData host on a separate
server, one way of handling this is to have a proxy on the web server hosting
the mobile application. We will be looking into possibly providing our own
proxy in the future. You can also install and configure something like ISAPI rewrite for this. Right now, the
approach that we’re using, and documenting on github, is to use CORS
(Cross-Origin Resource Sharing), with the help of ISAPI rewrite, to support
If you configure default.js
to point to another server for your deployed application, you’ll also need to
update index.manifest (in the root
folder for argos-saleslogix) and set NETWORK (at the end of the file) to the
URL of your SData server. This is required for CORS support.
There IS a non-production scenario where you might want to
use CORS. If you want to download the source for the mobile client from github
and develop on a machine other than the one your SData host resides on, you’ll
be making cross-origin requests.
The SData server that we have development.js pointing to has CORS installed on it, so that we can
use that server, but develop and test off of the local file system. Otherwise,
FireFox and Chrome will give you a “request aborted” message when you try to
log into the application. Safari, on the other hand, appears to allow the
external SData requests when you’re running the application off of the file
In conclusion, I'd like to once again stress that our recommended approach is to stick with the default settings and deploy the mobile client to the same server as the SData host. But it's still nice to know what's going on under the covers, and where to get to these settings.