Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4583102
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:10:06+00:00 2026-05-21T21:10:06+00:00

If Domain Object = Business Object, then I was expecting to see things like

  • 0

If Domain Object = Business Object, then I was expecting to see things like findTaxValues(); or searchBooksByAuthor(); methods, instead, I see generally getters and setters.

1)

Is this a Domain Object Class ?

class Application_Model_Guestbook
{
    protected $_comment;
    protected $_created;
    protected $_email;
    protected $_id;

    public function __construct(array $options = null)
    {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }

    public function __set($name, $value)
    {
        $method = 'set' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid guestbook property');
        }
        $this->$method($value);
    }

    public function __get($name)
    {
        $method = 'get' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid guestbook property');
        }
        return $this->$method();
    }

    public function setOptions(array $options)
    {
        $methods = get_class_methods($this);
        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (in_array($method, $methods)) {
                $this->$method($value);
            }
        }
        return $this;
    }

    public function setComment($text)
    {
        $this->_comment = (string) $text;
        return $this;
    }

    public function getComment()
    {
        return $this->_comment;
    }

    public function setEmail($email)
    {
        $this->_email = (string) $email;
        return $this;
    }

    public function getEmail()
    {
        return $this->_email;
    }

    public function setCreated($ts)
    {
        $this->_created = $ts;
        return $this;
    }

    public function getCreated()
    {
        return $this->_created;
    }

    public function setId($id)
    {
        $this->_id = (int) $id;
        return $this;
    }

    public function getId()
    {
        return $this->_id;
    }
}

Update:

2) Since it seems to be a Domain Object Class:

I’m having a hard time studying Zend Quick Start guide.

Here’s my resume so far:

Table Data Gateway Objects – Those are object copies of our tables and they should contain table related generic queries. On Zend, we will use them to perform generic queries that will work across different database vendors via Zend_Db_Table_Abstract extension. What will those gateway objects do? They will connect (via an adapter) to our data source (ex: a MySQL database), on a generic (non-database-specific) way;

Data Mappers Objects – Those objects will work between our data source and our domain object models. They may, or may not, use the Gateway to have access to the data source. Their job is to, while referring NOT to a specific table BUT to a domain (that may need/have access to different tables), it provides a way to better organize the data and the related behaviour. On this Zend example, we will use the mapper to move data back and forward between Domain Objects and Gateway Objects;

If the above is correct, then I’m still missing this:

Domain Objects (a.k.a Business Objects) – Those objects … I don’t get here… what is their relation with the others ?

How can we properly define Domain Object – regarding this Gateway / Mapper architecture ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T21:10:06+00:00Added an answer on May 21, 2026 at 9:10 pm

    I believe you’re confusing business managers or something like that with domain objects. A domain object should be a business entity, so I’m going to confirm that your code sample is a domain object.

    EDIT | Answering to your update:

    A domain object is an entity playing some business role around in some specific business concern. If I don’t understand wrong Zend’s definitions, “Data Mapper Objects” could be “domain objects”, but not in all cases.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic domain object, say like Person or Campaign or Event that
Let us say my domain object can contain a bunch of objects like this:
I'm working on modeling a business domain object in a class and am wondering
Assume I have this domain object... public class SpansMultipleTables { public int CommonID {get;
I have a domain object that has been auto generated for me by MyGeneration.
Given a domain object: class BirthdayDomain { public DateTime Birthday { get; set; }
I have my domain object, Client , I've got a form on my JSP
When you have a domain object that needs to display as an interface control,
I have this huge domain object(say parent) which contains other domain objects. It takes
I have a property on a domain object that is declared in a many-to-one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.