The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

zartc (13) [Avatar] Offline

In section 2.1.1 Layered Architecture", you end up the discussion about the Business Layer in saying:
<<In some systems, this layer has its own internal representation of the business domain entities. Alternatively, it relies on a Domain Model implementation, shared with the other layers of the application. We'll have much more to say about this aspect later in this chapter. >>

I have read the whole chapter but couldn't find the promised dissertation about sharing Domain Model Object across application layer.

I am inclined to let the Entities objects bubble up the layers up to the Presentation layer. But I have seen many projects where Entities get replicated from layer to layer either by hand or by using Dozer, pretending that it shield the copy in the current layer from implementation changes in the source object pertaining to the below layer.

Entity Replication vs. Bubble-up is a topic that I would very much like see analyzed by you as specialists. Could you include a few sections on this topic, which state precisely what we can do with Entity objects?

Thanks in advance.
Christian Bauer (56) [Avatar] Offline
Re: About Entity object sharing across application layers
I've removed the "have much more to say about this aspect" statement, it was confusing. What we cover in this particular chapter is indeed only certain aspects of the domain model implementation, not how it is shared between application layers.

Data Transfer Objects/Classes and arguments for/against this pattern will be covered in the "Building enterprise applications" chapter.