RTC Forums

Subscription => Support => Topic started by: YuraZ on December 06, 2012, 10:40:47 AM



Title: Remote functions as web-requests
Post by: YuraZ on December 06, 2012, 10:40:47 AM
Hello, Danijel

I have a app-server with remote functions support. I need to create application at html5 (Html5 Builder) for connecting to my app-server and recieving data by request.
Can you advice me, how i can realize this with RTC? Do I need to use TRtcDataProvider as in lesson (http://realthinclient.com/flash/SrvLesson1.htm) or i can use realized remote functions?

Thanks!


Title: Re: Remote functions as web-requests
Post by: D.Tkalcec (RTC) on December 06, 2012, 12:12:52 PM
Because you will most likely need your data specially formatted for the Web, you should use a TRtcDataProvider component, which gives you full control over the complete request and response content. If the requests are in JSON or XML-RPC format, you can use the TRtcValue class for parsing incoming content and preparing outgoing content.

Best Regards,
Danijel Tkalcec


Title: Re: Remote functions as web-requests
Post by: YuraZ on December 06, 2012, 12:20:46 PM
Thanks, Danijel.
Could you help one more.
If name of remote function is 'TEST', and its parameters are 'login' and 'password', how i can call this function from web-request?


Title: Re: Remote functions as web-requests
Post by: D.Tkalcec (RTC) on December 06, 2012, 12:24:52 PM
There is no default way for calling functions from web clients. It depends on the implementation you are using on the Client. This is why I've said that you should use a TRtcDataProvider component and not remote functions. With the TRtcDataProvider component, you get the exact data you send to the Server from your web client, so the request and response processing is all up to you.

Best Regards,
Danijel Tkalcec


Title: Re: Remote functions as web-requests
Post by: YuraZ on December 06, 2012, 12:52:32 PM
Thanks, Danijel !