stock moving. Whichever cheese has the highest stock levels should be displayed
prominently on the front page to try to spark interest. To work out the list of available
cheeses and their stock levels, we use Blueprint to wire together a SpecialOffer ser-
vice and the Inventory service, as shown in the following listing.
The Blueprint for registering a special offer with an Inventory dependency
<?xml version="1.0" encoding="UTF-8"?>
name="inventory" ref="inventory" />
<reference id="inventory" interface="fancyfoods.food.Inventory" />
With this new bundle, our system has the architecture shown in figure 3.9.
The special offer implementation takes advantage of the injected Inventory ser-
vice to work out which cheese has the highest stock levels, as shown here.
Fancy Foods web
The architecture of the Fancy Foods application
Search WWH ::