Skip to main content

Home/ GWT - MVP/ Group items tagged mvp

Rss Feed Group items tagged

Esfand S

Presenter First - 0 views

shared by Esfand S on 13 May 10 - Cached
Esfand S

Ray Ryan, best practices and embracing asynchronicity - Google Web Toolkit | Google Groups - 0 views

  • go with the asynch flow
  • object graphs should be avoided and domain objects should really just contain ids of their related objects. In the case of lists, this is to avoid sending too much useless info over the wire.
Esfand S

Ray Ryan, best practices and embracing asynchronicity - Google Web Toolkit | Google Groups - 0 views

  • Doing this well depends on some form of centralized data retrieve dispatch/caching.  You make calls to this centralized service to get the objects by id that you are interested in.   It either finds them in cache and can return them immediately, or adds them to a queue of objects to retrieve.  After all requests have been made (ie on DeferredCommand), a single request is sent to retrieve all objects of all types needed.
  • You could use an event bus to indicate all the objects where data is now available. This could even be a single event instead of one for each object, and the event handlers can ask if their objects of interest are now available, avoiding multiple updates.
Esfand S

Ray Ryan, best practices and embracing asynchronicity - Google Web Toolkit | Google Groups - 0 views

  • there is a clear distinction between *what the browser needs* (DTO) and *what the business needs* (domain objects). When you send JDO objects across the wire, you are sending your domain model. Its not what the browser wants, and that is a problem. Soon, you will have a presentational information in your domain model, and you will have restricted information being sent to the browser, and it will be a big mess. So, take a step back, and separate Domain objects from Presentation objects (or DTOs). Make your RPCs revolve around a particular view, and send all necessary information for that view in one RPC call. Note that now your Person would include company name and company id, but not the entire company object. Now, when the user clicks the company in the view, you make a RPC call to get company information (because you have company id). That's it. Works nicely, without having to make multiple calls.
« First ‹ Previous 161 - 180 of 198 Next ›
Showing 20 items per page