6 Replies Latest reply on Apr 15, 2003 8:51 PM by VN

    Domain Model

    georg Newbie

      Hi.

      I'm currently reading the PDF(book) "EJB Design Patterns" from Floyd Marinescu and have difficulties in understanding what a domain model actually is!

      In the "EJB Design Patterns" pdf the author divides a j2ee app in five layers:

      1) presentation
      2) application
      3) services
      4) domain
      5) persistence

      The most of them are clear to me, but I ever thought of a domain model as something like a "real world" model that has nothing to do with implemented classes.

      What the hell is the domain layer? The description says that the domain layer includes all objects that came out of the object oriented analysis of the business problem. Isn't this the persistence layer?

        • 1. Re: Domain Model
          J. Wolfgang Kaltz Novice

          > What the hell is the domain layer? The description
          > says that the domain layer includes all objects that
          > came out of the object oriented analysis of the
          > business problem. Isn't this the persistence layer?

          I would assume the author means, the domain layer contains objects like, say, the class Account representing a banking account.
          The persistence layer is responsible for making business data persistent, this need not be an object of class Account which is actually stored as that object, but can be stored as whatever (for example a row in an sql-database)

          • 2. Re: Domain Model
            georg Newbie

            Are p.i. Data Transfer Objects and DTO Factorys part of the Domain layer?

            That would make sense to me.

            • 3. Re: Domain Model
              Blair Jennings Newbie

              Typically the domain layer consists of all the objects which make up your business rules. For instance I work on a J2EE complient scientific application which uses a SFSB as a facade into the actual application (the domain layer) where all of the actual work of the application occurs. The only things the SFSB provides is a path to the persistence layer (JDO in this application)and multithreading of a single threaded application (inherited from the app server). All of the "real work" occurs in the domain layer which is just made up of standard Java objects and can be run as an application all by itself (in fact that is how we originally wrote it as a stand alone single threaded application). Which we wrapped a EJB facade around.

              • 4. Re: Domain Model
                B Stil Newbie

                > I'm currently reading the PDF(book) "EJB Design
                > Patterns" from Floyd Marinescu and have difficulties
                > in understanding what a domain model actually is!

                > What the hell is the domain layer? The description
                > says that the domain layer includes all objects that
                > came out of the object oriented analysis of the
                > business problem. Isn't this the persistence layer?

                look at page 126 "What is a Domain Model?" and page 131 "Persistence Layer Patterns with a Domain Model"

                • 5. Re: Domain Model
                  VN Newbie

                  Domain Model are the set of objects that represent persistent data in a database . This layer in a J2EE Application is usually made up of entity beans . Hope this helps.

                  • 6. Re: Domain Model
                    VN Newbie

                    Domain model represent a set of objects that represents persistent data in a database / storage.

                    This layer in a J2EE application consists of Entity EJB upon which service layer acts upon.

                    Hope this helps..