domain-object

Constructing a Domain Object from multiple DTOs

橙三吉。 提交于 2019-12-23 12:37:31
问题 Suppose you have the canonical Customer domain object. You have three different screens on which Customer is displayed: External Admin, Internal Admin, and Update Account. Suppose further that each screen displays only a subset of all of the data contained in the Customer object. The problem is: when the UI passes data back from each screen (e.g. through a DTO), it contains only that subset of a full Customer domain object. So when you send that DTO to the Customer Factory to re-create the

Are domain objects the same as JPA entities?

限于喜欢 提交于 2019-12-21 12:56:05
问题 Are domain objects the same as JPA entities? If I have a value object (e.g. a dollar bill), how can I (or even should I) store that in the datastore as a reference object? What are the subtleties of domain objects being entities in some cases and value objects in other cases? Could anyone direct me to a good paper on this? 回答1: "Domain object" is a more conceptual term; "JPA entity" refers to a specific technology useful for implementing domain objects. Generally domain objects correspond to

Domain Objects and Value Objects - are they equal?

余生长醉 提交于 2019-12-21 12:19:06
问题 By looking to the example of a Domain Object into Zend Quickstart tutorial, and other examples considering a DAO/VO patterns, they both seem to be very similar. Can we deduce that to say "Value Object" is the same as to say "Domain Object" ? If not, can you please clarify the differences between those? What is the function of one, and what if the function of another ? I'm asking this because, both are composed by getters and setters and nothing more then that. It seems that, they do the same

Grails Domain: How to access parent domain data?

倖福魔咒の 提交于 2019-12-13 08:48:19
问题 I have a parent child domain structure, and I want access parent domain data in child domain for validator. For example in the code example below, child1 has a variable 'name' and for validator purpose I need child2 data. How can I achieve this situation? I have domain structure like this: class Parent{ Child child1 Child child2 static mapping = { child1 lazy:false child2 lazy:false } } class Child{ String name // some other variables static belongsTo = [parent:Parent] static constraints = {

How can I Make a Successful Domain Object Factory in PHP

做~自己de王妃 提交于 2019-12-05 06:16:13
问题 I'm fiddling with an MVC framework, and I stumbled upon a problem I'm not sure how to solve. I want to make a DomainObjectFactory for the Model layer of my application, however, each Domain object would have a different set of arguments, for instance: Person - $id, $name, $age. Post - $id, $author, $title, $content, $comments Comment - $id, $author, $content And so on. How can I easily tell my factory what kinds of object do I require? I've came up with several options: Pass an array - I

Are domain objects the same as JPA entities?

感情迁移 提交于 2019-12-04 06:18:35
Are domain objects the same as JPA entities? If I have a value object (e.g. a dollar bill), how can I (or even should I) store that in the datastore as a reference object? What are the subtleties of domain objects being entities in some cases and value objects in other cases? Could anyone direct me to a good paper on this? "Domain object" is a more conceptual term; "JPA entity" refers to a specific technology useful for implementing domain objects. Generally domain objects correspond to the nouns (orders, invoices, customers, etc.) in your domain. Usually we see these as being closer to the

Domain Objects and Value Objects - are they equal?

此生再无相见时 提交于 2019-12-04 04:42:26
By looking to the example of a Domain Object into Zend Quickstart tutorial, and other examples considering a DAO/VO patterns, they both seem to be very similar. Can we deduce that to say "Value Object" is the same as to say "Domain Object" ? If not, can you please clarify the differences between those? What is the function of one, and what if the function of another ? I'm asking this because, both are composed by getters and setters and nothing more then that. It seems that, they do the same function... Update: So, Zend Framework Quick Tutorial documentation called this, a domain object: //

Difference between Transfer objects and Domain objects

自作多情 提交于 2019-12-03 02:18:23
问题 Could you please explain the difference between Transfer objects and Domain objects in simple terms ? And if u could give a Java example, that would be great.. 回答1: DTOs don't have any logic. They only have fields (state). They are used when transferring data from one layer/subsystem to another Domain objects can have logic (depending on whether you are using domain-driven design or have anemic data model) and they are usually related to the database structure. If using anemic data model (i.e

Difference between Transfer objects and Domain objects

时光毁灭记忆、已成空白 提交于 2019-12-02 15:48:37
Could you please explain the difference between Transfer objects and Domain objects in simple terms ? And if u could give a Java example, that would be great.. DTOs don't have any logic. They only have fields (state). They are used when transferring data from one layer/subsystem to another Domain objects can have logic (depending on whether you are using domain-driven design or have anemic data model) and they are usually related to the database structure. If using anemic data model (i.e. your domain objects don't have any logic), DTO and domain object can be the same object. Related: http:/

How do one use ACL to filter a list of domain-objects according to a certain user's permissions (e.g. EDIT)?

房东的猫 提交于 2019-11-28 16:42:09
When using the ACL implementation in Symfony2 in a web application, we have come across a use case where the suggested way of using the ACLs (checking a users permissions on a single domain object) becomes unfeasible. Thus, we wonder if there exists some part of the ACL API we can use to solve our problem. The use case is in a controller that prepares a list of domain objects to be presented in a template, so that the user can choose which of her objects she wants to edit. The user does not have permission to edit all of the objects in the database, so the list must be filtered accordingly.