You want to create a simple application but you haven't enough time
This tutorial shows you how to create quickly web applications using the flex builder function "Create application from database"; Here is an example which use php as back-end and MySql as DataSource,you can use Asp.net ColdFusion J2EE or others technologies as backend and any other database as DataSource
First of all you have to setup your MySql datasource by creating a database and a table;
Create a database
CREATE DATABASE `users` ;
Create a table:
CREATE TABLE `accounts` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`username` VARCHAR( 16 ) NOT NULL ,
`password` VARCHAR( 32 ) NOT NULL ,
`priviledge` INT( 1 ) NOT NULL
) ENGINE = innodb;
Than create a project that use PHP as server technology:
Right Click on the Flex Navigation Panel -> new -> Flex Project;
Choose the project name and select PHP as Application server type;
Click Next;
Before clicking the Finish button be sure that the Web root folder and Root URL are valid, to do so you can click on Validate Configuration;
Now you can create your application!
Choose Data -> Create Application from Database from the main menu;
Select your project and create a New Connection, give it a name a a description(optional) and check the flag Auto-connect when the wizard is finished;
Setup your connection by filling the TextFields and then click on Test Connection
This is an example of a tipical MySql Connection
Host URL: localhost
Database Name:users
User Name: root
Password: DatabasePasswordForRoot
If your connection is valid you can click finish and return to the main screen where you can select the table and the Primary key;
In this example the Table name is accounts and the primary key is id
Click the Next button;
choose the source folder and the PHP file name and go on;
in this screen you can see all the column of your table and you can choose which one you want to show and on which column enable filtering;
Click on Finish and thats all!!
For an Italian version of this entry please visit flex-developers.org