The Zend Developer Zone has posted part four of their Ajax Chat Tutorial series (part 1, part 2, part 3) today focusing on enhancing the structure they've already created.
In part 4 of this tutorial we take a look at adding a new MessageAction method to our current Controller. This will expect one piece of information: a new chat message.
Of course, plenty of code is included and they show how to work with JSON messages over XML for simplicity's sake (via an updated IndexController).