CFML Enhancements in CF10
Presented by
Yadagiri Talada.
What will we discuss?
•

Closures
–

Inline with Arrays, Lists and Structures

•

OnAbort event in Application.cfc

•

run...
Closures
●

●

"An expression (typically a function) that can
have free variables together with an
environment that binds ...
Uses of closures
●

Creates Generic functions.

●

Mostly In-line supports.

●

Defines new UDF inside another UDF.

●

●
...
Arrays with Inline
•

arrayEach()

•

arrayFind()

•

arrayFindAll()

•

arrayFilter()

•

arraySort()
Lists and structures with Inline
•

listFilter()

•

structEach()

•

structFilter()
-------------------------------------...
runonce attribute
•

•

CF10 allows new attribute runonce for cfinclude.
This attribute ensures that no matter how many
ti...
onabort event
●

●

●

CF10 allows new event "onabort".
Currently executing file name is passed as an
argument for this ev...
onabort event example
●

test.cfm contains cfabort

●

test_noabort.cfm not contains cfabort

●

test_cflocation contains ...
FORM Fields with same name
●

●

●

CF10 allows to save multiple values in the list
format for multiple check boxes having...
Component Updates
●

●

Implicit constructors : we can now pretend that our
component has a constructor-an implicit
constr...
Query functions Updates
●

queryNew()

●

queryAddNewRow()

●

Used particularly for self made queries.

●

Used to create...
Q&A

Thanks All
Upcoming SlideShare
Loading in …5
×

CFML Enhancements in ColdFusion 10

1,043 views
937 views

Published on

This session explains the - CFML enhancements in ColdFusion 10

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,043
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

CFML Enhancements in ColdFusion 10

  1. 1. CFML Enhancements in CF10 Presented by Yadagiri Talada.
  2. 2. What will we discuss? • Closures – Inline with Arrays, Lists and Structures • OnAbort event in Application.cfc • runonce attribute for cfinclude • Multiple FORM fields with same name • Component Updates • queryNew() and queryAddRow()
  3. 3. Closures ● ● "An expression (typically a function) that can have free variables together with an environment that binds those variables (that 'closes' the expression)" - Lasse Nielsen A closure, a function itself, can be created by another function. The top-level function closes the inner function and returns it to the rest of the document.
  4. 4. Uses of closures ● Creates Generic functions. ● Mostly In-line supports. ● Defines new UDF inside another UDF. ● ● Used to build dynamic functions, and allows inline functions to alter application behavior. Can creates functions as an arguments.
  5. 5. Arrays with Inline • arrayEach() • arrayFind() • arrayFindAll() • arrayFilter() • arraySort()
  6. 6. Lists and structures with Inline • listFilter() • structEach() • structFilter() ------------------------------------------------------------- • isClosure() • isCustomFunction()
  7. 7. runonce attribute • • CF10 allows new attribute runonce for cfinclude. This attribute ensures that no matter how many times you run <cfinclude>, it will actually include the template only once. • • Script based version of <cfinclude> also supports this feature.
  8. 8. onabort event ● ● ● CF10 allows new event "onabort". Currently executing file name is passed as an argument for this event. This event will be fired of below three cases. – <cfabort> – <cfcontent> – <cflocation>
  9. 9. onabort event example ● test.cfm contains cfabort ● test_noabort.cfm not contains cfabort ● test_cflocation contains cflocation tag with test_noabort.cfm file Events fired When test.cfm loads → onrequestStart, onabort test_noabort.cfm → onrequestStart, onrequestEnd test_cflocation.cfm → onrequestStart, onabort test_noabort.cfm → onrequestStart, onrequestEnd
  10. 10. FORM Fields with same name ● ● ● CF10 allows to save multiple values in the list format for multiple check boxes having the same name. Where as for text boxes it will store in the form of an array. But for this we need to set this.sameformfieldasarray = true in Application.CFC
  11. 11. Component Updates ● ● Implicit constructors : we can now pretend that our component has a constructor-an implicit constructor-even when it doesn't. This feature allows us to quickly set values with out having to actually write a constructor. Method chaining:This chaining feature allows us to call one method on a CFC and then call another method immediately after it, in the same line of code. This works for properties with accessors turned on and for methods that set values in CFC.
  12. 12. Query functions Updates ● queryNew() ● queryAddNewRow() ● Used particularly for self made queries. ● Used to create fake data.
  13. 13. Q&A Thanks All

×