Best API Method for Mobile Apps in Magento 1.8 and 1.9

apiappmagento-1.8magento-1.9mobile

I want to create iOS and Android apps for my Magento store.

For this purpose I want to know which API method is best as app data API.

Please suggest below of option of Magento:

I have read Alan Storm's answer. As per his suggestion my third option is best.

But I want to know which process for best for below condition:

  1. Authentication
  2. Faster Data fetch
  3. Faster development

Please help me. Describe briefly

Best Answer

REST API

Reasons:

  • it is much easier to implement than SOAP as PHP notoriously does not always follow the same standards as - for instance - Microsoft products do. Also, dealing with SOAP implies dealing with XML, namespaces and WSDL. Of course it will work, if done properly, but the cost of developing this for iOS would be greater;
  • SOAP is based on XML, and requires downloading (and perhaps caching) of a service definition file (also XML), and XML is mostly more verbose and therefore more bandwidth-consuming than REST data encoding, not to mention memory usage for parsing (if you use DOM parsers), decoding and in-memory object-based tree-like document representation. REST, at the other hand, is much less bandwidth and memory consumptive, which makes it more suitable for mobile devices;
  • JSON would be great, but that would require for you to implement a whole new API interface at Magento side, which may have consequences with regards to Magento security as well, not to mention the complexity of it overall.

I would suggest to use the native Magento REST-based API, and eventually plug in it your custom services. This would be a more reliable (REST API is supported by Magento, it's tested by a wider range of customers, and Magento provides some updates - as security updates - for it along with releases) and cost-effective solution.

Good luck!

Related Topic