2 Replies Latest reply on Nov 2, 2007 3:11 PM by Mete Atamel

    Diff b/w RPC and DataServices when calling Java

      Hi All,

      I have read a little about Flex and Java , and need further reading and practice to grab all the stuff need to develop a simple app.

      I have a doubt regarding the ways we can interact with Java Objects.

      The Remote Procedure Call is made to a java object after we configure the java class in remoting-config.xml

      The same with DataManagment, we configure the Java Object in data-management-config.xml

      Whats the main diff between these procedures ?

      How can i judge myself to use either of these to invoke Java Object .

      I am planning to do a sample app..so which way to go....

      I have gone through the 30min Flex java fds-tomcat realease , but couldnt find that much useful to know the basic things like how to configure and what to do for developing a simple app like create an employee, edit his details and delete the employee..

      Can anyone passover a sample app that was developed by u while u were learning Flex with Java....?

      Kindly suggest regarding this aspect...

      Madan N
        • 1. Diff b/w RPC and DataServices when calling Java
          Hi! I will try my best to answer you correctly.

          RemoteObject permit you to instanciate object and call method to perform action on the database. From here it's very easy to understand the mechanism.

          DataService permit you to set up a proxy, with Java or ColdFusion, to manage the transaction with the Database and push all changes to database on each instance of the application running in real time.

          You follow me?

          By example:
          In a CRM application if your manager update a client profile behind you're in the account, you will not have to refresh the page to see the data updated. The page will get updated by the DataService proxy.

          That's very usefull when developping application that scope to a lot people at the same time.
          That reduce traffic on the network for AJAX base application, because there's no page of the application who perform timer base request to query for new data, they still wait for the proxy to update them.
          Everybody get new data at the same if they're on the DB row.
          And finally, it's very easy the devellop.

          I wish that's help you and sorry for my english.
          • 2. Re: Diff b/w RPC and DataServices when calling Java
            Mete Atamel Level 1
            RemoteObject simply enables your Flex client application to call methods on your Java class on the server. It's very simple to use and configure and there's no magic behind it. You make the call from Flex, it goes to the server, LCDS makes the call to the Java class, gets the result and returns it back to your Flex client. That's it.

            DataService on the other is much more sophisticated. It lets you expose your DB to Flex clients through Java objects and Assemblers (that you have to write yourself) on the server and Actionscript objects on the client. It also maintains the list of Flex clients looking at the data, keeps those clients in sync, make sure an update from one client goes to the other and so on. It basically enables you to write sophisticated multi client applications.