There are many ways to connect a mobile app with a web site. Each technique has its own pros and cons. To cite an excellent book, Web API Design, by Brian Mulloy, is a modern source of current successfully approaches.
In the most common scenario, mobile apps for Joomla! open an AJAX connection to submit and retrieve information.
AJAX communication can implement a simple HTTP POST - GET API or any API based on JSON communication. Furthermore, this technique is heavily used in most extensions and web development. Due to all of these reasons, JoomGap SDK is sided on AJAX / JSON communication.
A mobile app, based on PhoneGap, is a native client accessing your site. As a consequence, it is not limited by Cross-origin restrictions.
On the other hand, your development browser is restricted as usual. Then, a solution for cross-development is desired. JoomGap SDK supports a basic REST (JSON) and JSONP protocol to ease the development in a desktop setup and support all possible use cases. More about CORS: Joomla and Cross-Origin Resource Sharing (CORS)
Concerning to JSONP: please, take into account that JSONP API has a different security profile than a standard JSON API. For more information: Security risks with JSONP?
Finally, there are other ways to enable external client access, but they require ad-hoc htaccess configuration and browser compatibility checks to disable security measures for each specific client.
PhoneGap apps have several alternative protocols to communicate. For instance, WebSockets or native sockets. However, these options are of limited usage in the general case of a Joomla! CMS running in a LAMP architecture.
We welcome feedback! Leave a comment by clicking the icon in upper right corner of the banner.
Copyright © 2007-2016 Extly Extensions - All Rights Reserved.
Joomla! name is used under a limited license from Open Source Matters in the United States and other countries. Extly.com is not affiliated with or endorsed by Open Source Matters or the Joomla! project.