Blog

Day 15: ColdFusion 10 and CFC enhacement

Implicit constructor for CFC
ColdFusion10 now support initialize while instantiate the CFC by passing key-value pair or struct. This method will NOT work if your CFC has init() method or initMethod attribute in CFCOMPONENT added. To enable implicit constructor specify accessors=true in cfcomponent or you have setter function for properties defined. If you define setter = false or setter not defined then value for that property will not set instead it will call onMissingMethod defined for CFC.

Read More
By Pritesh
Comments(0)
Tags: ColdFusion, ColdFusion10, CFC
Day 14: ColdFusion 10 schedule enhancement task handler

Day 14 on ColdFusion 10, I haven't cover much in last 13 days but go deeper in functionality. Today I keep working with schedule task enhancement and research on event handler feature. This will let us define functions which will call on particular event. Following event/method supported in event handler CFC.

  • onTaskStart : Call every time when task start, If function return false will not execute schedule.
  • onMisFire : Call anytime schedule file misfire (other than schedule time) any how it only fire first time for me when I create schedule file and but later on manual call doesn't invoke.
  • onTaskEnd: Call execution of task end.
  • onError: Call on exception on task, either 404 or 500 error. P.S. This will not invoke in case of syntax error in your coldfusion page.
  • execute : ColdFusion 10 allow you to write code in cfc function instead of calling any URL, if you do not provide URL while creating schedule file then it will look for execute function in your event handler but URL will get priority if both available.
Read More
By Pritesh
Comments(0)
Tags: ColdFusion, ColdFusion10, Schedule task
Day 13: ColdFusion 10 & Schedule task chaining and mode

In my last post I have covered Group and list scheduler enhancement in ColdFusion 10. Today I have spent some time with event hander and other enhancement. In coldfusion 10 added new attribute mode which task application or server as value, this will let you specify task is server specific or application specific and default mode is server. Application specific task can be created from Application only and it will not be editable from ColdFusion administrator although you can run, pause or delete it from there.

Read More
By Pritesh
Comments(0)
Tags: ColdFusion, ColdFusion10, Schedule task
Day 12: ColdFusion and Schedule task list and group enhancement

In yesterday blog I have list out all new feature added in schedule task in ColdFusion 10. Now time to test it out, covering list, group feature in this post. While creating schedule we can put schedule in specific group and later you can pause all/resume all schedule in same group without firing individual command. And list option added in action attribute which list out all current schedules in query format.

Read More
By Pritesh
Comments(0)
Tags: ColdFusion, ColdFusion10, Schedule task
Day 11: ColdFusion and Schedule task enhancement.

Schedule task is something that I used lot and specially one of our clients love to get email periodically for different reports. In many case we get limited with ColdFusion 9 schedule task, like for one of schedule task require to reschedule on different time once executed and time vary per database transaction. Following are list of new feature in schedule task.

Read More
By Pritesh
Comments(0)
Tags: ColdFusion, ColdFusion10, Schedule task
Day 10 : ColdFusion 10 and Enhanced Java integration - part 3

Day 10 of my ColdFusion 10 month, seems that lot more functionality added in ColdFusion 10 and will not able to cover all in within 30 days with current busy schedule. Yesterday cover CFCProxy which you can use in java class to invoke ColdFusion component function but seems limitation is you can't call for coldfusion instance. This will be overcome with createDynamicProxy function.

Read More
By Pritesh
Comments(0)
Tags: ColdFusion, ColdFusion10, java
Day 9 : ColdFusion 10 and Enhanced Java integration - part 2

It's DAY 9 and I enjoyed last 8 days with ColdFusion 10 and as days pass my curiosity graph going high. In yesterday post discuss about how easy to use your java class/jar file within your project. But you may also want to use power of ColdFusion in Java class and this one is possible with use of CFCProxy. Well CFCProxy available since ColdFusion 7 ( I guess) but never get chance to look into this. 

I continue using previous post example to explain how to call ColdFusion component function within Java class.

Read More
By Pritesh
Comments(0)
Tags: ColdFusion, ColdFusion10, java
Day 8 : ColdFusion 10 and Enhanced Java integration

ColdFusion built on J2EE compliant technology and this allow you take advantage of integrate with J2EE component and ColdFusion 10 enhanced this capabilities. In previous version we are able to create object of Java classes, using JSP tag etc...etc. but there was pain with using custom java class as you may need to store class file into web_root/WEB_INF/classes folder and you need to restart ColdFusion server every time you update your class file. 

I am custom Java class in many places where ColdFusion has limited capabilities or need performance improvement. In past (In ColdFusion 8) we were building up PDF from bunch of photos and this was taking lots of time and memory. We just create custom java class that create PDF the way we want it and improve performance around 10 times. There is javaLoader project which let you execute your custom class without moving it to classes folder and restarting ColdFusion service. 

Read More
By Pritesh
Comments(2)
Tags: ColdFusion, ColdFusion10, java
Day 7 : ColdFusion 10 and Closure - part 2

Yesterday take look on Closure with ColdFusion, now its time to discover more on this. 

Closure can be defined as inline without giving name. You can treat like variable and assigned it to variable scope, array or struct element or function return value. for ex.

Read More
By Pritesh
Comments(0)
Tags: ColdFusion, ColdFusion10, closure
Day 6 : ColdFusion 10 and Closure

Wow, ColdFusion now support closure. I am fan of closure and heavily using it on JavaScript specially for ajax call's callback function. Closure is function within function which close all variables of outer function when returned/created. May be not pure theoretically true definition but this is how can I can define in practical term that I have used. 

In ColdFusion 10 documentation very simple example given to understand concept of Closure.

Read More
By Pritesh
Comments(0)
Tags: ColdFusion, ColdFusion10, closure