Opened 13 years ago

Closed 13 years ago

#1060 closed defect (fixed)

Tree widget: Dojo coding conventions

Reported by: skinner Owned by: ilia
Priority: lowest Milestone: 0.9
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

The Dojo coding conventions say that "acronyms SHOULD NOT be uppercase":

http://dojotoolkit.org/js_style_guide.html

Most of the Dojo code does seem to follow that convention, with names like "dojo.widget.HtmlWidget?" rather than "dojo.widget.HTMLWidget".

We might want to change the style guide to relax the lowercase acronym requirement, but if we're sticking with the current style guide, then some of the Tree code should be cleaned up a little. For example:

dojo.widget.Tree.DNDController
dojo.widget.Tree.createDOMNode
dojo.widget.TreeBasicController.onCreateDOMNode
dojo.widget.TreeContextMenu.onCreateDOMNode
dojo.widget.TreeLoadingController.RPCErrorHandler
dojo.widget.TreeLoadingController.getRPCUrl
dojo.widget.TreeLoadingController.runRPC
dojo.widget.TreeNode.createDOMNode
dojo.widget.TreeRPCController

The getRPCUrl function especially stands out, with the mix of uppercase for the RPC acronym and initial-caps Url acronym. (Just like XMLHttpRequest itself!)

Change History (2)

comment:1 Changed 13 years ago by bill

Owner: changed from anonymous to ilia

comment:2 Changed 13 years ago by ilia

Resolution: fixed
Status: newclosed

Fixed in TreeV3

Note: See TracTickets for help on using tickets.