Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Using XML or JSONP Datasource

    Hi,

    I am trying to figure out how XML and JSONP datasources work and how their data can be read/written from/to database.

    Any help is appreciated.

    Thank you

    #2
    Your questions is too fuzzy and broad IMHO but...

    The only reason to use XJOSNDataSource is if you want to access a REST service that is not in the same webapp as your client.

    You use RESTDataSource if your server is in same webapp as your client and has been implemented to accept requests and send response in a certained prescribed way described in docs.

    You use DataSource if you want maximum flexibility and your server is in same webapp as your client. It can support custom requests / responses and the DSDataFormat can be XML or JSON (depending on what your server supports.

    I have found DataSource to be what I ended up using. I use it with customised OperationBindings so that I can support the four CRUD operations on different URLs and different DSProtocols.

    I have found JSON format to be more flexible and easier. Though XML format is supported, I gave up on it after encountering some issues I could not solve.

    Database access is up to your server. The SmartGWT Enterprise edition supports server side database access but I have not used it. SmartGWT Enterprise edition is not free like plain SmartGWT.

    HTH.

    Comment


      #3
      Hi farrukh,

      Thanks for your reply.

      In my application, I was using plain GWT-RPC.

      If I want to use smartgwt but without changing my server side code, can I use the smartgwt datasource you described?

      Should I move to use REST or JSON?

      Note that I use tomcat to run my application.

      Comment


        #4
        For GWT-RPC please see sticky post:

        <http://forums.smartclient.com/showthread.php?t=4814&highlight=GWT-RPC>

        Please use search feature of forum before posting questions to reduce load on dev team. Thanks.

        Comment

        Working...
        X