Archive for October, 2009

Oct 21 2009

Using PHP Data Services in Flex 4 with Shopping Cart

Published by under Flex,Work Examples

I was at Adobe Max this year and Using PHP Data services with Flex was one of the sessions i attended. It was a very informative one and showed how one needs to do very little work to use remoting with PHP.

Flex 4 has some powerful wizards to use data services and it makes it lot easier to get data into Flash. The value objects are created for you and all the heavy lifting is done by Flex.

It uses Zend Framework for remoting but the best part is you don’t have to write any php code, only some MySQL queries to get the required data.


This is not a tutorial but a working example of how i was able to connect a Zen Cart database with my Flex Application and it took me less than a day to get this working, the main part was spent of learning the zen cart db structure and then writing the MySQL query to get the products list. I am sure any shopping cart can be easily connected.


To have little more fun with it, i also threw in the layout managers which come with Flex 4 and demonstrated how easy it is to change the look and feel of your application. I am not a designer but using Flash Catalyst one can easily make this application very visually appealing too.

http://nayansavla.com/zen/flex-output/zen.html This is the Flex application which pulls in the products from the zen cart.

http://nayansavla.com/zen/ This is the HTML default version which comes with the Zen Cart.

http://nayansavla.com/zen/admin admin/admin if you want to change the products and then see them update in the Flex application.

This was very easy to accomplish, i am not going to share the code sorry. The Flex 4 data services makes it so easy todevelop a CRUD system.

Edit: I have rebuilt my server so the html version of zen cart doesn’t work need to update it. But the flex works.

5 responses so far

Oct 20 2009

Groups and Layouts in Flex 4

Published by under Flex

When i first started playing in Flex 4, i wasn’t sure what groups was all about but then after a closer look i realized that its a very neat concept and the layouts go with it.

Using any provided layout or writing your own custom layout classes the elements in the group can be easily arranged on stage in any pattern that you wish. Take a look at the following example to see what i mean.

Select the choose layout button to swap between the horizontal and vertical layouts. You will need Flash player 10 to view this.



You can view the source by right clicking into the application.

One response so far