ValueObject motivation


EJB design: ValueObject motivation

  1. ValueObject motivation (1 messages)

    In "J2EE Patterns" the forces and motivation for ValueObject seem to be related to performance.

    I'm writing my application so client views are always read-only. I.e., a client request is processed by the server application and data returned to the client. I only want to expose values to the client via ValueObject getters (in fact, I don't really want the client to see the setter methods). Is this an appropriate rationale for using a ValueObject or is it bogus for me to force the client's view to be read-only?
  2. ValueObject motivation[ Go to top ]

    It's right for you to use ValueObject.
    The motivation for VO is to minimize the workflow (network traffic) by introducing a coarse-grain Value Object.

    In addition, you can use the "Page by page iterator" design pattern to get network traffic minimized.

    It is a good option to combine "Value Object" and "Page by page iterator". You can not only meet all data in a record to send together all fields in a round trip (Value Oject) by also you could pack a lot of them (i.e. array of ValueObjects) and configure a parameter to determine how much VO you may pack (Page by page it.)

    Because you don`t update the underline data in your GUI, you don't ever have to invalidate the pack of VO's