
Adobe
Even though you can use this tutorial with no prior experience with Flex, this is not a traditional "getting started" tutorial. The goal of this tutorial is to:
Some of the techniques demonstrated in this tutorial include:
In this tutorial, you build a Restaurant Portal application. The application has two modules:
This is the module that end-users use to search for restaurants. Users can select restaurants by location (using a map-based selection) and by categories. You can also read customers' reviews and write your own review. In this tutorial, you build the application from scratch.

Figure 1. The user module
This is the module that the administrators of the portal use. Administrators can add, update, and delete restaurants, indicate their location on a map, and so forth. It's a typical database maintenance application. I provide the administration module to you as a reference application. I also provide the steps to install the administration module later in this tutorial.

Figure 2. The administration module
To perform this tutorial, you need to download and install the following software and files.
c:\mysql\bin>mysqld
c:\mysql\bin>mysqladmin –u root create restaurant
c:\mysql\bin>mysql –u root restaurant < restaurant.sql
Copy mysql-connector-java-3.0.14-production-bin.jar in the [webapp_root]\WEB-INF\lib directory of your web application.
Note: The exact name of the file may vary depending on the version number of the driver at the time you download it.
The location of [webapp_root] is the root directory of the web application hosting the Flex server you are using. For example, if you chose the Integrated Server installation, the webapp root is: Program Files\Macromedia\Flex\jrun4\servers\default\flex.
The Restaurant application has two modules:
In this tutorial, you will build the user module. I provide the administration module as a reference application.
Test the application. For example, if you chose the Integrated Server installation, browse the administration module at: http://localhost:8700/flex/restaurantadmin/admin.mxml.
If you haven't already modified the RemoteObject whitelist, the following error message appears:

Figure 3. The error message that appears if you haven't modified the whitelist
This is because Flex is installed with strict security constraints by default. To allow your application to access the required Java class in your application server, you have to edit the RemoteObject whitelist as described in the following steps.
<remote-objects> entrysamples.* package to the unnamed whitelist.<remote-objects>
<!-- Other entries -->
<whitelist>
<unnamed>
<source>samples.*</source>
</unnamed>
Install the resource files (images, style sheet, etc.) in this tutorial.
Christophe Coenraets is a Technical Evangelist for Adobe where he focuses on rich Internet applications and enterprise integration. He has been working on Flex since the early days of the product in 2003. In his previous role at Macromedia, Christophe worked on JRun, the company's J2EE application server. Before joining Macromedia, Christophe was managing Java and Internet applications evangelism at Sybase. Christophe has been a regular speaker at conferences worldwide for the last 15 years. He blogs at http://coenraets.org.