18-06-2012, 04:31 PM
Welcome to CFML
CFML.ppt (Size: 187.5 KB / Downloads: 37)
Introduction to ColdFusion
ColdFusion is:
Markup language
A leading Server-Side Web Application Development System
The leading rapid development platform for the web
Very easy to learn and to use
OS platform independent
On the web there are 2 classes of web technologies: server-side and client-side
Client-side technologies run in a users browser – Flash, JavaScript, Java Applets, etc.
Server-side runs on a central server – ColdFusion, ASP, ASP.NET, Perl, PHP, etc.
Static Web Architecture – user sends an HTTP request to a web server which then returns HTML (along with any client-side technology code) back to the browser for parsing
Dynamic Web Architecture – user sends an HTTP request for a dynamic page to a web server. The web server routes the request to the Application Server which parses the server-side technology instructions and sends the resulting text back to the browser for parsing.
ColdFusion files have a .cfm extension
CFML tags have a similar format to HTML tags
The web server hands any request for a .cfm page to the ColdFusion server for processing
The ColdFusion server looks through the contents of the page for instructions and ignores all other text (text, HTML, and other client-side technologies may be used in CF pages as the CF Server ignores them and they are sent back to the browser along with the dynamic page output)
Code Basics
ColdFusion pages are written in CFML – ColdFusion Mark-up Language
CFML is:
The ColdFusion Markup Language (CFML) looks very similar to HTML or XML
A ColdFusion page generally has a mix of HTML and ColdFusion tags, and may contain other tags as well
CFML tags are enclosed in angle brakets(< and >)
Variables in CF:
ColdFusion is weakly typed
Are case-insensitive
Are type less
consist of letters, digits, underscores, and dollar signs
cannot begin with a digit
Exist for the duration of a request and are then destroyed
Code Basics
CFML not only has tags, but functions as well. There are over 70 tags and over 200 functions in the CFML language.
A few types of functions:
Date manipulation/formatting
Array/structure manipulation
String manipulation
List manpulation
Mathematic operations
Etc.
Database Integration
ColdFusion uses Java Database Connectivity (JDBC) drivers to connect with databases
JDBC drivers translate SQL (Structured Query Language) commands to native binary code that a database understands, pass that binary code to a datasource for execution, and return any returned resultset to the ColdFusion page that invoked it.
A datasource is a “named connection” (alias) for a database – it stores the database name, location, server name, login and password, etc.