问题
I am creating a Cross platform application using Kony Studio. We are having our backend and web services ready.
Can we consume same services with out accessing Kony middleware?
If yes, can you please help with some sample code and tutorials.
回答1:
We can call consume the services without using the middleware using the HTTPRequest API
var request = new kony.net.HttpRequest();
request.onReadyStateChange = callbackHandler1;
request.open(constants.HTTP_METHOD_GET, service_url);
request.send();
You will get the result in the call. Go through the documentation for complete details.
回答2:
To consume web service directly from Kony without using middleware, web service response should be in json. Otherwise, it should go through middleware.
回答3:
To consume the service otherwise you will have to go for an FFI implementation. This will lead to separate implementations for the different platforms that you are targeting. Therefore you should use the Kony middleware.
来源:https://stackoverflow.com/questions/16850234/is-it-mandatory-to-use-kony-middleware-for-kony-application