So far all the examples and code you have written have used a tag-based format. Even when we used functions that had no output, we used the <cfset>
tag. It's a natural way to program when developing web applications because the output language is HTML, which is also a tag-based language. But, is this the only way to do this? Let's have a look at the reason for there being another way to do things and how it could improve our current situation.
Let's have a look at the pros and cons of using these tags in the following two sections.
Using a tag-based format has many advantages. Primarily, it makes for a very easy learning curve for the user. Although there are many tags in Railo Server (about 126 on the last count), the syntax remains the same:
<cfTAGNAME ATTRIBUTE1="VALUE" ...>
When using a self-closing tag, we use the following:
<cfTAGNAME ATTRIBUTE1="VALUE"/>
In case of tags that wrap some content in the format, it is as...