ColdFusion MX and the Client-Server Relationship

 < Day Day Up > 



ColdFusion MX and the Client–Server Relationship

If you installed the special development edition of ColdFusion along with the other Macromedia Studio products, you probably noted that unlike Flash or Dreamweaver, ColdFusion doesn't have its own dedicated graphic interface. That is, ColdFusion isn't a traditional development application in which you open a GUI and start creating pages. Instead, it's a program that runs in conjunction with your Web server (or a Web server on a remote host). When ColdFusion is present on a Web server, it gives designers and developers the ability to create applications — Web sites that do much more than look nice.

Note 

If you didn't install ColdFusion with the other Studio products, don't worry. You learn more about installation and configuration in the next chapter.

To understand how ColdFusion works as a server, start by considering a typical Web page. When a user types a URL into his or her browser (the client) and clicks the Go button, the browser sends a request for a page to a Web server somewhere on the Internet (the server). The server accepts the request and returns the requested HTML page.

However, if you've ever worked with a basic CGI program, such as a "mailto" form processor, you know that URLs don't always have to call plain HTML pages. They can also call programs, such as CGI applications or applets written in Perl, C, or Java. These programs are designed to perform a series of actions and then, typically, return the results of those actions to the user as HTML that's visible in a browser.

For example, consider that basic mailto CGI program: It takes the user's input from a form, formats it into an e-mail and then sends the mail off to a predesignated address. Now imagine you're working for a client who asks you to expand the basic mailto function so that a registrant's name and e-mail address are archived in a system database at the time the form is submitted. It's likely that the original mailto program is written in Perl or C, both of which are powerful languages, but which make it difficult to customize even a basic program like mailto unless you happen to have programming knowledge to match your designer's skills.

Enter ColdFusion, which is designed to give nonprogrammers the ability to build basic programs like mailto, as well as more sophisticated programs that can drive entire Web sites — all without the developer having to learn a complex programming language. ColdFusion accomplishes this by installing itself as a companion program to your Web server software. When your server receives a request for a plain HTML page, ColdFusion does nothing. However, when it gets a request for a page ending with the extension .CFM (known as a template in ColdFusion jargon), it processes the program instructions on the page and returns the results to the user, usually as HTML visible in his or her browser.



 < Day Day Up > 



Macromedia Studio MX Bible
Macromedia Studio MX Bible
ISBN: 0764525239
EAN: 2147483647
Year: 2003
Pages: 491

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net