Value Object (VO) is a design pattern used to transfer data between application software subsystems.
An actioncript class can include fields (vars), properties (getters / seters), and methods. The term โvalue objectโ refers to classes used by frames (eg, Cairngorm ) to store and transfer data between components and modules. These classes act as templates for storing data and, as a rule, do not contain functions other than getters / setters.
The Cairngorm structure has an IValueObject interface that does not contain any methods.
This is a marker interface that improves code readability by identifying classes in a Cairngorm application that should be used as value objects to transfer data between application tiers.
A Value object is a free term in actionscript. Link AS3 reference here used this term for an object passed to the class constructor to initialize its properties.
class Circle extends Shape { public var bgColor:Number = 0xFFFFFF; public var radius:Number = 0; public var xCenter:Number = 0; public var yCenter:Number = 0; public function Circle(initObj:Object) {
Using the value object allows class users to initialize only the properties they want. An alternative to this method (one that is more reliable and less error prone) is to specify each property as constructor arguments and assign them default values.
source share