Coldfusion is written right along side your HTML code. ColdFusion is a little different from other server side languages because it is written almost entirely <tags>, just remember that when you are programming. While ColdFusion is very relaxed when it comes to syntax, it is import to maintain a proper variable naming scheme and to have consistency throughout your pages. Well, that was a quick introduction, now let’s’ write our first ColdFusion script! To create your first ever ColdFusion file, give it a name followed by “.cfm” This is the file extension for ColdFusion. What we are going to do here is to write something to the document. If you ever want ColdFusion to output something, you must have the output in the <cfoutput> and </cfoutput> tags.
As you can see, it is pretty easy. I would recommend breaking your pages into a logic section where you put all of your important code and an output section wrapped with <cfoutput> and ending it with </cfoutput> that way you wouldn’t have to keep putting it around each new thing you want to write to the document. Separating your code into logic and outputting (views) is a great practice. Personally, I recommend them being two different pages and using classes, but we won’t dive into OOP in the ColdFusion tutorial. Most of it is written using a procedural coding practice anyway.The above example was how to output data to the DOM, but ColdFusion has different ways to specify outputting html and to output actual ColdFusion values. You will see how to do this in variables.