Download - Week 2

Transcript
Page 1: Week 2

Week 2

IBS 685

Page 2: Week 2

Static Page Architecture

• The user requests the page by typing a URL in a browser

• The Browser requests the page from the Web Server

• The Web Server sends the page to the browser in the form of HTML

• The browser interprets the HTML and displays the page to the user.

Page 3: Week 2

Web Servers

• Web Servers send requested pages to browsers – Reply to requests from browsers using HTTP

– Perform server side processing using these languages • CFML

• ASP (Microsofts Active Server pages)

• Perl

• Java

Page 4: Week 2

Understanding Web Applications

• Web Servers Just serve• Web servers are simple applications- they sit and

wait for requests that they attempt to fulfill as soon as they arrive.

• Web servers do not – let you interact with a database;– they don’t let you personalize web pages;– they don’t let you process the results of a users form

submission

• All they do is serve pages.

Page 5: Week 2

So how do you extend your server to do all the things just

listed?

Page 6: Week 2

Web Application Servers

• That is where Web Application servers come into play.

• A web application server is a piece of software that extends the Web Server, enabling it to do things it could not do by itself.

Page 7: Week 2

Application server

• When a web server receives a request from a Web Browser, it looks at that request to determine whether it is a simple web page or a page that needs processing by a web application server.

• Cfm extension• If so then the web server passes it to the

appropriate Web application server and returns the results that it gets back

Page 8: Week 2

What is Cold Fusion

• It is a complete application development system• The components include

– CF application server

– Dreamweaver

• CF usually resides on the same computer as your web server, enabling a web server to do things it would not normally know how to do.

Page 9: Week 2

CFML

• Cold Fusion is two distinct technologies– The CF Application server– The CFML language

• Cold Fusion’s power comes from its capable and flexible language. • CFML extends HTML by adding tags with the following

capabilities– Read and update data to, databases and tables– Create dynamic data-driven pages– Perform conditional processing– Populate forms with live data– Process form submissions– Generate and retrieve email messages– Interact with local files

Page 10: Week 2

CFML

• <Cfinclude>• <Cfoutput>• <Cfabort>• <Cfapplication>• <Cfcookie>• <Cfform>• <Cflocation>

• All ColdFusion tags begin with the letters CF

• CF tags were named very intelligently

• CFML tags can be freely mixed with the HTML tags in the page

• Each tag identifies a particular operation– Including block of code– Setting a variable

Page 11: Week 2

Book Files

• On the CD Rom that accompanies this book, in the OWS directory, you will find the sample application pages used in the chapters.

• You should store all the sample applications in a folder named OWS under the Web server root directory.

• Web Server root is located at – C:\CfusionMX7\wwwroot

Page 12: Week 2

Cold Fusion Administrator

• CF Application server has all sorts configuration and management options. – Some must be configured before features will work

(Connections to databases)

– Other options are configured if necessary.

• All these configuration options are managed via CFA. – You can access it from any computer with an internet

connection.

Page 13: Week 2

Always LOG OUT

• You should get in the habit of always logging out of the administrator when you are finished using it.

Page 14: Week 2

Using the CFA

• Creating an ODBC data source• For CF to interact with a database, a

connection to that database must be defined.• ODBC is is not a CF invention many

programs other than CF use ODBC. • Data sources are the ODBC connections.• Lets create a data source for the OWS

database.

Page 15: Week 2

Basic Development Configuration

Development Database

Development Server

ColdFusionDevelopers

Run a web server and Cold Fusion ServerHosts Web sites and CF Templates

Database on a separate machineMS SQL Server, Oracle

Page 16: Week 2

Dynamic Page Publishing with Cold Fusion

• The information is usually queried from a database and then displayed on the page

• Dynamic page processing is similar to that of static page processing with additional steps:


Top Related