Page 3 of 3 FirstFirst 123
Results 21 to 21 of 21

Thread: Pass domain objects to presentation layer, but not to modify them?

  1. #21
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I don't see why it becomes a big issue for domain objects to be modified by the presentation tier
    I don't think anyone ever said it was a problem. I think there were two issues; what kind of accessors should be exposed and ensuring that only methods which don't bypass business logic are exposed. The latter can be solved with interfaces as already pointed out.

    I like your approach Sergio and I think it makes sense. The use of interfaces as you say should make it meaningful. One slight concern I have is the number of accessors I might have to add to the domain objects. OK, fine these are only visible to some of the interfaces but does it create clutter on the domain object.

    Given the bad points of the alternatives, I'd be willing to accept the extra accessors!
    Last edited by karldmoore; Dec 12th, 2006 at 03:38 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •