Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Barney Boisvert
It's really only with lists that the empty string == null argument can be applied, because in real collections you don't use a value to define an item in the collection, you define the item itself, and supply it with a value to store. So if I say myArray[1] = , i'm defining the item with the

RE: [CFCDev] Confusion about persistent CFCs

2005-05-13 Thread Nando
Assuming application.persistentStuff is already instantiated as a singleton and populated with the application-wide instance data you need, maybe something like this would help: on every request cfset perRequestCFC = createObject('component','perRequestCFC').init(application.persistentStuff,u

RE: SPAM-LOW: RE: [CFCDev] Singleton / Factory request

2005-05-13 Thread Kerry
but, if you are creating the object in app scope, and x number of requests cause the appstart code to run, then each subsequent request will overwrite the last one, so there will still only be one instance of the object? in saying that, I would do the lock because its nice and tidy.

RE: SPAM-LOW: RE: [CFCDev] Singleton / Factory request

2005-05-13 Thread Nando
Kerry, i don't think there's much of any reason to create an object and place it in application scope unless you make it a singleton that persists until the application scope times out. At least i can't think of one. The MM docs say that if you create an object in Application.cfc's

RE: SPAM-LOW: [CFCDev] OT: large source files

2005-05-13 Thread Nando
Pat, It's obvious to me that as an application grows in complexity, modularity becomes more and more essential. For instance, you can encapsulate complex functionality within a CFC and use that onany page or templatewithin an application. That's so cool when you get it working right. I

RE: SPAM-LOW: RE: [CFCDev] Singleton / Factory request

2005-05-13 Thread Kerry
I think maybe some mis-communication here. i don't think there's much of any reason to create an object and place it in application scope unless you make it a singleton that persists until the application scope times out I agree. you do need to lock that code block as shown for the reason

RE: SPAM-LOW: RE: [CFCDev] Singleton / Factory request

2005-05-13 Thread Glen Rainbird
It is worth noting that if you are on shared hosting anything you put into the Application scope can be viewed by the other sites on that host. So if you put POP3 details, datasource authentication details in the application scope you are essentially revealing this to everyone on your host. To

RE: [CFCDev] OT: large source files

2005-05-13 Thread Dave Merrill
Im having a hard time convincing my team about the benifits of modularising code, particularly the use of cfinclude Uh oh (;-)... Recently, I needed to make a change to a section of a fusebox app that I hadn't looked at for a while, and it was wonderful. One known file shows which files get

Re: [CFCDev] Inheriting variables

2005-05-13 Thread Cliff Meyers
You could probably define an init method in your super class that initializes all the variables you want, then in your subclass you can call Super.init() and then define any additional vars that you need in the variables scope. That should work I think. -Cliff On 5/12/05, Peter H [EMAIL

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Patrick McElhaney
On 5/12/05, Hal Helms [EMAIL PROTECTED] wrote: Here's a common case: I have an object of type, Human, with an instance variable, spouse, of type, Human. Now, if I call the getSpouse() method (that rightly advertises that it returns a Human) on a single person, what will I get? I might, in some

RE: [CFCDev] Confusion about persistent CFCs

2005-05-13 Thread enigment
Is it possible to clone a CFC, create a completely independent copy? How? You have to write all the relevant code yourself, including calling createObject() and copying all the base data etc etc. That's what I wanted to be certain of, that there's no built-in function to clone a cfc object.

RE: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Ben Rogers
Actually, I was looking for an example of when you need to know the difference between a null value and a zero length string in a record set. Ben Rogers http://www.c4.net v.508.240.0051 f.508.240.0057 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

RE: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Vince Bonfanti
What if the concept of null values was introduced via two new functions: NullNew() and IsNull()? I could assign a null value to variables with the first function: cfset myNull=NullNew() cfreturn NullNew() You could also use NullNew() to pass null values to Java function instead of using

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Bill Rawlinson
I guess a good compromise would be a second ListLenCountingBlanks function would be handy. Or a CountElement() function where you pass in a string and tell it a substring to return the number of occurances for. so you could say cfset myLIst = a,,b,c,,h / #CountElement(myList,,)+1# !---

RE: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Ben Rogers
Really, though, like Hal said in another post to this thread, Simon Horwith said at PbD, and others have said... if you want Java, program in Java. It's not what CF was meant for. I think you've confused me with someone else or you've misunderstood what I was saying. I am most certainly not

Re: [CFCDev] OT: large source files

2005-05-13 Thread Steve Bryant
My best advise is Show Them. I have been in environments (as subcontractor) where the large file approach has been in favor. I have pleaded with them to let me do a small project with smaller, more focused files. It takes time, but as they maintain large file applications and a small file

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Dave Carabetta
On 5/13/05, Ben Rogers [EMAIL PROTECTED] wrote: Really, though, like Hal said in another post to this thread, Simon Horwith said at PbD, and others have said... if you want Java, program in Java. It's not what CF was meant for. I think you've confused me with someone else or you've

Re: [CFCDev] Confusion about persistent CFCs

2005-05-13 Thread Sean Corfield
On 5/13/05, enigment [EMAIL PROTECTED] wrote: That's what I wanted to be certain of, that there's no built-in function to clone a cfc object. Interesting omission. There is no way to generically clone an object in any meaningful way because of the semantics of state. For a simple query and

Re: [CFCDev] Confusion about persistent CFCs

2005-05-13 Thread Joe Rinehart
For a simple query and record list of a few rows, using the 'request.MyCFC = application.MyCFC' method, which we know isn't workable, processing the request takes 10ms on my machine almost always. Using CreateObject every time, it takes 20-40ms. You're worrying about the wrong level of

RE: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Ben Rogers
I think it's a fine suggestion. However, I still think a function should have to declare that it may return null values: cffunction name=getCustomer returntype=Customer allownull=yes ... /cffunction AllowNull should be defaulted to no. That would be backwards compatible with the existing

RE: [CFCDev] Confusion about persistent CFCs

2005-05-13 Thread Vince Bonfanti
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sean Corfield Sent: Friday, May 13, 2005 10:23 AM To: CFCDev@cfczone.org Subject: Re: [CFCDev] Confusion about persistent CFCs On 5/13/05, enigment [EMAIL PROTECTED] wrote: That's what I wanted to

[CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Byron
Hi, Ya, I lurk on this list too; there are lots of us who do. I've noticed loads of posts about DAOs, getters, setters etc. The gist of most of the posts seems centered around finding a structured, rational way of dealing with CF development and CFCs as a whole. I've been looking for a

RE: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Kerry
that a marketing spiel or what? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Byron Sent: 13 May 2005 16:00 To: CFCDev@cfczone.org Subject: [CFCDev] very cool tool www.cfcpowertools.com Hi, Ya, I lurk on this list too; there are lots of us who do. I've

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Byron
Sure it is. Most things are in one way or another, but this is an honest one and really, you have nothing to lose but your preconceptions. Byron On May 13, 2005, at 11:23 AM, Kerry wrote: that a marketing spiel or what? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Scott Stroz
On 5/13/05, Byron [EMAIL PROTECTED] wrote: Sure it is. Most things are in one way or another, but this is anhonest one and really, you have nothing to lose but yourpreconceptions.Byron and $299 On May 13, 2005, at 11:23 AM, Kerry wrote: that a marketing spiel or what? -Original Message-

[CFCDev] Does Your Code Suck?

2005-05-13 Thread Bill Rawlinson
Not just an empty question - but one that is pretty well explained and answered via essay format at: http://www.artima.com/weblogs/viewpost.jsp?thread=71730 Now, normally I wouldn't post something like this here but in one of his sections he starts talking about one of our favorite topics

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Scott Stroz
You've got nothing to lose but more hair or more sleep. and $299 -- Scott StrozBoyzoid.com___Some days you are the dog,Some days you are the tree. --You are subscribed to cfcdev. To unsubscribe, send an email to

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Peter H
Code generation (just like any form of programming) is an interactive process. I've checked out a number of code generation tools and whilst they can save time they all seem to lack the flexibility to produce what I want. Who knows, may be this is different? Cheers, Pete (aka

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Sean Corfield
Wow, there's so much stuff in this thread already - I'm going to have to spend some time responding to many of the issues raised here. However, I'm going to start with Dave's post (because it's the closest one to being on the mark). On 5/13/05, Dave Carabetta [EMAIL PROTECTED] wrote: At the end

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Sean Corfield
On 5/12/05, Hal Helms [EMAIL PROTECTED] wrote: Seriously, this is why I so strongly recommend using Java for model components (as in model-view-controller), where it excels and using ColdFusion for view and possibly controller stuff, where it excels. What about implementing the data access

[CFCDev] cfc soap service

2005-05-13 Thread Paul Roe
Hey guys I am trying to do something that should be very simple. I have a cfc that I want to access as a soap service. This cfc is running on a windows server that doesn't allow anonymous user login. If I navigate to the url of the cfc like so, http://www.sitename.com/test.cfc?WSDL. I get the

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Sean Corfield
On 5/12/05, Hal Helms [EMAIL PROTECTED] wrote: Here's a common case: I have an object of type, Human, with an instance variable, spouse, of type, Human. Now, if I call the getSpouse() method (that rightly advertises that it returns a Human) on a single person, what will I get? I'd argue you

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Cliff Meyers
I really don't agree that CFers should just write Java for models. One of the big benefits of CF is the speed of development - far faster than doing it in Java because it's a higher level language. I agree with that too. It's frustrating because Java's OO is so powerful and flexible that it

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Barney Boisvert
SELECT user.firstname AS parent, child.firstname AS child FROM user LEFT OUTER JOIN user child ON user.userID = child.parentID If 'child' is the empty string, does the user not have a child, or is the child's record incomplete, perhaps because it wasn't given a name yet (as is not uncommon for

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Spike
CF7 already has the ability to do most of this: cfset nullValue = JavaCast(null,) / cfif not structKeyExists(variables,'nullValue') Null Value found. /cfif The only thing it doesn't support is returning a null instead of say a struct or a query. If you could do cfreturn JavaCast(null,) / I'd be

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Spike
An alternative example is an article on a website that is created in a series of steps. First you add the title, author and publication dates. At some later stage you add the summary and body. At a later stage you upload any image you want to display with the article. When deciding if an article

RE: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Vince Bonfanti
Hmmm...I'll have to defer to you on the difficulty of implemented null support in CFMX, but in BlueDragon it shouldn't be too hard if you assume that all pre-existing code treats null values as empty strings. In fact, this is how BlueDragon is already implemented: we have an internal data type

RE: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Ben Rogers
Obviously you can add an extra flag to the database to indicate that the article has no image, but checking for null is a valid way to do it too. This is probably just a matter of preference, but I don't like to overload null values with extra meanings. I would either use bits to track this or

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Paul Hastings
Spike wrote: CF7 already has the ability to do most of this: cfset nullValue = JavaCast(null,) / cfif not structKeyExists(variables,'nullValue') Null Value found. /cfif The only thing it doesn't support is returning a null instead of say a struct or a query. i think javacast is a special case.

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Spike
You can pass objects to CFC methods, but you can't specify the java datatype in the cfargument tag. You have to do that manually. Other than that it works just fine: cffunction name=testArgs cfargument name=someList type=any required=true / cfif

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Byron
So, $299, what's your time worth per hour? If you're at $50/hour and the tool saves you 6 hours you've broken even. You do the math. The best things in life are not always free. Tom, the guy who developed the tool has really put a lot into it, why shouldn't he get something back? I feel the

RE: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Ben Rogers
SELECT user.firstname AS parent, child.firstname AS child FROM user LEFT OUTER JOIN user child ON user.userID = child.parentID If 'child' is the empty string, does the user not have a child, or is the child's record incomplete, perhaps because it wasn't given a name yet (as is not

Re: [CFCDev] cfc soap service

2005-05-13 Thread Sean Corfield
On 5/13/05, Paul Roe [EMAIL PROTECTED] wrote: If I navigate to the url of the cfc like so, http://www.sitename.com/test.cfc?WSDL. I get the appropriate wsdl (Bear in mind that when I navigate to this url IIS forces me to enter in my domain username/password). When I try to create my soap

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Sean Corfield
On 5/13/05, Spike [EMAIL PROTECTED] wrote: The only thing it doesn't support is returning a null instead of say a struct or a query. If you could do cfreturn JavaCast(null,) / I'd be happy. You can do that. But the returntype= needs to specify any which is what folks are complaining about.

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Spike
Oops! Hit the send key by mistake there: cfscript try { socket = createObject('java','java.net.Socket').init(); remoteAddress=socket.getRemoteSocketAddress(); if (not structKeyExists(variables,'remoteAddress')) { remoteAddress = -1; } } catch (Any e) {

RE: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Ali Awan
Haha, exactly what I thought. Try the blendo-matic 2000. It even answers the phone and does your laundry for you. -Original Message- From: Kerry [mailto:[EMAIL PROTECTED] Sent: Friday, May 13, 2005 8:23 AM To: CFCDev@cfczone.org Subject: RE: [CFCDev] very cool tool www.cfcpowertools.com

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Jared Rypka-Hauer - CMG, LLC
Sorry, Ben... Sometimes these threads get tangled, you see. :) I think that was mostly just general comments, with some thoughts directed toward you (I guess responding to 4 messages in a thread with a singleton post causes confusion... imagine that!) Anyway, I think you're right... there's a

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Spike
That's not what I'm finding: cfscript try { socket = createObject('java','java.net.socket'); remoteAddress=socket.getRemoteSocketAddress(); } catch (Any e) { remoteAddress=-1; } writeoutput(#remoteAddress#); /cfscript Spike Paul Hastings wrote: Spike wrote: CF7 already has the

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Spike
Yeah, I don't think it's good design either, but it is valid and as you say it's a matter of preference whether you like it or not. Spike Ben Rogers wrote: Obviously you can add an extra flag to the database to indicate that the article has no image, but checking for null is a valid way to do it

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Roger Lancefield
Byron, you contacted the list with what sounded like a thinly disguised bit of advertising. Then in one of your replies after being asked if you were marketing something, you obliquely replied saying that most things are a form of marketing (whatever things was supposed to refer to), which

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Massimo, Tiziana e Federica
If the java method can return a null you need to check if the variable exists after assigning it. If it doesn't exist you got a null back. I used a similar solution on this UDF: http://www.cfmentor.com/code/index.cfm?action=scriptid=181 Massimo Foti Dreamweaver:

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Spike
Yes, That's what I was saying. If you could specify a return type of Struct and have cfreturn JavaCast(null,) / it would be good enough for me. Spike Sean Corfield wrote: On 5/13/05, Spike [EMAIL PROTECTED] wrote: The only thing it doesn't support is returning a null instead of say a struct or a

Re: [CFCDev] Interfaces (was Null values)

2005-05-13 Thread Jerry Ela
Well how about interfaces. Now obviously interfaces where the compiler verifies that the cfc has implemented the defined method signatures of the interface is not going to happen in CF. But I think a light weight style of interfaces would be easy to implement, appropriate to CF, an useful.

Re: [CFCDev] Inheriting variables

2005-05-13 Thread Jared Rypka-Hauer - CMG, LLC
Peter, Maybe I'm missing something... lord knows it's even likely. My question is this: Because CFCs don't require variable declaration, I generally use my get/set methods to define what variables are available via a bean... hence there's no inheriting of variables to begin with. I would guess

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Sean Corfield
On 5/13/05, Paul Hastings [EMAIL PROTECTED] wrote: cfscript try { nulledVar=someJavaObjectThatCanReturnNull(); } catch (Any e) { nulledVar=something; } writeoutput(#nulledVar#); /cfscript This bombs because you are not testing for null. It won't catch the (valid) return

[CFCDev] SOT: Rooibos Generator (aka Mach-II Bean Creator)

2005-05-13 Thread Peter J. Farrell
As some of you might know, I've been developing the Mach-II Bean Creator over the past few months. A new step has been taken and I've renamed the Mach-II Bean Creator as Rooibos Generator in anticipation of a completely new code base. Rooibos' new home will be at PekoeTools.com. For more

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Joe Rinehart
Besides, you probably piss more than down the drain in coffee from Starbuck's every month. Is that money well spent? Scott doesn't drink coffee. :) -- Get Glued! The Model-Glue ColdFusion Framework http://www.model-glue.com -- You

RE: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Ben Rogers
Yeah, you're completely missing the point. You're explicitly relying on CF's interpretation of null to be a non-numeric simple value (i.e. the empty string), rather than actually checking to see if the field is null (which is what you should be doing). Perhaps I'm missing the point because

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Sean Corfield
On 5/13/05, Ben Rogers [EMAIL PROTECTED] wrote: cfif not isNull(childID) cfif isNumeric(childID) This goes back to my point that all the is*() functions would need to handle null gracefully so that, in this case, isNumeric(null) returns false. I'd like to see some code that clearly

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Scott Stroz
Joe - You beat me to the punch :) Byron, I was not knocking the product, but the combination of your 'testimonial' and the price made me extremely skeptical. $299 just seems like a steep price for what the procduct claims to do. I think the developer who came up with CFC Power Tools would sell

Re: [CFCDev] Null values (was CFC wish-list)

2005-05-13 Thread Barney Boisvert
isNumeric should test whether a given value is a number. It's debatable whether it should test whether a given value is both not null and a number, but CFML is such that it doesn't matter. Personally, I'd say that isX functions should return false for null values. Anyone know offhand how Java's

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Byron
No coffee! Man, I can't imagine how I could do that... Scott, I don't blame you for being skeptical; not in the least and on second read my initial post was a little door-to-door salesman like. As for price, well everyone has differences of opinion about the values of things, I suppose because

Re: [CFCDev] very cool tool www.cfcpowertools.com

2005-05-13 Thread Sean Corfield
On 5/13/05, Dave Watts [EMAIL PROTECTED] wrote: I suspect that people are skeptical about you, more than about the product you mentioned. http://www.cfblackbox.com/community.cfm?users_action=user_profileuser_id=byronj -- Sean A Corfield -- http://corfield.org/ Team Fusebox --