Dynamic content sources overview – Adobe Dreamweaver CC 2014 v.13 User Manual
Page 633

Dynamic content sources overview
About dynamic content sources
About recordsets
About URL and form parameters
About session variables
ASP and ColdFusion application variables
ASP server variables
ColdFusion server variables
Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this
article in Dreamweaver CC and later. For more information, see
.
About dynamic content sources
A dynamic content source is a store of information from which you can retrieve and display dynamic content for use in a web page. Sources of
dynamic content include not only information stored in a database, but values submitted by HTML forms, values contained in server objects, and
other content sources.
Dreamweaver lets you easily connect to a database and create a recordset from which to extract dynamic content. A recordset is the result of a
database query. It extracts the specific information you request and allows you to display that information within a specified page. You define the
recordset based on the information contained in the database and the content you want to display.
Different technology vendors may use different terminology for a recordset. In ASP and ColdFusion, a recordset is defined as a query. If you are
using other sources of data, such as user input or server variables, the name of the data source that is defined in Dreamweaver is the same as
the data source name itself.
Dynamic websites require a data source from which to retrieve and display dynamic content. Dreamweaver lets you use databases, request
variables, URL variables, server variables, form variables, stored procedures, and other sources of dynamic content. Depending on the data
source, you can either retrieve new content to satisfy a request, or modify the page to meet the needs of users.
Any content source that you define in Dreamweaver is added to the list of content sources in the Bindings panel. Then you can insert the content
source into the currently selected page.
About recordsets
Web pages can’t directly access the data stored in a database. Instead, they interact with a recordset. A recordset is a subset of the information
(records), extracted from the database using a database query. A query is a search statement designed to find and extract specific information
from a database.
When using a database as a content source for a dynamic web page, you must first create a recordset in which to store the retrieved data.
Recordsets serve as an intermediary between the database storing the content and the application server generating the page. Recordsets are
temporarily stored in the application server’s memory for faster data retrieval. The server discards the recordset when it is no longer needed.
A query can produce a recordset that includes only certain columns, only certain records, or a combination of both. A recordset can also include
all the records and columns of a database table. However, because applications rarely need to use every piece of data in a database, you should
strive to make your recordsets as small as possible. Because the web server temporarily holds the recordset in memory, using a smaller recordset
uses less memory, and can potentially improve server performance.
Database queries are written in Structured Query Language (SQL, pronounced “sequel”), a simple language that allows you to retrieve, add, and
delete data to and from a database. The SQL builder included with Dreamweaver lets you create simple queries without having to understand
SQL. However, if you want to create complex SQL queries, a basic knowledge of this language lets you create more advanced queries, and
provides you with greater flexibility in designing dynamic pages.
Before you define a recordset for use with Dreamweaver, you must create a connection to a database and—if no data exists yet—enter data into
the database. If you have not yet defined a database connection for your site, refer to the database connection chapter for the server technology
you are developing for, and follow the instructions on creating a database connection.
About URL and form parameters
URL parameters store retrieved information input by users. To define a URL parameter you create a form or hypertext link that uses the GET
method to submit data. The information is appended to the URL of the requested page and communicated to the server. When using URL
variables, the query string contains one or more name-value pairs that are associated with the form fields. These name-value pairs are appended
626