Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Does cfscript output faster???

New Here ,
Feb 15, 2009 Feb 15, 2009
Hello to All!!!
I need to output a table with query data. If I do it with cfscript, I'll have to write:
<cfscript>
writeoutput ("<div id = test><table border =0>");
writeoutput ("Here are my HEADERS of table");
for (x = 1; x LTE qMy.RecordCount; x=x+1) {
writeoutput ("<tr><td>#qMy.a#</td><td>#qMy.b#</td><td>#qMy.c#</td>.......</tr>");
}
writeoutput ("</table></div>");
</cfscript>

So I have to do:
1 for_loop and
3 writeoutputs.

Does this method faster then use <cfloop = query> or simple <cfoutput> ?????
And what about "rules" for html tags, if I want to use "cfscript output" for outputting html code?
Thanks for your answers!!!!
TOPICS
Getting started
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 15, 2009 Feb 15, 2009
With cfscript you add complexity and nothing else. cfoutput with a query attribute is the simplest and most efficient way to accomplish your goal.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 15, 2009 Feb 15, 2009
> Hello to All!!!
> I need to output a table with query data. If I do it with cfscript

I don't see the benefit of using CFScript in a scenario like this: you're
just making work for yourself.

For code of such trivial complexity, any performance differences in the
execution time of CFScript vs CFML will be inconsequential.

Your aim here should be to write good clear code; and CFML is going to be
clearer in this case. IMO.

--
Adam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 18, 2009 Feb 18, 2009
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources