Forums Register Login

VO and Java EE 5

+Pie Number of slices to send: Send
Hi

Can someone explain to me why VOs are not necessary any more when designing with JavaEE 5?
+Pie Number of slices to send: Send
Java EE 5 contains EJB 3 and JPA. With EJB /JPA new POJO Entities are available.
With such lightweight objects representing data in Java EE applications there is no need of cluttering application with Transfer Objects.
+Pie Number of slices to send: Send
Value Object is not the same as Transfer Object (TO or DTO pattern).
Value Object means objects that don't have identity. For example, services are Value Objects.

Value Object is an important building block for software design.

However, when I talk about Value Objects, I refer to Domain-Driven Design.
+Pie Number of slices to send: Send
 

Kengkaj Sathianpantarit wrote:Value Object is not the same as Transfer Object (TO or DTO pattern).
Value Object means objects that don't have identity. For example, services are Value Objects.

Value Object is an important building block for software design.

However, when I talk about Value Objects, I refer to Domain-Driven Design.



Are You serious man ?
They changed the name of pattern from Value Object (Ed1 of Core J2EE Pattern) to Transfer Object (Ed2).

You can find bunch of topics here on Javaranch about the whole case, f.e.:

https://coderanch.com/t/154686/Architect-Certification-SCEA/Value-Object-VO-vs-Transfer
http://en.wikipedia.org/wiki/Data_Transfer_Object

Question was regarding Java EE 5, so was my answer.


+Pie Number of slices to send: Send
I guess they should make an update to Figure 8.5 in the following text then, because it still mentions "ValueObject".

http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html
+Pie Number of slices to send: Send
 

Ronald Wouters wrote:I guess they should make an update to Figure 8.5 in the following text then, because it still mentions "ValueObject".

http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html



Indeed
Here You have more up to date class diagram of TO applicable to EJB 2.x systems:
http://www.corej2eepatterns.com/Patterns2ndEd/TransferObject.htm


+Pie Number of slices to send: Send
Sweeping statements like "JPA kills DTOs" and "EE5 dependency injection kills Service Locator" are nonsense. Yes, there are many situations where EE5 makes them redundant but at the same time many cases remain where these patterns are still valid.

For example:

  • You might not want to expose your entities directly; perhaps because they're too fine grained.
  • You want to avoid the anti-pattern of making everything an EJB, so you need to perform lookups in non container-managed objects.
  • +Pie Number of slices to send: Send
     

    Piotr Uryga wrote:

    Kengkaj Sathianpantarit wrote:Value Object is not the same as Transfer Object (TO or DTO pattern).
    Value Object means objects that don't have identity. For example, services are Value Objects.

    Value Object is an important building block for software design.

    However, when I talk about Value Objects, I refer to Domain-Driven Design.



    Are You serious man ?
    They changed the name of pattern from Value Object (Ed1 of Core J2EE Pattern) to Transfer Object (Ed2).

    You can find bunch of topics here on Javaranch about the whole case, f.e.:

    https://coderanch.com/t/154686/Architect-Certification-SCEA/Value-Object-VO-vs-Transfer
    http://en.wikipedia.org/wiki/Data_Transfer_Object

    Question was regarding Java EE 5, so was my answer.



    I think you misunderstood Piotr . I didn't reply to you. I did reply to the topic creator.

    I guess Sun have changed name "Value Object" to "Transfer Object", because it's not the appropriate name.
    +Pie Number of slices to send: Send
     

    Kengkaj Sathianpantarit wrote:

    Piotr Uryga wrote:

    Kengkaj Sathianpantarit wrote:Value Object is not the same as Transfer Object (TO or DTO pattern).
    Value Object means objects that don't have identity. For example, services are Value Objects.

    Value Object is an important building block for software design.

    However, when I talk about Value Objects, I refer to Domain-Driven Design.



    Are You serious man ?
    They changed the name of pattern from Value Object (Ed1 of Core J2EE Pattern) to Transfer Object (Ed2).

    You can find bunch of topics here on Javaranch about the whole case, f.e.:

    https://coderanch.com/t/154686/Architect-Certification-SCEA/Value-Object-VO-vs-Transfer
    http://en.wikipedia.org/wiki/Data_Transfer_Object

    Question was regarding Java EE 5, so was my answer.



    I think you misunderstood Piotr . I didn't reply to you. I did reply to the topic creator.

    I guess Sun have changed name "Value Object" to "Transfer Object", because it's not the appropriate name.



    The confusion started when Sun started using TO for VO , but some people still referred to TOs as VOs.Perhaps I should have been more correct and used
    TO in my question
    +Pie Number of slices to send: Send
     

    jeff mutonho wrote:
    The confusion started when Sun started using TO for VO , but some people still referred to TOs as VOs.Perhaps I should have been more correct and used
    TO in my question


    I think so.

    Anyway, just to clarify about what I said that services are value objects. Actually, Services are another pattern/building block, I should not say services are value objects, sorry about that.
    Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 2180 times.
    Similar Threads
    How many strings are created?
    Rules or exceptions?
    Java EE version used in SCEA 5 310-052
    when 400 mark will reach?
    How many languages do you speak ...
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Apr 16, 2024 00:40:51.