Matt's howto on exposing Manager services was great ( http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuseXFire). I have some questions about how this would work with a larger domain model. The Manager classes in the service layer will often return domain objects, which are part of the larger domain model. When we're rendering the domain data in the web layer, we (hopefully) get just the data we need by traversing the graph and Hibernate does the work of lazy loading (if you're using Hibernate and open session in view).
When we expose Manager methods as web services, we can count on libs such as XFire to try to serialize the model. Matt's example showed how we can prevent the circular reference issue, which is great. The question is - how can we manage which portions of the domain graph get returned so that many of our web service calls don't end up with a fully serialized version of our domain model? For large models, it could have a substantial impact on performance. The overhead of defining an interface for exposing web services is fine (IMHO), but creating Manager methods that return lightweight value objects because you want to limit the data is not ideal (but may be the reality) - this leads to "polluting" your service layer with consumer-dependent code. Thoughts? Thanks, -Troy [EMAIL PROTECTED]