About application URLs
This section describes the main URL schemes for launching and connecting client applications.
It also lists the parameters that can be included in the launch URL, and the situations where they are needed.
|URLs must be encoded and compliant with RFC-3986. Invalid characters could prevent the service from starting or cause other unexpected results.|
There are two basic URL schemes for launching PureWeb applications:
The app scheme is used by mobile clients, while the view scheme is used by HTML5 clients.
In an HTML5 client, the client-side connect method actually converts the "view" scheme to an "app" scheme under the hood. You could, technically, launch the client by using the "app" scheme directly, but this is not recommended because of how it impacts application life cycle.
This is because an app URL would launch the service application immediately upon receiving the request, then deliver the client files to the client web browser, whereas a view URL will deliver the client files first, and only when the connect method is called in the client code will the service application be launched. Having client browsers receive the assets prior to connecting can create more flexible client life cycle scenarios.
Because mobile apps are already installed on the user device, they do not need the view scheme.
It is also possible to use a launch URL which does not conform to either of these schemes. In this case, you must explicitly convert the URL to the " app" scheme before passing it to the connect method.
Here is a list of supported parameters that you can use in the launch URL:
- name is the name of the service application. This name must match the name that you provide in the application's plug-in file. Although it does not strictly have to match the name of the application that you provided when you initialized the StateManager object in your service, it's a good idea to be consistent across the board.
- client is a parameter which is mandatory for client applications that are not native apps of mobile devices. Accepted values are flex and html5. For native mobile apps (Android, iOS), simply omit the parameter.
- The _diagnostics parameter is optional, and only applicable to client applications that are not native apps of mobile devices. If specified with the value true, the client will open with the Diagnostics Panel enabled. This panel is useful during client development, but you would typically not include it in a production application.
- The unmanaged=true parameter is mandatory if connecting to an unmanaged service. For managed services, you can simply omit this parameter altogether.