Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Kevin Schroeder's Blog:
Passing typed ActionScript objects to Flex using PHP and a message queue
Jun 07, 2011 @ 13:20:12

Continuing on in his Flex and PHP series Kevin Schroeder has a new post to his blog today looking at how to send typed ActionScript objects to Flex so he could pass PHP objects and their structure directly back to the waiting frontend.

What I wanted to do was use the sales notification mechanism to pass PHP objects to Flex using the message queue. But I could not get the unserialization mechanism to work and so I had to settle for passing a simple message that a sale had been made. However, because you can pass typed objects back and forth between PHP and ActionScript over HTTP using Zend_Amf_Server I figured that there MUST be a way of doing it automatically.

He walks you through the steps to discovery that eventually got him to his end goal - making a simple valueObject class to use for the connection, a basic PHP script (using Zend_Amf) to parse the object's data and a bit of code to send it back to the waiting MQ queue via a Zend_Queue adapter.

tagged: flex message queue actionscript object mq

Link:

Kevin Schroeder's Blog:
Connecting PHP to ActionScript and Flex using Stomp
Jun 06, 2011 @ 13:19:26

Kevin Schroeder has a recent post to his blog today looking at how he used Stomp to connect his backend PHP to frontend Flex, a text-based protocol that can be used to connect to a MQ server instance.

In yesterday's post I talked a little bit about some of the details on how I used messaging to connect a front end on demand request to a back end scheduled data processing mechanism. In this post we're going to talk about how to send data from a web page to a running Flex application without using HTTP. It is really quite easy.

His demo application watches a Magento instance and notifies him whenever a new sales comes in. Because of Magento's event-based system, it made the setup relatively easy. He includes the code for the observer on the Magento side and the Zend Framework-based logger code that it calls. Using the AS3Stomp library to make the connection, Kevin sets up the data provider for the Flex app to push the latest sale information into a list.

tagged: tutorial actionscript stomp mq server flex backend notify

Link:


Trending Topics: