Results 1 to 2 of 2

Thread: Should all domain objects have interfaces?

  1. #1
    Join Date
    Aug 2005
    Posts
    6

    Default Should all domain objects have interfaces?

    Hi,

    I am currently starting to put together a prototype Struts/Spring/EJB/Hibernate app and am wondering whether the "code to interfaces" best practice applies to domain objects in the same way it does to services and DAOs. I can see the rationale for creating interfaces for all service and DAO classes, I'm just not sure if this holds true for domain objects as well (and, if it does, is it solely to aid testability of non-getter/setter methods on the domain objects?). Any help here would be much appreciated...

    Thanks in advance,
    Lawrie

  2. #2

    Default

    domain objects are generally pojos, sometimes with very fine grained service methods embedded. They are generally not interfaced, domain objects are operated on, you write interfaces for objects that perform operations.

Similar Threads

  1. Dependency Injection for empty domain objects
    By assaf in forum Architecture
    Replies: 5
    Last Post: Jan 5th, 2008, 10:23 AM
  2. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  3. Replies: 12
    Last Post: Jun 21st, 2005, 01:28 PM
  4. Binding to business domain objects
    By klr8 in forum Architecture
    Replies: 2
    Last Post: Mar 15th, 2005, 01:21 AM
  5. Replies: 0
    Last Post: Jan 6th, 2005, 08:19 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
  •