MACROMEDIA COLDFUSION 5-DEVELOPING Manuale Utente

Navigare online o scaricare Manuale Utente per Software di database MACROMEDIA COLDFUSION 5-DEVELOPING. Microsoft Word - steps_for_building_dynamic_pages_en.doc Manuale Utente

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 47
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 0
ColdFusion MX 7 Getting Started Experience Tutorial Page 1 of 47
Steps for Building Dynamic Pages
This document outlines step-by-step directions for building a dynamic Macromedia ColdFusion MX 7 database-driven web
page that pulls data from multiple database tables and references images stored on the server.
The steps for this tutorial are:
STEP 1: Setting Up the Development Environment
STEP 2: Setting Up Dreamweaver MX 2004
STEP 3: Starting With Static HTML, and Reviewing the Database Data
STEP 4: Connecting the Database to ColdFusion
STEP 5: Learning Some Structured Query Language (SQL) Statements
STEP 6: Writing ColdFusion Code
STEP 7: Optimizing the Code with ColdFusion Components (CFCs)
The page you build in this tutorial displays artwork by various artists.
Figure 1. Final web page
with alphabetized database-
driven content displayed in
three columns
STEP 1: Setting Up the Development Environment
Before you start this tutorial, you should first review the animated slideshows available in the ColdFusion and
Dreamweaver Development Overview section of the ColdFusion MX 7 Getting Started Experience website. These
Vedere la pagina 0
1 2 3 4 5 6 ... 46 47

Sommario

Pagina 1 - Figure 1. Final web page

ColdFusion MX 7 Getting Started Experience Tutorial Page 1 of 47 Steps for Building Dynamic Pages This document outlines step-by-step directions for

Pagina 2

ColdFusion MX 7 Getting Started Experience Tutorial Page 10 of 47 Figure 14. The index.htm page in Code view There are two rows of data with thre

Pagina 3

ColdFusion MX 7 Getting Started Experience Tutorial Page 11 of 47 Figure 15. Inserting a table row in Design view 4. When the dialog box appears

Pagina 4 - ColdFusion as the server

ColdFusion MX 7 Getting Started Experience Tutorial Page 12 of 47 Figure 17. The new row 6. Open the images directory in the Files panel to the

Pagina 5 - Figure 7. Working locally

ColdFusion MX 7 Getting Started Experience Tutorial Page 13 of 47 Figure 18. Dragging the image to the first cell of the second row 8. Now that

Pagina 6

ColdFusion MX 7 Getting Started Experience Tutorial Page 14 of 47 9. Enter the remaining text for that artwork: Bowl of Flowers Artist: Jeff Baclaw

Pagina 7 - Figure 9. Possible server

ColdFusion MX 7 Getting Started Experience Tutorial Page 15 of 47 Figure 21. Complete row of data inserted 11. Switch to Code view to review how

Pagina 8

ColdFusion MX 7 Getting Started Experience Tutorial Page 16 of 47 STEP 4: Connecting the Database to ColdFusion There are two ways to register the da

Pagina 9 - Figure 13. The index.htm

ColdFusion MX 7 Getting Started Experience Tutorial Page 17 of 47 4. Notice that the page was renamed to index.cfm. Save it. Figure 25. index.htm

Pagina 10

ColdFusion MX 7 Getting Started Experience Tutorial Page 18 of 47 Figure 27. Enter the RDS password Learning Point: Administrator and RDS passw

Pagina 11 - Figure 16. Inserting a row

ColdFusion MX 7 Getting Started Experience Tutorial Page 19 of 47 Figure 29. Choose to add a database using the Microsoft Access Unicode driver 9

Pagina 12

ColdFusion MX 7 Getting Started Experience Tutorial Page 2 of 47 slideshows illustrate the relationship between ColdFusion and Dreamweaver MX 2004, a

Pagina 13 - Figure 19. Bowl of Flowers

ColdFusion MX 7 Getting Started Experience Tutorial Page 20 of 47 Figure 32. Drill down into the details of the new data source registration to see

Pagina 14

ColdFusion MX 7 Getting Started Experience Tutorial Page 21 of 47 Figure 33. ColdFusion Administrator login screen 3. In the left menu, click th

Pagina 15 - Figure 22. HTML data

ColdFusion MX 7 Getting Started Experience Tutorial Page 22 of 47 Figure 35. Naming the data source profile and selecting a database driver Learn

Pagina 16

ColdFusion MX 7 Getting Started Experience Tutorial Page 23 of 47 Figure 36. Clicking the Browse server button to locate the database 7. Browse

Pagina 17 - Figure 26. Confirm testing

ColdFusion MX 7 Getting Started Experience Tutorial Page 24 of 47 Figure 38. Submitting the new profile that connects the database to the cftutorial

Pagina 18

ColdFusion MX 7 Getting Started Experience Tutorial Page 25 of 47 Figure 40. Saving the index.htm page as a ColdFusion page Saving a file as a C

Pagina 19

ColdFusion MX 7 Getting Started Experience Tutorial Page 26 of 47 Learning Point: Database case sensitivity The column and table names in the precedi

Pagina 20 - Figure 32. Drill down into

ColdFusion MX 7 Getting Started Experience Tutorial Page 27 of 47 Learning Point: Joining data between database tables The statement you created sele

Pagina 21

ColdFusion MX 7 Getting Started Experience Tutorial Page 28 of 47 Learning Point: More about SELECT and WHERE clauses The ARTISTID is not necessary i

Pagina 22 - Figure 35. Naming the data

ColdFusion MX 7 Getting Started Experience Tutorial Page 29 of 47 Figure 46. The SQL statement shows in the browser The SQL statement you created

Pagina 23

ColdFusion MX 7 Getting Started Experience Tutorial Page 3 of 47 Figure 2. The Dreamweaver MX 2004 interface 2. Select Site > Manage Sites fro

Pagina 24

ColdFusion MX 7 Getting Started Experience Tutorial Page 30 of 47 stripped out of the HTML page so that the browser never sees any ColdFusion code. F

Pagina 25

ColdFusion MX 7 Getting Started Experience Tutorial Page 31 of 47 Learning Point: ColdFusion code never reaches the browser All CFML is stripped out

Pagina 26

ColdFusion MX 7 Getting Started Experience Tutorial Page 32 of 47 7. Since you have verified that the data is being retrieved from the database, you

Pagina 27 - Figure 44. Joining the Art

ColdFusion MX 7 Getting Started Experience Tutorial Page 33 of 47 Learning Point: Deconstructing the query variable syntax Keep in mind the following

Pagina 28

ColdFusion MX 7 Getting Started Experience Tutorial Page 34 of 47 </tr> </table> 12. Save and browse the index.cfm page. You might get a

Pagina 29

ColdFusion MX 7 Getting Started Experience Tutorial Page 35 of 47 The price is not formatted correctly and the number 1 appears instead of the word S

Pagina 30

ColdFusion MX 7 Getting Started Experience Tutorial Page 36 of 47 Learning Point: cfoutput tag placement The placement of the cfoutput tags is signif

Pagina 31 - Figure 49. Query result set

ColdFusion MX 7 Getting Started Experience Tutorial Page 37 of 47 Learning Point: Conditional processing Now that you have successfully displayed all

Pagina 32

ColdFusion MX 7 Getting Started Experience Tutorial Page 38 of 47 The cfif tag in this case translates to “if the current row being processed from th

Pagina 33 - Figure 50. Variables don’t

ColdFusion MX 7 Getting Started Experience Tutorial Page 39 of 47 Figure 55. The HTML reflects the three displayed columns ColdFusion MX 7 is sma

Pagina 34

ColdFusion MX 7 Getting Started Experience Tutorial Page 4 of 47 Figure 5. Site Definition wizard 5. Make sure Yes, I want to use a server techno

Pagina 35 - Figure 53. The query

ColdFusion MX 7 Getting Started Experience Tutorial Page 40 of 47 Learning Point: Boolean values and cfif Boolean variables store true (1) or false (

Pagina 36

ColdFusion MX 7 Getting Started Experience Tutorial Page 41 of 47 Figure 58. The art pieces are displayed in alphabetical order, with just one addit

Pagina 37

ColdFusion MX 7 Getting Started Experience Tutorial Page 42 of 47 Figure 59. Selecting a new ColdFusion component document Learning Point: ColdFu

Pagina 38

ColdFusion MX 7 Getting Started Experience Tutorial Page 43 of 47 Figure 61. Saving the page as art.cfc 3. Modify the default CFC template to be

Pagina 39

ColdFusion MX 7 Getting Started Experience Tutorial Page 44 of 47 7. Cut the query from the index.cfm page and paste it into the getArtwork function

Pagina 40

ColdFusion MX 7 Getting Started Experience Tutorial Page 45 of 47 Figure 63. Viewing all components in the Components panel This list shows all o

Pagina 41 - Figure 58. The art pieces

ColdFusion MX 7 Getting Started Experience Tutorial Page 46 of 47 Figure 65. Viewing only the getArtwork() function in the art CFC Learning Point

Pagina 42

ColdFusion MX 7 Getting Started Experience Tutorial Page 47 of 47 16. If you leave the returnvariable attribute named getArtworkRet, you need to cha

Pagina 43 - Figure 61. Saving the page

ColdFusion MX 7 Getting Started Experience Tutorial Page 5 of 47 Figure 7. Working locally Learning Point: Understanding the directory structure

Pagina 44

ColdFusion MX 7 Getting Started Experience Tutorial Page 6 of 47 Figure 8. Setting the path for viewing your files through a browser window Learn

Pagina 45

ColdFusion MX 7 Getting Started Experience Tutorial Page 7 of 47 Learning Point: Possible error message When you test, you might end up with an error

Pagina 46

ColdFusion MX 7 Getting Started Experience Tutorial Page 8 of 47 Figure 10. You are not moving files to a remote server 11. Click Next to see the

Pagina 47 - Next Step

ColdFusion MX 7 Getting Started Experience Tutorial Page 9 of 47 Figure 12. The Files panel contains the site files STEP 3: Starting With Static H

Commenti su questo manuale

Nessun commento