Hi Tom, You typically want strike the right balance between appropriately-sized RPC payloads and the number of RPC requests required to load up and operate on various parts of your application. Using this design in the context of the questions you asked below:
1) how are you handling a parent-child relationship from the database, > how do you define the DTO(s). > You can model the entire parent-child relationship in a 1:1 fashion and fully load the DTO if it makes sense for the specific part of your application where this data is required (i.e. if the user is going to need to operate on all of that data in the same screen, it might be worth sending it all in one RPC request with a fully loaded DTO). However, if the fully loaded object isn't needed, or if the payload for the fully loaded object risks choking the application given the user's connection bandwidth, then you might want to split these up. > 2) how do you handle pushing parent-child data from the UI (in a DTO) > back to the database for an update or add. > A couple of common strategies revolve around marking DTOs as "updated", with an ID linking them back to the DB model. Another technique would be to maintain a listing of updated objects in a command, and have the command passed back and executed on the server-side to update that listing of objects. It seems like you're just getting started with your application design and planning the architecture you're going to use given the fact that your two previous questions are pretty high level. I recommend checking out a talk on architectural perspectives when creating GWT applications. You might not end up using the patterns described in the talk, but I feel there is a lot of food for thought in the talk that would be better delivered through video than through a forum posting. I recommend checking out the talk, let some of the ideas cook in your head, and then coming back here with follow-up questions for the architecture you're thinking of using. Google Web Toolkit Architecture: Best Practices For Architecting Your GWT App: http://code.google.com/events/io/sessions/GoogleWebToolkitBestPractices.html Hope that helps, -Sumit Chandel > > Any examples, or any suggestions would be very helpful. > > Thanks! > Tom > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---