1. (D'OH! Blush!)  I hoped nobody caught those, but, I'm glad you did.
I noticed that after a code review (after a long break) and changed the
arg types to "numeric".

1.2.  This is a matter of opinion again, but I may move the QueryTimeout
attribute from the Init() method back to the LDAPQuery() method.  It
would give me more-granular control of the query's timeout rather than
setting a component-global setting that may not be appropriate for all
LDAP queries.  I'm split on this one.  Our domain controllers (LDAP
servers) are pretty damn fast and even the largest of queries don't take
but a second or two.

2. I agree and the defaults have been removed.  (I was just being lazy.)
Now, they exist only in my CFC's test page in the Init() method.  Once
I'm a little farther along, I'll move them to a more-appropriate
location.

3. Thanks!  And may I say, REGULAR EXPRESSIONS ROCK!!!  One expression
still stumps me.  In my attached ParseCNFromDN() method, I use Replace()
and ListFirst() functions to strip all but the required information.  I
wish I knew the RE that would do this for me with a single function.
(An example of what I am needing is in the method's comment. Hint,
Hint.)

4. I fixed the typos.

Thanks for the critique, Adam.

I thought I'd post an updated version with a few extra Active
Directory-related methods I use on a regular basis.

The cool thing for me is, a lot of what I have learned on this mailing
list is now coming to fruition!

-----Original Message-----
From: Adam Cameron [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 10, 2003 6:46 PM
To: [EMAIL PROTECTED]
Subject: RE: Active Directory Query Service was: RE: [CFCDev] Component
Critique Wanted


G'day mate, a couple of questions:

How come you're having numeric args specified as "string"?  Isn't it
better to have them specified *as* numeric, and let CF handle the
"incorrect data type" error?  It also makes for better (ie: more
accurate) component-browser auto-documentation.

Also, in yout init() function, those arguments are not really optional.
I'd make them required, and get rid of the meaningless default data.  To
me, a default value should be one that actually *works* (eg: the default
of comma as the delimiter in list functions, and such like).

One thing I like is your approach here:
<cfif not ReFindNoCase("(^Base$)|(^OneLevel$)|(^SubTree$)",
Arguments.Scope)>

That's never occurred to me, I've alsways done something like this:
<cfif not listFindNoCase("Base,OneLevel,SubTree", Arguments.Scope)>

But using REs give one a more flexible approach.  Cool!

(oh, there's a couple of typos in your error messages: "agrument" ;-)

Adam



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dawson, Michael
Sent: Monday, 11 August 2003 4:26 a.m.
To: [EMAIL PROTECTED]
Subject: Active Directory Query Service was: RE: [CFCDev] Component
Critique Wanted


Here is my almost-ready-for-production cut of the component.  I'm pretty
satisfied with this code.  I have enough flexibility with the methods,
yet still retain many default values, in the init() method, that I don't
normally touch.

I do have to give a lot of thanks to the "power contributors" of this
list.  I have learned quite a bit about CFCs and OOP (as it applies to
CFMX) from lurking here.

Is this of the caliber to post on the cfczone or cflib sites?  I haven't
seen too many, if any, functions that handle LDAP queries.  Do all udfs
on cflib need to be built with cfscript only or will they also accept
tag-based udfs?

Thanks

-----Original Message-----
From: Nathan Dintenfass [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 09, 2003 8:07 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Component Critique Wanted


Looks good.

One thing to consider for making it more flexible would be building an
init() method that takes a list (or array) of servers and that login
info, etc. and stores that as an instance variable (perhaps even using
an
addServer() method).  That way this component will be abstracted from
the specifics of your environment.  You could then loop through the
servers passed in, which would tighten up the code a bit.

The only other comment is that you seem to use the Arguments. prefix on
all your arguments except sortOrder.

I'd also think that it might be nice to have a default SortOrder and
Separator rather than needing to pass those in every time.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Attachment: ActiveDirectoryService.cfc
Description: ActiveDirectoryService.cfc

Reply via email to