views:

29

answers:

1

Hi, Rather than calling it a question, i would like to call it a discussion and the topic is Flex Remoting. Forms and blogs explaining remoting in flex always mention 2 things:

  1. service-config.xml
  2. endpoint url

Now what i want to know is that

1. is service-config file actually needed if we need to bind our front end (which is in flex / air) with some database (mySql for instance). Coz i've done a couple of projects in flex and air and didn't use this config file. I used Flex 3. Though i used this config file in the projects i did in earlier version of flex 2.0 .

2. What actually this endpoint url does; could someone please explain it.

The way i implement remoting is like this:

<mx:RemoteObject id="remoteObj" source="MyPHPCls" destination="AMFPHP" result="remoteResult(event)">

     <mx:method name="someServerSideMethod" result="onMethodResult(event)" />

</mx:RemoteObject>

Also if you could please tell me if the approach i am following to use remoting is incorrect.

Hope to hear from someone soon :).

Thnx, Jatin

+1  A: 

The services-config.xml data is compiled, or hard coded, into your application at compile time. You don't need to use a services-config.xml file if you don't want to; but if you want to use RemoteObject, that data will need to be available to your SWF somehow.

Here is a good blog post on setting the services-config file at runtime.

The end-point URL is just a URL to a Remoting Gateway.

www.Flextras.com