| Package | com.bourre.events |
| Interface | public interface ValueObject |
| Implementors | ChannelListener, Constructor, DisplayLoaderInfo, DisplayObjectInfo, Method, Property, Resource |
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
A value object (also known as transfer object) is a serializable class that groups related attributes, forming a composite value. This class is used as the return type of a remote business method. Clients receive instances of this class by calling coarse-grained business methods, and then locally access the fine-grained values within the value object. Fetching multiple values in one server roundtrip decreases network traffic and minimizes latency and server resource usage.
When a web-service uses a Value Object, the client makes a single remote method invocation to the web-service to request the Value Object instead of numerous remote method calls to get individual attribute values. The web-service then constructs a new Value Object instance, copies values into the object and returns it to the client. The client receives the Value Object and can then invoke accessor (or getter) methods on the Value Object to get the individual attribute values from the Transfer Object. Or, the implementation of the Value Object may be such that it makes all attributes public. Because the Value Object is passed by value to the client, all calls to the Value Object instance are local calls instead of remote method invocations.