introduction to coldfusion yu fu 2003 mec candidate

26
Introduction to ColdFusion Yu Fu 2003 MEC Candidate

Upload: chloe-eaton

Post on 31-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

Introduction to ColdFusion

Yu Fu2003 MEC Candidate

Page 2: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

2

Agenda What is ColdFusion Core Components & Features Some Statistics Limitations Latest Development Conclusion

Page 3: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

3

What Is ColdFusion A commercial Web application development

environment Created by Allaire Corp., owned by

Macromedia Inc. since 2001 Available on Windows, Unix and Linux Three editions

Developer, Standard, Enterprise Not cheap

$1000 plus for standard edition $4000 plus for enterprise edition

Page 4: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

4

Competitors CGI ASP PHP J2EE .NET

Page 5: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

5

Core Components ColdFusion Application Server ColdFusion Administrator ColdFusion Studio ColdFusion Markup Language

(CFML)

Page 6: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

6

ColdFusion Application Server A middleware between Web server

and other servers like database, email, LDAP, FTP, etc.

The engine/processor of CFML Parse ColdFusion application

pages, which contain CFML and HTML tags and saved with file extension .cfm, to generate dynamic HTML documents

Page 7: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

7

How It Works

(Source: Macromedia® ColdFusion® MX Development By Eric Ladd )

Page 8: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

8

Features page cashing for short response

time Load balancing for scalable

performance and high throughput Automatic failover for reliability and

availability Full-text indexing and searching Extensive support for third-party

servers

Page 9: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

9

ColdFusion Administrator It is a Web application written in CFML! A administration tool to configure and

maintain ColdFusion Application Server Set up database source (DSN) Schedule ColdFusion application page

execution Manage debug, session, security settings Checking server logs

Page 10: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

10

Page 11: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

11

ColdFusion Studio An IDE (Integrated Development

Environment) tool Make ColdFusion application

development much easier for developers The part I like best

Tons of CFML code examples Detailed documentation on CFML, HTML, CSS,

etc. Global search and change

Page 12: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

12

Page 13: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

13

CFML: ColdFusion Markup Language

A server-side scripting language to create ColdFusion application pages (.cfm)

It is a language created from XML Tag based

All tags start with CF Intuitive and easy to learn

if you know HTML

Page 14: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

14

Some CFML tags

CFSET Defines a variable.

CFOUTPUT Displays a variable.

CFIF CFELSEIF CFELSE

Used to create IF-THEN-ELSE constructs.

CFLOOP Repeats a set of instructions based on a set of conditions.

CFMAIL Assembles and posts an email message.

CFQUERY Passes SQL to a database.

CFCOOKIE Defines and sets cookie variables.

(Source: ColdFusion Documentation)

Page 15: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

15

A Basic CFML Example<HTML><HEAD><TITLE>Hi</TITLE></HEAD><BODY><STRONG>Message</STRONG><!--- Set a variable ---> <CFSET Name=“Fu Yu"><!--- Display result ---> <CFOUTPUT>Hello, #Name#!</CFOUTPUT></BODY></HTML>

<HTML>

<HEAD>

<TITLE>Hi</TITLE>

</HEAD>

<BODY>

<STRONG>Message</STRONG>

Hello, Fu Yu!

</BODY>

</HTML>

Original CFML Script Result HTML document

Page 16: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

16

CFML Cont’ Extensive features to build powerful

Web applications Email FTP HTTP LDAP Full-text indexing/searching Encryption etc.

Page 17: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

17

An Email Example<HTML><HEAD><TITLE>Sending a simple email</TITLE></HEAD><BODY><CFMAIL FROM="[email protected]" TO="#URL.email#" SUBJECT="Sample email">This is a sample email to show basic email capability.</CFMAIL>

<H1>Sample email</H1>  The email was sent. </BODY></HTML>

(Source: ColdFusion Documentation)

Page 18: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

18

CFML Cont’ Strongest point is database

integration The least code amongst peers Dirty works are handled by

ColdFusion Application Server

Page 19: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

19

A Database Query Example<HTML><HEAD><TITLE>Employee List</TITLE></HEAD><BODY><H1>Employee List</H1>

<CFQUERY NAME="EmpList" DATASOURCE="CompanyInfo"> SELECT FirstName, LastName, Salary, Contract FROM Employees</CFQUERY>

<CFOUTPUT QUERY="EmpList">#FirstName#, #LastName#, #Salary#, #Contract#<BR></CFOUTPUT></BODY></HTML>

(Source: ColdFusion Documentation)

Page 20: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

20

CFML Cont’ Extensible through custom tags

Java C++ Delphi CFML etc.

Page 21: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

21

Some Statistics More than 125,000 ColdFusion servers

deployed An estimated base of over 300,000 developers Purchased by more than 10,000 organizations,

including 75 of the Fortune 100 companies Used to develop more than 19.7 million

ColdFusion pages (Google) Global network of more than 360 user groups

(Source: MacroMedia Inc.)

Page 22: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

22

Limitations It is not free Business logic mixed with presentation

markup So do CGI, PHP, ASP Not a issue for small and medium sized Web

applications hard to maintain and enhance when logic

becomes too complex J2EE and .NET do a better job here

Page 23: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

23

Latest Development ColdFusion Application Server For J2EE

A Java application which can be deployed on J2EE platform such as WebLogic, WebSpere, JRun, Sun ONE, JBoss, etc

Compile ColdFusion application pages into Java byte codes

Enhanced CFML to support JSP, Servlet and Web Services

Latest version: MX 6.1

Page 24: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

24

Conclusion ColdFusion is a easy-to-use and

powerful platform to build small to medium sized Web applications with probably the shortest time to market

ColdFusion is still evolving, ColdFusion + J2EE maybe a good bet

Page 25: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

25

References ColdFusion Documentation inside ColdFusion Studio Macromedia® ColdFusion® MX Development by Eric

Ladd http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?ColdFusion http://www.webopedia.com/TERM/C/Cold_Fusion.html http://www.macromedia.com/software/coldfusion ColdFusion MX and the J2EE Architecture White Paper.

http://www.macromedia.com/software/coldfusion/whitepapers/pdf/6_1/cfmx61_j2ee_arch_wp.pdf.

Page 26: Introduction to ColdFusion Yu Fu 2003 MEC Candidate

26

Q&A