returns JSON then that data is left as-is. If the data returned is something other than JSON then it is
converted into XML and then an XSL style sheet may be applied to build JSON. Finally, before
sending the result back to the client, the adapter can manipulate the final data.
Creating a new Adapter
When we design a new mobile application that wishes to interact with a back-end system, we will
create a new adapter to achieve that goal.
Within a Worklight project within Worklight Studio, we select New > Adapter:
When we create an adapter, we define which project it is going to be contained within, what type of
adapter it will be and the name of the adapter to be created.
The types of adapter available to us are:
• HTTP Adapter
• SQL Adapter
• JMS Adapter
• Cast Iron Adapter
This will create the adapter file system structure with the XML configuration file, JavaScript and
XSL which can then be modified for specific access to a back-end.
Page 70
Comentários a estes Manuais