tracker issue : CF-3037180

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

Bug 74804:This ER is to do with the proposed feature of being able to write CFComponent and it's related CFFunction using a scripting syntax

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): barry beattie / barry.b (barry.beattie)

Created: 01/06/2009

Components: Language, CF Component

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 1

Duplicate ID:	CF-3037174

Problem:

This ER is to do with the proposed feature of being able to write CFComponent and it's related CFFunction using a scripting syntax.
----------------------------------
1) an objection is raised in the use of JavaDoc style syntax to set attribute values for NON-documentation attributes, specifically @output and @roles.
/**
* this areas should be reserved for documentation attributes of cffunction
* and not for functionality modifiers such as
* @output true
* @roles admin
*/

the reasoning is that generating documentation is a benign action (it plays no part in the execution of the code). @output (for example) isn't benign, rather it plays an active part.

-------------------------------
 
2) the scripted component and function seems to be getting closer to the Java/C#/AS3 format of

[access] [returnType] [functionName] (argType argName[=defaultValue]){}

For this reason it is suggested that NON-documentation attributes (output, roles, etc) is forced to use [Annotation] modifiers at the start of the function (either "@" "[]" or "<>"). This would reduce the clutter caused by ugly looking additional "attribute=value" attributes (whether it's output="yes" or role="admin") and allow a more common code writing method to be used

<roles="admin,owner">
private GUID getUserGUID(string userName){}

-------------------------

3) a suggestion is made that, with regards to "output=true", scripted functions within components should behave exactly the same as scripted user defined functions. That is:
 - all functions are set to an implicit "output=false"
 - only the use of WriteOutput() within the function body would allow output to be generated
 - the use of "output=true|false" is unnecessary

-------------------------

4) just a reminder that the documentation attributes of cfargument (displayname, hint) should also be considered. I find them very valuable, provided they can be cleanly added to the code.

-------------------------

5) a suggestion is made that new functionality created for functions within components should flow back to user-defined functions.

 
Method:


Result:

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

Watson Bug ID:	3037180

External Customer Info:
External Company:  
External Customer Name: barry.b
External Customer Email: 51A213DC4456984F992016B6
External Test Config: 01/06/2009

Attachments:

Comments:

This bug has been voted..
Vote by External U.
24236 | November 10, 2011 07:10:45 PM GMT