Flex Remoting with ZendAMF/MySQL - An Introduction Tutorial
This tutorial will help you get started on your first Flex application (a very simple one) using ZendAMF to connect to your MySQL database. I ran into a few wrong turns following some examples on the web, so I've decided to provide a few more details where people might run into trouble. The best example I could find is by Mihai Corlan (giving many thanks for his help and all he has given back to the community) where my article will closely resemble his article.
By the end of this article, you will be able to:
- install zend and understand how to configure it for use
- connect your Flex application to do some elementary search queries
- create a php class used for serialization
- understand the fundamentals to begin creating advanced custom applications
Installing Zend
Download the ZendAMF Framework and unzip it to some folder outside your web directory. I used "C:\frameworks". After decompressing your files, your directory should contain "C:\frameworks\Zend".The next step involves a matter of preference whether you like to 1) manually set php each time you start a new project where the Zend framework is located or 2) set the PATH permanently in php.ini in this location.
- To manually set php each time, we will discuss later when talking the specific php file involved.
- To set the path in the php.ini file (inside your /php folder), open up the file and search for "include_path". Add the absolute path of the parent directory where you decompressed your downloaded ZendAMF framework. You should have one for Unix systems and Windows system, so use the proper one correspondingly. (Mine looks like: include_path = ".;c:\php\includes;c:\frameworks").

Leave a comment