Entries for month: June 2009

Coldfusion 9 - new tags

ColdFusion9 No Comments »

The below list of tags are added in the coldfusion 9.

Cfbutton
Cfcontinue
Cffileupload
Cffinally
Cfimap
Cfmap
Cfmapitem
Cfmediaplayer
Cfmessagebox
Cfprogressbar
Cfsharepoint
Cfspreadsheet

Cfpdf - New actions [ optimize, addheader, addfooter, removeheaderfooter, transform ...]

Coldfusion 9 - Bird's view

ColdFusion9 No Comments »

In Coldfusion 9, lot of new features are added.Definitely CF 9 will rock you. I will point out some of those features here.

CFML Enhancements
   New Server.cfc component introduced, we can configure this in CF Administrator.
   New onServerStart method for application.cfc
   Nested CFTRANSACTION
   CFCONTINUE, I am really waiting for this tag. Using this we can skip current loop iteration.
   Assignment chaining Eg. a = b = c
   Direct access to elements of returned arrays.It will help us to call functions as chain. Eg. myFunction()[x]
   Ternary operators will help you to write simple if else conditional assignments Eg. a = (b < c) ? b : c

CFSCRIPT Enhancements
   Full language support for CFSCRIPT, Now we can write every thing (which possible in CFML tags - query also) inside cfscript.
   <cfabort> - abort ["message"]
   <cfexit> - exit ["methodName"]
   <cfinclude> - include "template"
   <cfparam> - param [type] name [=defaultValue]

IMAP - Now we can access gmail through CF :)

Spreadsheet & PowerPoint Integration
   New 2 tags are introduced for office package integration.( CFSPREADSHEET, CFPRESENTATION )
   Create, Read & Merge Spreadsheets
   Compatible with Excel 97, 2000, 2003, 2007, 2008 & Open Office Spreadsheets
   Generate PPT files from CFML/HTML content
   Convert PPT to HTML or Flash
   Compatible with PowerPoint 97, 2000, 2003, 2007, 2008 & Open Office Presentations

Database to Code (ORM)
   We can interact with database without writing SQL & build database independent applications.
It is same as Hibernate framework. It will reduce 2 frameworks(transfer, Reactor) from my learning queue

Lucene Solr
   New Full-Text Search Engine with CFSEARCH/CFINDEX functionality

Exposed Service Layer (CFaaS)
   Direct access to ColdFusion services. It will be help non cf developers to use Coldfusion file upload support, Document Services (CFDOCUMENT), PDF Utilities (CFPDF), Image Manipulation (CFIMAGE), Mail (CFMAIL) and Pop (CFPOP). This services will be available as SOAP & AMF. So flash & flex developers can directly use AMF format service.

RIA
   AS3 / MXML Libraries for Adobe Flex
   Consumer CF Services
   High-speed Flash Remoting
   AS3 Data Persistence Library for Adobe AIR
   Online / Offline Data Synchronization

Enhanced UI Controls
   I think CF 8 using EXTJS 1.0 version for its ajax & UI tags. In CF 9,  ExtJS 3.0+ version is included which has lot of cool features like Multi-File Upload, Enhanced Data Grid, Progress Indicator, Message Box Sliders, Accordion Layouts......

CFIDE
We can manage settings like Datasources, Mappings, etc for multiple servers

Coldfusion interview Questions with answers Part 5

ColdFusion No Comments »

85. How can you connect with database from Coldfusion?
      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.

90. How can you create Tab strip?

    Coldfusion introduced easy to use AJAX UI elements. cflayout and cflayoutarea tags used to create tab strips.

<cflayout type="tab">
    <cflayoutarea title="Tab 1">
        I am normal tab content
    </cflayoutarea>
    <cflayoutarea title="Tab 2" selected="true">
        This tab selected at page load
    </cflayoutarea>
    <cflayoutarea title="Tab 3" disabled="true">
        you can't see me, bcz I am in disabled tab
    </cflayoutarea>
    <cflayoutarea title="Tab 4" closable="true">
        U can kill :) (close) me
    </cflayoutarea>
</cflayout>

91. What is Flash form?
     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 accordion-style and multiple-tab form panes and automatic element positioning.
     You can also display cftree, cfgrid, and cfcalendar form elements as Flash

92. How can you show the report in PDF?
CF Report builder is professional reporting tool coming with CF. CF 8.0.1 contains build in report builder.
In earlier releases, this report builder available as separate installable. You can find the downloads below URL
http://www.adobe.com/support/coldfusion/downloads_updates.html
There have been many software packages that offer these types of solutions, including Crystal Reports, Actuate
CFReport tag used to integrate the Report builder templates into HTML & Pdf reports. Format attribute of cfreport tag used to show the reports into PDF.

<cfreport template="userList.cfr" query="users" format="PDF" title="Sales Department Employees" />

93. What is SaveContent?
Used to save the generated content to a variable, including the results of evaluating expressions and executing custom tags.
This tag requires an end tag.
Main usage of savcontent is cache partial pages.

94. What is CFFlush?
The first occurrence of this tag on a page sends back the HTML headers and any other available HTML. Subsequent cfflush tags on the page send only the output that was generated after the previous flush.
When you flush data, ensure that enough information is available, as some browsers might not respond if you flush only a small amount. Similarly, set the interval attribute for a few hundred bytes or more, but not thousands of bytes.
Use the interval attribute only when a large amount of output will be sent to the client, such as in a cfloop or a cfoutput of a large query. Using this form globally (such as in the Application.cfm file) might cause unexpected errors when CFML tags that modify HTML headers are executed.
Caution: Because the cfflush tag sends data to the browser when it executes, it has several limitations, including the following: Using any of the following tags or functions on a page anywhere after the cfflush tag can cause errors or unexpected results: cfcontent, cfcookie, cfform, cfheader, cfhtmlhead, cflocation, and SetLocale. (These tags and functions normally modify the HTML header, but cannot do so after a cfflush tag, because the cfflush sends the header.) Using the cfset tag to set a cookie anywhere on a page that has a cfflush tag does not set the cookie in the browser. Using the cfflush tag within the body of several tags, including cfsavecontent, cfquery, and custom tags, cause errors. If you save Client variables as cookies, any client variables that you set after a cfflush tag are not saved in the browser.
Note: Normally, the cferror tag discards the current output buffer and replaces it with the contents of the error page. The cfflush tag discards the current buffer. As a result, the Error.GeneratedContent variable resulting from a cferror tag after a cfflush contains any contents of the output buffer that has not been flushed. This content is not sent to the client. The content of the error page displays to the client after the bytes that have been sent.

95. What is the difference between HTMLEditFormat and HTMLCodeFormat?
    Both are used to replaces special characters in a string with their HTML-escaped equivalents
    Difference between HTMLCodeFormat function and HTMLEditFormat is that HTMLEditFormat does not surround the text in an HTML pre tag

96. What is URLFormat?

Part A:
  This is simply the http path to your server and the directory.
  It contains 3 components,
     The protocol to use to retrieve the object. (Eg, Http, Https)
     DNS name or an IP address Web server
     The host machine port on which the Web server is running. If omitted, the specified protocol's default port is used; for Web servers, this port is 80.
Part B:
  This is the name of application or file to retrieve or the script to execute
Part C:
  This is the most important part of the URL also known as the query string.
  It is started by the question mark "?".
  Individual parameters, are separated by the ampersand "&".

97. What is CFAbort?
Stops the processing of a ColdFusion page at the tag location.
ColdFusion returns to the user or calling tag everything that was processed before the cfabort tag.
You can optionally specify an error message to display using showError attribute.
The tag is often used with conditional logic to stop processing a page when a condition occurs.

98. What is the difference between CFAbort and CFBreak?
Please see Answer:101

99. What is CFQueryparam? What is the use?
It separates parameters from the surrounding SQL.
It allows the database’s SQL analyzer to more efficiently handle the SQL statement
It validates data for the parameters which used to avoid SQL injection attacks.
One limitation of cfqueryparam in earlier versions.
 you can’t use the cachedwithin or cachedafter attributes of the cfquery tag when using the cfqueryparam tag.
 CF 8 will allow this

100. How can you create dynamic query?
   Dynamic SQL is a SQL code that your program generates using variables before the SQL is executed.
   In coldfusion, CFQUERY give full provision to write all conditional logic & looping to derive the dynamic sql statement to execute.

   You can use dynamic SQL to accomplish tasks such as adding WHERE clauses to a search based on the fields that the user filled out on a search criteria page.

Coldfusion 9 Bolt meeting at bangalore

ColdFusion9 , User Group 3 Comments »

       Yesterday i went to Bangalore Flex User Group Meeting at adobe. Mrinal Wadhwa presented about Flex 4 Component Lifecycle  . It was 3 hours presentation. little bit boring for me as a newbie developer to flex  :). But i got clear idea about prcess beyond the screen. Definately it will help me to write an efficient flex component.

       After meeting, I had short discussion with adobe CF team for Bangalore CF user group future activities. Adobe is willing to conduct CF 9, Bolt introduction meeting. Adobe engineering team will ready to give brief introduction about new features of CF 9 & bolt in their bangalore office. It will be based upon the user's ( who are all ready to participate ) response. Last date for the response is next week friday ( June-26 ). Please respond to this thread or contact me at j_saravanamuthu [at] yahoo [dot] com.

Product names of Centaur and Bolt

ColdFusion9 No Comments »

Yesterday Adobe announce official product names for Centaur (Code name of next version CF) & Bolt (Dedicated IDE for CF's code name). Adobe Code names are always freaks as Ray said. Eg. ColdFusion 8's Codename is Scorpio. Please have a look at ben nadel's Scorpio eCard  ;) .

Bolt's product name is : coldfusion builder (Same as flash builder).
Centaur's product name is : coldfusion 9

Ref : @ladobe

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds