Distribution Methods
HTML5 Builder applications can be distributed from a web server, which users in the same network can access from a web browser, but they can also be distributed on the client side, packaged as a simple folder or as a mobile application.
Web Server
If you deploy your application to a web server, users can access it from a web browser by entering the network address of the server.
- See Server Deployment.
Compatibility Matrix | Interface Mechanism | |||
---|---|---|---|---|
Web Interface | Mobile Interface | |||
Web Navigation | AJAX Navigation | |||
Development Technologies | Client-side | |||
+ Server-side | ||||
+ Built-in AJAX |
Client-side Distribution
You can distribute your applications directly to your users, instead of making them access a web server to be able to use them.
When using a client-side distribution method for an application that uses server-side technologies deploy your application to a web server, and on the client side distribute a single HTML document redirecting to the first page on your server:
<!DOCTYPE html>
<html>
<head>
<title>My Application</title>
</head>
<body>
<script type="text/javascript">
window.location = "http://example.com/index.php";
</script>
</body>
</html>
If your application uses the built-in AJAX implementation, redirecting to the server is optional, but usually the safest approach.
Folder
Although it’s not a very common choice, it’s possible to deploy an application as a folder — or a file in certain cases. Users can then open the webpages inside the folder in a web browser.
- See Client Deployment.
Compatibility Matrix | Interface Mechanism | |||
---|---|---|---|---|
Web Interface | Mobile Interface | |||
Web Navigation | AJAX Navigation | |||
Development Technologies | Client-side | R | R | CORS + R |
D | D | D | ||
+ Server-side | D | D | D | |
+ Built-in AJAX | CORS + R | L | CORS + L | |
D | D | D |
- CORS: Requires cross-origin resource sharing to be enabled in the server. All major browsers support this in files distributed client-side, although Chrome must be executed with --allow-file-access-from-files.
- D: Deploy a redirection to the server instead of the application itself.
- L. When the page content changes through AJAX, MLink components get back from the server pointing to unitname.php instead of unitname.html. Use a different method for page navigation.
- R: On the deployed files, you need to replace the references to server-side pages (e.g. unit1.php) by references to the client-side version of those pages (e.g. unit1.html).
PhoneGap
You can also deploy your application as a native mobile application for several mobile platforms.
When using this distribution method, you may use mobile hardware components in your applications. They only work with PhoneGap, and won’t work in any other type of distribution method.
Also, you must name your first page index (index.php for server pages, index.js for client pages).
- See Mobile Deployment.
Compatibility Matrix | Interface Mechanism | |||
---|---|---|---|---|
Web Interface | Mobile Interface | |||
Web Navigation | AJAX Navigation | |||
Development Technologies | Client-side | R | ||
D | D | D | ||
+ Server-side | D | D | D | |
+ Built-in AJAX | CORS + R + X | |||
D | D | D |
- CORS: Requires cross-origin resource sharing to be enabled in the server.
- D: Deploy a redirection to the server instead of the application itself.
- R: On the deployed files, you need to replace the references to server-side pages (e.g. unit1.php) by references to the client-side version of those pages (e.g. unit1.html).
- X: The xajax folder, from the RPCL directory, must be included manually in the deployed RPCL copy.