20.2. Value Objects

Retrieving posts by category involves passing the categoryId so that posts with that categoryId can be retrieved. This property is already represented on the CategoryVO, so you can use the existing value object to do this.

Keyword searches require only the string containing the search terms to be sent. Because of this there is no real collection of related data to be passed, only a single string. Creating a search value object to pass this string would be overkill (at least for the way it is being done in the sample application).

Get Professional Cairngorm™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.