In structure one can combine variables of different datatype in to a common data type Whereas arrays are sequentially stored values of the same datatype.
ColdFusion 9.0 has many benefits over older versions and to name few they are:
Coldfusion can be used as a service with out writing lines of code, we can get results by using: CFChart, Cfdocument, CFImage, CFmail, CFPDF and cfpop etc. And also these services can be sandboxed in order to give more security. Adobe AIR database synchronization. New AJAX controls are added. Server manager is a new feature by which from one access point we can manage several admin tasks of various servers. Also ColdFusion 9 allows you to create coldfusion component as a portlet.
While debugging is mainly used to debug the code and to see run time values. Especially for trouble shooting. How ever, once the programs are in production server, we can not debug, but to avoide users seeing all the error messages when a program unexpectedly failed and throwing errors, we can use error handling methods. TRY and CATCH is the best among them to handle any database related errors.
Here is your actual code…of coldfusion….
Write your message to the user in case of any error.
By using cffile tag, we can upload a file to the server.
A typical cffile syntax is:
When ColdFusion receives a request for an application page, it searches the page's directory for a file named Application.cfm. If one exists, the Application.cfm code is logically included at the beginning of that application page. If your application runs on a UNIX platform, which is casesensitive, you must spell Application.cfm with an initial capital letter.
Windows authentication introduced thorough "cfntauthenticate" tag cfcompile utility introduced which used for Sourceless deployment
All versions of ColdFusion prior to 6.0 were written using Microsoft Visual C++. CF MX 6.0 move to the Java based architecture. Major things introduced in CFMX (MX Matrix, Code name is NEO hero of Matrix).
I pointed out some of them below:
Application Time Out is the duration of the existence of an application, until it times out, if it is not accessed. Session Time Out is the duration of the existence protocols of a session until it times out, if it is not accessed.
Coldfusion introduced easy to use AJAX UI elements. cflayout and cflayoutarea tags used to create tab strips:
<cflayoutarea title="Tab 1">
I am normal tab content
<cflayoutarea title="Tab 2" selected="true">
This tab selected at page load
<cflayoutarea title="Tab 3" disabled="true">
you can't see me, bcz I am in disabled tab
<cflayoutarea title="Tab 4" closable="true">
U can kill :) (close) me
A server that exposes business logic to client applications through various protocols including HTTP, HTTPS, IIOS/SSL.
Eg: Sun Java Application server, weblogic server It takes care of important issues like Traction Management, Security, Database Connection Pooling, Clustering, Scalability,session management,load balancing,thread management and Messaging etc. A web server cannot provide these.
ColdFusion allows developers to reuse existing queries by running queries against them in memory. This gives you the advantage of being able to avoid the often costly performance hit of going back to the database to manipulate data that the application server has already recently called. A standard <cfquery> statement can be used to call a query variable in memory as though it were simply a table of data in an available data source. Query variables can even be joined, which provides interesting possibilities for joining data from disparate information sources.
Database manipulation tags (cfquery, cfstoredproc, cfinsert, cfupdate) have an attribute called datasource which used to identify/connect to a database. Data sources can be defined in CF administrator section.
SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
CREATE procedure [dbo].getDirector (
SELECT name FROM directors WHERE movie_id = @movie_id
SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
Absolute is from the absolute 0,0 position in the top left corner of the browser window. Relative is relative from the positioning of where the div is declared within the html body.
For XML to work, both sender and recipient must agree on an XML language, and all data must be well formed according to that language. WDDX is Macromedia's contribution to the XML community. It is an opensource XML DTD (Document Type Definition) that defines generic data types such as strings, arrays, structures, and recordsets. WDDX is an XML language that defines data not any specific implementation, but raw data itself. This can make data sharing via XML quick and painless (it doesn't require that an XML language be agreed upon).
Application.cfm page will be used to define application level variables, for example instead of declaring dsn variable in every query you use, you can define the variable in application.cfm page once and can use that variable in every ColdFusion page you use queries to retrieve data from database. We can definitely use more than one application.cfm pages, however, only the first application.cfm page that the ColdFusion server finds, will be used. Application.cfm page is not mandatory.
Session variables can be used to dump complex data structures like arrays and structures.But client variable are used only in case of simple variables.
Coldfusion component is a basic construction block for making structured, teared or scalable applications, it is made to process black boxes, for tractions and backend integration.
CFC can be instantiated as an object, using the <cfobject> tag.
In computing, ColdFusion is the name of a commercial rapid application development platform invented by Jeremy and JJ Allaire in 199@(The programming language used with that platform is also commonly called ColdFusion, though is more accurately known as CFML.) ColdFusion was originally designed to make it easier to connect simple HTML pages to a database, by version 2 (1996) it had become a full platform that included an IDE in addition to a "full" scripting language.
As of 2010, versions of ColdFusion (purchased by Adobe Systems in 2005) include advanced features for enterprise integration and development of rich Internet applications.
We can enable & disable client management as well as we can configure How & Where client variables need to be store
This.clientStorage="[Ur_datasource_name]" / "registry" / "cookie"
clientStorage="[Ur_datasource_name]" / "registry" / "cookie"
[Ur_datasource_name] Stored in ODBC or native data source. You must create storage repository in the Administrator. registry Stored in the system registry. cookie Stored on client computer in a cookie. Scalable. If client disables cookies in the browser, client variables do not work.
ColdFusion is implemented on the J2EE. J2EE is a standard, it is not a programming language. J2EE is an implementation of the Java programming language, but includes a number of Application Programming Interfaces (APIs) for connecting to databases, queuing messages, connecting to registries and naming and directory services. All of these APIs are used by coldfusion for many of its base services and other runtime services.
ColdFusion consists of following components:
The advantages are much easier Installation and Migration, it is compatible with each operating system and database, it has simpler learning process and accelerated development, has permissions to each J2EE library and this part of Adobe family being compatible with Flash, Flex, PDF, etc.
ColdFusion structures consist of keyvalue pairs. Structures let you build a collection of related variables that are grouped under a single name. A structure's key must be a string. The values associated with the key can be any valid ColdFusion value or object. It can be a string or integer, or a complex object such as an array or another structure. Because structures can contain any kind of data they provide a very powerful and flexible mechanism for representing complex data. check Structure functions here.
Cold Fusion is an example of a Common Gateway Interface application. The Common Gateway Interface is a mechanism to allow Web servers, which are designed to serve static documents, to receive dynamic output from programs and serve it as if it were static data.
Cold Fusion defaults to using server API modules instead of CGI to communicate between the Web Server and ColdFusion Application Server.
ColdFusion has many benefits over other web languages. The very first thing we need to discuss is, ColdFusion is the first web languages that has been developed to build web application (dynamic). After ColdFusion, PHP, and Microsoft’s asp .net were in the market. PHP is free and so many small companies and individual entrepreneurs use it. So php is widely used compared to others because it is free. Microsoft’s asp .net is next to it for mid to big size organizations as it give good support and of course the brand name also does the magic. ColdFusion though it is the first language from the rest, because of lack of publicity and cost, it is still not widely used. But below are the main benefits of ColdFusion over others. It is very easy to install and very easy to migrate from older version to new version. It does support all operating systems. It is very easy to learn because of its self explanatory code/tags.
Easy integration to other adobe products such as flex, adobe pdf, flash etc.. Good database support and works for all protocols.
No.Datasource Names For All The Database Tags Within CFTRANSACTION Must Be The Same. The workaround for the problem of CFTRANSACTION with different data source, Use same datasource in CFQUERY but inside the cfquery prefix the table with desired database in the query.
SELECT * FROM TableName
SELECT * FROM other.dbo.TableName
Coldfusion is like a Common Gateway Interface Application. This me it works like a mechanism that enables dynamic output to be received by web servers. Usually web servers use static data and now the dynamic data will be seen as static.
The OnRequestEnd.cfm page is processed after every page in the application, in the same way like Application.cfm performing prior to the application page code. OnRequestEnd.cfm and Application.cfm pages have to exist in the same directory that is used by Coldfusion for the present page. Only that directory isbeing searched.
Flash form is a form like ordinary HTML form, with flash format which run on flash player enabled browsers. Using cfform tag CF automatically generates the swf format form's Flash binary from your CFML code. Flash Forms can be used to create a better forms experience for your users. These features include accordionstyle and multipletab form panes and automatic element positioning. You can also display cftree, cfgrid, and cfcalendar form elements as Flash
Cookies are server specific simply stored variables stored in files in the browser's file system. It used to track state
For every language has its pros and cons. Q5 is wer for this also, But I will point out one or 2 advantages of CF over other languages.
Name, clientStorage, LoginStorage, ClientManagement, ApplicationTimeout, SetclientCcookies, SessionTimeout etc..
ColdFusion have the following main components:
Coldfusion has a beautiful feature called Query of Queries which is mainly used for improving performance of the application. Query of Queries is the result of an existing database query result.This will be done by using coldfusion “cfquery” tag and need to
specify dbtype = ‘query’.
where ColumnName = 'SomeValue'
(coldfusion FTP <cfftp>) : By using coldfusion <cfftp> tag, we can send data from local computer to the server and also retrieve the data from server to the local computer. By using Get file, we can retrieve data from server:
By usingPut file, we can send data to the server:
Coldfusion provides us many debugging options in order to trouble shoot a coldfusion program.
The important are:
CFDUMP, eg: <cfdump var="#abcd#">
CFABORT, eg: <cfabort>
On the debugging settings in coldfusion administrator. (you will see the lengthy debugging information at the bottom of the coldfusion result).
Yes. If the application page directory does not have an Application.cfm page, ColdFusion searches up the directory tree until it finds an Application.cfm page. If several directories in the directory tree have an Application.cfm page, ColdFusion uses the first page it finds. If the Application.cfm page is present in the directory tree (and has the required permissions set), you cannot prevent ColdFusion from including it.
ColdFusion processes only one Application.cfm page for each request. If a ColdFusion page has a cfinclude tag pointing to an additional ColdFusion page, ColdFusion does not search for an Application.cfm page when it includes the additional page.
Stored procedures give the best performance when it comes to putting application logic to the database side. They have the disadvantage of slowing down the performance and the development if their code is weak.
It provides a programmatic interface to the ColdFusion scheduling engine. It can run a CFML page at scheduled intervals, with the option to write the page output to a static HTML page. This feature enables you to schedule pages that publish data, such as reports, without waiting while a database traction is performed to populate the page.
Stored procedures abstract database logic from server side code. They also offer performance benefits in pushing application logic to the database side. The disadvantage is that if they are poorly written then they can hinder database performance and make development a little more obfuscated.
ApplicationTimeout : The time span an application will exist before it times out (if the application is not accessed in any way). This defaults to the value set in the ColdFusion administrator.
SessionTimeout : The time span a session will exist before it times out (if the application is not access in any way by that session's user). This defaults to the value set in the ColdFusion administrator.
using cfexecute tag, we can call the external exe files.Below example executes the Windows NT version of the netstat network monitoring program, and places its output in a file.
<cfexecute name = "C:WinNTSystem32netstat.exe"
arguments = "e"
outputFile = "C:Tempoutput.txt"
timeout = "1">
To Flush cached queries <cfobjectcache action="clear">
To Flush cached pages <cfcache action="flush">
A computer that delivers (serves up) Web pages. Every Web server has an IP address and possibly a domain name. For example, if you enter the URL http://www.domainname.com/index.html in your browser, this sends a request to the server whose domain name is domainname.com. The server then fetches the page named index.html and sends it to your browser. Any computer can be turned into a Web server by installing server software and connecting the machine to the Internet. There are many Web server software applications, including public domain software from NCSA and Apache, and commercial packages from Microsoft, Netscape and others.
For enterprise database management systems that support traction processing, instructs the database management system to treat multiple database operations as a single traction. It provides database commit and rollback processing. See the documentation for your database management system to determine whether it supports SQL traction processing.
isolation = "read_uncommitted|read_committed|repeatable_read"
savepoint = "savepoint name">
Presentation server (presentation layer), Application server, Web server and a database server. It has a J2ee web container that is the base of ColdFusion environment. And a ColdFusion runtime environment that will interprets the ColdFusion requests, and a database server.
The versions of Coldfusion older than 6 where developed with Microsoft Visual C++, version 6 is based on a Java type of construction. MX me Matrix, in this version the most important things implemented are: support for Linux and Mac, OOP, Verity Searches.