Status/Resolution/Reason: Closed/Deferred/EnhancementRequired
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 12/17/2014
Components: Net Protocols, LDAP
Versions: 11.0
Failure Type: Usability Issue
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Minor / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 3
See http://blog.adamcameron.me/2014/12/fixing-cfscript-cfldap.html for full narrative. Warning: it is not kind to either Adobe or Railo
Detail:
CFLDAP does have over 20 attributes, which might seem a challenge here. But it needn't be if we group them sensibly:
result = queryLdap(actionParams, connectionParams, queryParams);
Three arguments are OK, I think. Each of those param arguments would be structs, which include the one or more of the following attributes of <cfldap>:
actionParams:
action = "action"
modifyType = "replace|add|delete"
connectionParams:
server = "server name"
password = "password"
port = "port number"
rebind = "yes|no"
referral = "number of allowed hops"
secure = "multifield security string"
timeout = "milliseconds"
username = "user name"
clientcert = "path to client certificate"
clientcertpassword = "password for the client certificate"
usetls = "true|false"
queryParams:
attributes = "attribute, attribute"
delimiter = "delimiter character"
dn = "distinguished name"
filter = "filter"
maxRows = "number"
returnAsBinary = "column name, column name"
scope = "scope"
separator = "separator character"
sort = "attribute[, attribute]..."
sortControl = "nocase|desc|asc"
start = "distinguished name"
startRow = "row number"
(those're just copied from the docs).
It'd actually be quite nice to be able to define an LDAP connection like one can a datasource. This stuff generally doesn't need to be defined in the code every time one needs to make a call, after all.
This makes the LDAP-querying functionality easy, predictable, and in-keeping with CFScript's existing corpus. And this should be a primary language design consideration when implementing anything: does it fit with the rest of the language? This is something neither the Railo nor the Adobe language designers (I am certain neither organisation as anyone in that role, actually) seem to consider.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3911232
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: