The choice between Diet Coke or Coke Zero is made using Ape's client methods. The choice between Cherry Coke and Black Cherry Vanilla Coke is made through a json post to a server on a different domain which then does a urllib2.urlopen() to the Ape Server to send the data through.
Using the Ape Javascript client means that the webapp server never needs to see the request and Ape handles all client communications. Using the JQuery post method simulates having a server-side broadcast that would be made and broadcast to a lot of listeners.
This uses actions built on the page and JavaScript through Ape to communicate the change.
This uses Jquery Form Submission and a controller through Pyramid using urllib2 to post a json string to Ape.