Thanks a lot for the suggestions. I tried them out to learn the methods. For
my project, I am going ahead with what Sky suggested. It's turning out much
better than my lazy XML Http requests :)
Thanks,

-neha
"nay-ha"

On Sun, Jul 12, 2009 at 10:41 AM, Sky <[email protected]> wrote:

>
> Given your description then to be honest I would agree you could do
> something better than XML HTTPrequest or Java RPC.
>
> But it seriously depends on how your app works and what your
> requirements are.
> What I would suggest is that you dump the data onto the page in the
> initial page request. Since the data rarely changes and IFF the client
> is unlikely to maintain a long session, then this might be a better
> approach. You would have to be ok with the fact that they won't get
> updated data until they hit the refresh button as opposed to clicking
> on the button leading to the "page" containing the 20 check boxes. If
> this is unacceptable and you require that when the user clicks on the
> menu button or w/e links them to that "page" will build the page
> afresh, then your current design is the only correct way (but as
> mentioned might be able to have improved performance via Java RPC)
>
> If its ok to just dump it to the initial page request, your server
> side code must simply modify the GWT html file, inserting the data as
> regular javascript, like an array of values or whatever it is.Your GWT
> code would need to interface to some handwritten Javascript that
> assumes the name of that javascript array exists and loads its
> contents. Pretty easy.
>
> hope this helps
>
> On Jul 10, 11:43 am, Kamal Chandana Mettananda <[email protected]>
> wrote:
> > Just to add to that; if you are using Java on your server side you may
> > be planning to use Servlets. If that's the case you can have a look at
> > the following tutorial.
> >
> > http://lkamal.blogspot.com/2008/09/java-gwt-servlets-web-app-tutorial...
> >
> > Cheers.
> >
> >
> >
> > On Fri, Jul 10, 2009 at 9:58 PM, Jim<[email protected]> wrote:
> >
> > > If you plan to use Java for your server side, you don't have to use
> > > XML http requests. You can use the built-in RPC to retrieve Java
> > > objects from server and send to GWT clients or vice versa. That is a
> > > big advantage to stick to Java in server side. You can find an example
> > > inhttp://www.gwtorm.com/gwtMail.jsp.
> >
> > > Jim
> > >http://www.gwtorm.com
> > >http://code.google.com/p/dreamsource-orm/
> >
> > > On Jul 10, 10:54 am, Neha Chachra <[email protected]> wrote:
> > >> Hi,
> >
> > >> I started using GWT only about a week ago and I have rather little
> > >> experience with client-server interactions so I wish to make sure that
> I am
> > >> headed in the right direction. Though, I am guessing that the question
> is
> > >> not directly related to GWT and I apologize for that.
> >
> > >> Basically, I am making a webpage. Depending on the data in SQL server,
> I
> > >> need to render widgets on the page. As a simple example, if there are
> 20
> > >> data items, then I need to make 20 check boxes with the labels as
> retrieved
> > >> from the server.
> >
> > >> The data on the server changes rather infrequently.
> >
> > >> While I am able to do this currently, I have a feeling it's not the
> best
> > >> approach to the problem. I am making XML Http requests to the server,
> and
> > >> then I parse the data and render the widgets accordingly on the fly.
> >
> > >> I am wondering if that's a good solution... I am confused because it
> feels
> > >> like I have the data already, then I should be able to avoid data
> requests
> > >> and the consequent delay in rendering. But with this approach, I can't
> think
> > >> of a way to update the webpage appropriately if the data in the SQL
> server
> > >> changes.
> >
> > >> Any opinions/suggestions?
> >
> > >> Thanks a lot,
> >
> > >> Neha
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to