• Welcome to KonaKart Community Forum. Please login or sign up.
 
March 28, 2024, 07:09:37 pm

REST API

Started by mohit.bhonde, November 13, 2015, 10:03:46 am

Previous topic - Next topic

mohit.bhonde

Hello all,

I see that the konakart documentation is currently favoring SOAP and it does have a JSON api too. Just making a JSON however does not make it REST web service right? Why is SOAP preferred by konakart over REST? Are there plans for konakart to expose RESTful web services in the future?

Best regards,
Mohit

julie

The nice feature of our APIs (Java, SOAP, JSON, RMI) is that they are all the same ... i.e. The API calls are identical for all flavours and they cover all KonaKart functionality which means that you can do everything using the APIs.

If you are calling the APIs in a Java environment then you don't even need to concern yourself about the the protocol being used. What I mean is that you instantiate  the correct Java engine

# For the default engine use:         com.konakart.app.KKEng
# For the custom engine use:          com.konakart.app.KKCustomEng
# For the web services engine use:    com.konakart.app.KKWSEng
# For the RMI services engine use:    com.konakart.rmi.KKRMIEng
# For the JSON services engine use:   com.konakart.json.KKJSONEng


and it looks after the communication using JSON, SOAP etc. All of these engines adhere to the same interface so you can swap between say JSON and SOAP without changing any of your client code.  You can achieve this using our storefront application just by defining which engine you want to use in konakart_app.properties.


mohit.bhonde

I am trying to add my kart to the mobile app client (iOS and Android) and not any java client. What is the advisable way for that?
I fear that the SOAP services being synchronous in nature might run on main threads and cause the experience on the mobile app to suffer.

I appreciate any further response or thoughts on same

julie

I recommend the JSON APIs for that. All of our widgets use JSON over AJAX... actually JSONP to avoid cross-domain restrictions.

mohit.bhonde

Thank you Julie!

Are there plans in future to provide RESTful services?

julie

As you use KonaKart and build your first store you learn about which APIs are available and how to use them. It wouldn't make any sense for us to force a developer to learn a new API just because he wants to use JSON. You can use asynchronous JSON (i.e. sending a JSON string over HTTP) without having to go through the learning curve of a different API that covers the same functionality.