O'Reilly logo

Professional Cairngorm™ by Jeremy Wischusen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

21.2. How Value Objects Have Been Used

Value objects were used in a number of ways in the sample application.

The first major use was for simplifying the transfer of related collections of data between classes and the backend (aka data transfer objects). By mirroring how data is stored on the backend in the properties of value objects, we made it simpler to pass data back and forth to the server (or in our case the local database). It's simpler because you know how the data is being represented on both ends. The event, command, and delegate classes, as well as the FlexBlogDatabaseManager acting as the service simulator, all made use of value objects to pass data between classes and update the ModelLocator.

Other common uses occurred in the views. Value objects were used to display the properties of a given value object through data binding. They were also used by various selection components such as lists to allow the user to select a value object that would then be passed to an event or update the model to change views.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required