Integrating Flash
with SQL Database

By John Reuben
Since the arrival of the
client/server architecture, and more so
with the frenzy of the Internet, the technologies have boomed and reached
levels of complexity that confuses even the most gifted computer professionals.
To better understand how systems work, it is generally accepted to divide them
in three units. The first one is called the "presentation" layer,
also known as the first tier. It allows you to view and input data. The second
is called the "application logic" layer, also known as the second
tier. It allows you to perform business logic and process or manipulate data.
The third is called the "data" layer, also known as the third tier.
It stocks, gives access, and organizes the data.
In ten years, we have leaped from the stand-alone workstation to the networked
stations that allow sharing of files and peripherals. The client/server
architecture evolved, allowing displaying and process information on the
desktops while sharing a data server.
Yes Queue Yell!
SQL (Structured Query language) is the language of choice for most modern
multi-user, relational databases. That is because SQL provides the syntax and
idioms (language) you need to talk to (query) relational databases in a
standardized, cross-platform/product way (structured).
Among other things, the language consists of statements to insert, update,
delete, query and protect data. It has been implemented in many products such
as dBase, Oracle and Sybase.
Flash movie is a vehicle
For the purpose of this topic, it's best to think of a Flash movie as a vehicle
for gathering and displaying data. The Flash movie is similar to an HTML-based
form in the way that it captures and forwards information. Learning how to use
a database with Flash requires knowledge of
how to create a form in Flash.
A Flash movie cannot communicate directly with a database-the third tier.
However, Flash movies can "talk" to server-side applications-the
second tier (also referred to as "middleware"). Middleware can query
a database and relay data back and forth. There are many server applications
available. Some of the most common are CGI, ASP, PHP, ColdFusion and Tango.
Integrating a Flash movie with a database on a server is the key to creating
rich, platform-independent Web applications. For this process to work, a
developer must know many aspects of Web application building - including Flash
design, ActionScript, writing server scripts, and administering a database. The
workload for creating this kind of delivery tends to fall on one person, and
requires manual updating when necessary.
Flash form data can be inserted into a database
On the simplest level, a Flash form can take in user data via editable text
fields. The Load Variables or GetURL actions can send the data (GET or POST) to
the middleware, which will compose the data into the correct format that the
database requires.
Data can be sent to the Flash movie from a database by middleware
Another popular use is to have a Flash movie's data contents read from a
database. This strategy permits the database to be updated continuously. The
Flash movie does not have to be manually changed.
A URL with query string data can be used to collect unique information from the database
A Flash movie can also receive database information that is customized
exclusively to the user, based on events that occur while a user navigates
through a site. One method is to pass parameters in a URL (known as the
"query string") or from form data. The server script can pass those
values to the Flash movie. This allows the movie to display contents that are
dependent on what the user has done, or dependent on where the user came from.
Popular uses for this method include e-greeting cards, shopping carts and
personalized pages where it is necessary keep track of a user's activities.
Typically, databases that are used for Web purposes include Oracle, Microsoft
MSSQL and Access, FileMaker, MySQL, FoxPro and Sybase. These databases all use
various protocols that work with server middleware. Some are meant for
enterprise-level sites, while others are best suited for low-traffic sites.
Some common uses for Flash and database interaction
include:
-
Dynamic content
-
Guestbooks
-
Password protection
-
E-commerce
-
Web application building
-
Personalization
Additional information
For more information about integrating Flash with SQL see the following links:
Flash
and ASP Integration
| Related Links on building an Online
Community: |
|
|
|