The client-side of the App is implemented in JavaScript. It runs on the user's device. You can use any JavaScript framework to implement the client. For example, Sencha Touch 2, Enyo JS, and so on.
General considerations:
- Each App instance resides in its own HTML IFrame.
- The HP Anywhere client application and its Apps communicate in JavaScript.
- The App must declare the its dependencies and resources in the App Descriptor File. The components that the App declares are downloaded to the user device by the HP Anywhere Framework. To improve performance, compile all your JavaScript and CSS resource files into a single minified resource.
- In addition to downloading the resources that App declares, the HP Anywhere Framework injects an API that the App can use. For details, see the Client JavaScript Reference.
Requirements
- Implement the top-level function,
openEntryPoint(entryPoint, params, cb, scope). The HP Anywhere Framework invokes this function, passing at least an entrypoint name. The Framework may also pass the optional parameters.
A typical implementation of this function includes a switch case on the given entry point. The switch statement the App's code according to the parameters defined.
- The HP Anywhere Framework expects entry point,
OpenEntryPoint, to be supported by the App. This is the default entry point after initializing the context object.
- After the client loads, it calls
HPA.Interop.SetReady (True) to notify the HP Anywhere Framework that it is ready.