tracker issue : CF-3040243

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 80233:Summary: Revise/Update Adobe ColdFusion Coding Guidelineshttp://livedocs

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 10/02/2009

Components: Documentation, General

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Minor / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Problem:

Summary: Revise/Update Adobe ColdFusion Coding Guidelineshttp://livedocs.adobe.com/wtg/public/coding_standards/printable.htmlReferences to trying to form CFML code as being "as XHTML-compliant as possible" is meaningless guidance, and should be removed from Adobe's CF Coding Standard.CFML is not a XML dialect, never will be, and never set out to be.  So it's bad advice to suggest one should attempt to code it as if it is.XHTML is a specific dialect of XML, and CFML code cannot be "as XHTML-compliant as possible", because XHTML does not specify CF tags in its vocabulary.  It's completely specious to make suggestions drawing any parallel between CFML and XHTML.  And something cannot be "as XHTML-compliant as possible", it's either XHTML or it's not XHTML.  There is not partial compliance (beyond transitional and strict, I guess).A CFM template can never be an XML document, for (at least) the following reasons:* it would require a root node, with all tags being nested within it* several tags are not and cannot be represented as well-formed XML* most tags don't actually have a closing tag (eg: </cfset>).  Don't forget  <cfset /> is just shorthand for <cfset></cfset>.* one cannot use &amp; in place of the CF operator &* one cannot escape CDATA with a CDATA tag* CFML code is often incorrectly "nested" around HTML tags within the same document, for very good reasons.* I'm sure someone with more patience could extend this listAnd what would the POINT of making some of one's code XML compliant?  As soon as one's code is not well-formed XML, any benefit one might get from having wel-formed XML (and the benefits of languages like MXML being XML compliant are... um... absent, as far as I can tell) goes out the window.  So it's a fool's errand with CF from the outset, because one already knows it can never be.Simply suggesting closing a CFML tags is in any way a sensible thing to do and is in any way working towards any sort of XHTML / XML compliance.  It's simply a dumb suggestion to make.  And it's irresponsible ignorance-encouraging of Adobe to be propagating this sort of nonsense to the CF community.I would suggest the following rewording:"It is important to note that whilst CFML is a tag-based language, it is *not* a dialect of XML, wherein all tags need closing tags (provide example).  There is no intrinsic requirement for a tag-based language to be XML-compliant: HTML and CFML being examples of these.  Some people like to close their CFML tags for cosmetic or aesthetic reasons (provide example).  Whilst this is harmless, it serves no purpose, and there is no good reason to do this.  Note: it is not advised to alter existing source code to remove any spurious closing-tag-constructs, but it is recommended one does not perpetuate this practice when writing new code."I've raised this as a BUG because the logic behind the current text is critically flawed.-- Adam
Method:


Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3040243

External Customer Info:
External Company:  
External Customer Name: Adam Cameron
External Customer Email: 17EB1A7649DA54C7992015A9
External Test Config: 10/02/2009

Attachments:

Comments: