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.