Developer Guide
[ 8 ] - Packaging and Deployment
< Back[ 8.1 ] - Packaging Objects
An extension's object model (i.e. the collection of all its objects) is able to be divided into any number of parts. Each part of the framework containing groupings of objects which are stored in separate XML files referred to as application files. How the objects are grouped or their sequence within the group is not significant. The physical location of these application files is also not significant with the files able to distributed locally and or remotely across a network.
Being able to divide an extensions object model up in this way provides a number of advantages including:
- Increased reuse with one object declaration able to be used by multiple extension.
- The ability for different individuals/organisations to contribute objects as part of a single extension.
As an example object models A, B and C, shown below are equivalent to each other. Declaration C is comprised of parts C0, C1, C2 and C3 stored in separate applicaiton files on different web servers.
| Object Model - A (File_A.xml) |
| Object Model - B (File_B.xml) |
| Object Model - C |
| Object Model - Part C0 (http://www.webserver0.com/File-C0.xml) |
| Object Model - Part C1 (http://www.webserver1.com/File-C1.xml) |
| Object Model - Part C2(http://www.webserver2.com/File-C2.xml) |
| Object Model - Part C3 (http://www.webserver3.com/File-C3.xml) |
Object Model C shows how an extension objects can be dividing into different files located on different web servers. But how do we know what these applications files are and where they are located when its time to create the application? This problem is solved by the package object. The package object contains general information about the application as well as a registry of URL addresses to the application files which comprise its framework. As an example an abbreviated package object for Object Model C is shown below. Details of the package object declaration are available here.
| Object Model - Part C0 (http://www.webserver0.com/File-C0.xml) |
The end user still needs a link to the package object in order to Run the extension. This link is referred to as a package link. A package link is just a normal anchor HTML element with href attribute being the URL of the application file which contains the package object. For example the package link for the Object Model C is as follow:
[ 8.2 ] - Deployment - Remotely
Deploying the extension involves uploading these files to the relevant web servers.
Let's look at the Hello World as an example of deploying a Meta extension. The Hello World package object declaration as well as the files and the directory structure used by the application are shown below.
| Hello World - Package Object (http://www.appxweb.com/developer/examples/hello_world/package.xml) |

Deploying the Hello World involves uploading the above files to the application directory "http://www.appxweb.com/developer/examples/hello_world" consistent with the package object declaration. The corresponding package link for the application is shown.

Note the use of the <root> element within the Hello World package declaration above. The <root> element provides an absolute address, ending with a forward slash, to the parent directory used by the extension. Any relative URLs of files declared subsequently are appended to the root URL to determine the absolute URL of the file. For example the absolute path of the file containing the Hello World application objects is "http://www.appxweb.com/developer/examples/hello_world/applications.html".
Hello World - Mixed Up Version Example
As proof that how Objects are packaged and deployed is insignificant, the package link and source code for a mixed up version of Hello World application is below. Run this version of the Hello World application and view its source to see this in action.
Package Link
Download Source
[ 8.3 ] - Deployment - Locally
The examples above have been based on the application be deployed remotely. Meta applications can also be deployed locally. To do this the extension files are copied to a local/system file directory. This directory location needs to be reflected in application package's link, the root elements of the application package file and any absolute URLs that are used. Within the object declarations the directory path needs to be specified in URI format. The <root> element values ending with a forward slash. To convert a windows directory path into URI format 1) precede the path with file:/// 2) change all back slashes to forward slashes and 3) replace spaces with %20.
As an example of deploying a extension locally let assume that you have downloaded the Hello World extension and copied the files to the following directory location "C:\Meta Applications". In order to Run this application from this local directory the package object declaration and package link would need to be changed as show below. Note the all application source code downloads include a Run.html file, which provides a package link which able to be modified.
| Hello World - Package Object (C:\Meta Applications\hello_world\package.xml) |

top