Question
Method Chaining
Hi, this isn't really a question as such, but I wondered your
opinions on method chaining in ColdFusion. Is this normal practice?
I have a CFC which I use like so
<cfset variables.wow = application.item />
<cfoutput>#variables.wow.getItem(1).getField("title")#</cfoutput>
I like this style of syntax, but can anyone highlight any performance issues this kind of syntax might have or anything else for that matter? To get this to work, the getItem function must return THIS for example.
Cheers,
Mikey
I have a CFC which I use like so
<cfset variables.wow = application.item />
<cfoutput>#variables.wow.getItem(1).getField("title")#</cfoutput>
I like this style of syntax, but can anyone highlight any performance issues this kind of syntax might have or anything else for that matter? To get this to work, the getItem function must return THIS for example.
Cheers,
Mikey
