]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | # Sencha Touch AMF\r |
2 | \r | |
3 | Sencha Touch AMF is an implementation of the [Action Message Format](http://en.wikipedia.org/wiki/Action_Message_Format) (AMF and AMFX) protocols for use with the Sencha Touch Ext.direct class. AMF \r | |
4 | is a compact binary format used by Adobe Flash/Flex to serialize ActionScript\r | |
5 | object graphs. AMF is typically used to encode messages that are sent between\r | |
6 | an Adobe Flash client and a remote service. AMF is only a serialization\r | |
7 | technology, not a transport, so AMF encoded binary data can be used with any\r | |
8 | transport such as HTTP or HTTPS.\r | |
9 | \r | |
10 | You can use the AmfRemotingProvider to make remote method invocation (RMI) calls \r | |
11 | to a server, or as a way to provide APIs for a Direct Store to connect a data \r | |
12 | source to a ListView or DataView.\r | |
13 | \r | |
14 | For more information, please see the documentation for `Ext.direct.AmfRemotingProvider`.\r | |
15 | \r | |
16 | **Note:** Sencha AMF is only distributed as part of [Sencha Touch Bundle](http://www.sencha.com/products/touch-bundle/) and [Sencha Complete](http://www.sencha.com/products/complete).\r | |
17 | \r | |
18 | ## Requiring AMF\r | |
19 | \r | |
20 | The AMF class is not part of the core Sencha Touch framework, rather it is distributed as a package. As such, AMF is not immediately available for use within your Touch application and needs to be added as a required package. \r | |
21 | \r | |
22 | Requiring the AMF package is a simple 3-step procedure\r | |
23 | \r | |
24 | 1. Edit your application's **app.json** file and add the `amf` package to the requires section:\r | |
25 | \r | |
26 | <code>\r | |
27 | requires: [ 'amf' ]\r | |
28 | </code>\r | |
29 | \r | |
30 | 2. If not already present, add the following property to the file **.sencha/app/sencha.cfg**:\r | |
31 | \r | |
32 | <code>\r | |
33 | framework.packages.dir=${framework.dir}/packages\r | |
34 | </code>\r | |
35 | \r | |
36 | 3. Refresh your application:\r | |
37 | \r | |
38 | sencha app refresh \r | |
39 | \r | |
40 | The AMF classes are now available for use within your application.\r | |
41 | \r |