When I used to write C / C++ coding standards for a living,
I think this still counts as a drink.
they pretty much always banned ?: outright. There are some syntactic
subtleties around it and it often led to dense, error-prone code
I don't think the density and error-pron`ed-ness of your code
I have a component called Personnel.cfc Located in:
C:\Inetpub\wwwroot\Com\Laszlo\Company\Personnel.cfc
The CFC is as follows:
cfcomponent displayname=Laszlo Personnel CFC hint=performs
functions on the Personnel Database for Laszlo
cffunction name=testIt access=remote returntype=void
Hey Duncan,
That should work - it's chugging along for me in CFMX7 Developer on JRun + IIS.
I'd recommend changing it to return a value instead of outputting it,
probably like so:
cfcomponent displayname=Laszlo Personnel CFC hint=performs
functions on the Personnel Database for Laszlo
On 5/25/05, Ben Rogers [EMAIL PROTECTED] wrote:
I would start off with an array of strings, which is the simplest
thing that could possibly work (or the simpler of the two options, at
least).
Though I generally agree with the idea of going with the simplest thing
that could possibly
Yeah, that seems fine. In fact, I'm wondering why I don't do that. :)
Ben Rogers
http://www.c4.net
v.508.240.0051
f.508.240.0057
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Joe Ferraro
Sent: Wednesday, May 25, 2005 5:28 PM
To:
I don't think the density and error-pron`ed-ness of your
code is very good grounds for the ommission of something
from the language.
Sure it is. CFML is not C. CFML should not evolve to be more like C. If I
wanted to program in C, I'd do that. CFML doesn't have pre- and
post-increment
CFML doesn't have pre- and post-increment operators, either. Should it
YES! That would be great, no more typing fugly i=i+1, just i++. beautiful.
that would be beautiful.
How about pointers?
it does?, references to objects and structs are pointers? what would be
wrong with being able to set a
ternary(value,iffalse,iftrue)
Maybe we could call if iif()? ;)
--
Get Glued!
The Model-Glue ColdFusion Framework
http://www.model-glue.com
--
You are subscribed to cfcdev. To unsubscribe, send an email to
cfcdev@cfczone.org with the
CFML doesn't have pre- and post-increment operators, either. Should it
YES! That would be great, no more typing fugly i=i+1, just
i++. beautiful.
that would be beautiful.
cflib.org has functions for this
--
You are subscribed to cfcdev.
cflib.org has functions for this
? had a look, couldnt find one named ++ that didnt require brackets and
could be called from either side of the variable
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of RADEMAKERS Tanguy
Sent: 26 May 2005 15:49
To:
or not:
The IIf function is a shortcut for the following construct:
cfif condition
cfset result = Evaluate(string_expression1)
cfelse
cfset result = Evaluate(string_expression2)
/cfif
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Joe Rinehart
The IIf function is a shortcut for the following construct:
cfif condition
cfset result = Evaluate(string_expression1) cfelse
cfset result = Evaluate(string_expression2) /cfif
No it's not.
iif(a,b,c)
All expressions a, b and c are evaluated (not in the evaluate() sense,
in the examined /
All expressions a, b and c are evaluated... ...in an iif() statement
even worse!
silly me, cutting and pasting from the macromedia reference like that.
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funct117.htm
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL
Just for fun, I thought I'd start a thread to document the various phenomena that we see regularly on CFCDev.For starters, Adam Cameron pointed out the undocumented variation on Godwin's Law, stating:
As a CFCDev discussion grows longer, the probability of Sean Corfield
mentioning his 25 years
they're in DataManipulationLib - check function
plusPlusCounter(intCounter) and counterPlusPlus(intCounter) (and the
matching MinusMinus function)
you are correct, they do require brackets... because they are user
defined functions and udfs require brackets...
disclaimer: never used 'em, i type
Oh, well I guess their idea is - as the docs actually say, now that I
look at them - that the second and third arguments are just STRINGS.
And then iif() kindly does an implicit evaluate() on those strings for
you (yeech: what a nightmare).
But you'd have to be a lunatic to have that cfif version
Surely, introducing the ternary operator and the '++' operatorwouldjust be a syntactical change and I'm not sure the comparison with pointers is a fair one.
Personally I can live without them but I'd love to see scripting support for all of the cftags. Wrapping cfquery et al in a functionjust so
lol ... it takes longer to type the function name than it does to type x=x + 1. Classic.
Pete (aka lad4bear)Original Message FollowsFrom: RADEMAKERS Tanguy [EMAIL PROTECTED]Reply-To: CFCDev@cfczone.orgTo: CFCDev@cfczone.orgSubject: RE: [CFCDev] CFC wish-listDate: Thu, 26 May 2005 17:37:11
hey: slower, overly-complicated, expensive... it's
ENTERPRISE!
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Peter HSent:
Thursday, May 26, 2005 6:38 PMTo:
CFCDev@cfczone.orgSubject: RE: [CFCDev] CFC
wish-list
lol ... it takes longer to type
Just for fun, I thought I'd start a thread to document
the various phenomena that we see regularly on CFCDev.
I believe the correct term would be Pattern, would it not? (;-)
Dave Merrill
--
You are subscribed to cfcdev. To unsubscribe,
On 5/26/05, Adam Cameron [EMAIL PROTECTED] wrote:
Oh, well I guess their idea is - as the docs actually say, now that I
look at them - that the second and third arguments are just STRINGS.
And then iif() kindly does an implicit evaluate() on those strings for
you (yeech: what a nightmare).
On 5/26/05, Sean Corfield [EMAIL PROTECTED] wrote:
On 5/26/05, Adam Cameron [EMAIL PROTECTED] wrote:
Oh, well I guess their idea is - as the docs actually say, now that I look at them - that the second and third arguments are just STRINGS. And then iif() kindly does an implicit evaluate() on
Because the code to be executed is
evaluated at run-time and not compiled, yes cfif/cfelse is (almost)
always faster than IIf(). The only time this wouldnt be true is if you
had the following statement:
cfif somethingIsTrue
cfset result = Evaluate(something)
cfelse
cfset result =
Let me clarify that last statement a bit:
Because the code *in an IIF()* is evaluated at run-time and not compiled,
yes cfif/cfelse is (almost) always faster than IIf().
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Douglas Knudsen
And you wonder why the Web Team Coding Guidelines say:
Don't use iif()
Always use cfif/cfelse instead of iif(). It is significantly faster
and more readable.
So the right hand spends time saying don't use the code that the left
hand wrote.
I wouldn't be too smug if *I* was you.
--
Adam
This
On 5/26/05, Douglas Knudsen [EMAIL PROTECTED] wrote:
Always use cfif/cfelse instead of iif(). It is significantly faster
and more readable.
is this still so under cfmx? the faster part that is.
Yup.
--
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail?
is this still so under
cfmx? the faster part that is.
Nope,
not since CF5. My testing suggests iif() is faster than
cfifcfelse/cfif, in equivalant tests. A Simple
cfif/cfif was faster than iif(), though.
That's
not the only conisderation, though, obviously. And, indeed, the
differences
On 5/26/05, Adam Cameron [EMAIL PROTECTED] wrote:
So the right hand spends time saying don't use the code that the left
hand wrote.
Care to explain that comment?
--
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? -- I have 50, yes 50, invites to give
So the right hand spends time saying don't use the code that the
left hand wrote.
Care to explain that comment?
You've got one Macromedia team making a point of saying sh*t, don't use
that code, man! [voiced like Ren], in reference to code that another
Macromedia team wrote, for the same
On 5/26/05, Adam Cameron [EMAIL PROTECTED] wrote:
Nope, not since CF5. My testing suggests iif() is faster than
cfifcfelse/cfif, in equivalant tests. A Simple cfif/cfif was
faster than iif(), though.
None of the tests I've seen anyone running here suggest that iif() is
faster than the
Thats actually the opposite of what
Ive found (in general) in my testing, Adam. Which makes sense, because IIf()
forces code to be Evaluate()ed.
Either way, the timing differences are *negligible* and not worth worrying about.
Were talking about a couple of milliseconds. Id also wager
Nope, not since CF5.
None of the tests I've seen anyone running here suggest that iif() is
faster than the equivalent cfif...
Interesting (kinda ;-)
I shall see if I can dig out my old tests, if I still have them, and we
can compare notes. But: tomorrow.
--
Adam
This email contains
On 5/26/05, Adam Cameron [EMAIL PROTECTED] wrote:
You've got one Macromedia team making a point of saying sh*t, don't use
that code, man! [voiced like Ren], in reference to code that another
Macromedia team wrote, for the same product both of them are working on.
In general, coding guidelines
Here I was just thinking he was joking around a little.
On 5/26/05, Sean Corfield [EMAIL PROTECTED] wrote:
On 5/26/05, Adam Cameron [EMAIL PROTECTED] wrote: You've got one Macromedia team making a point of saying sh*t, don't use that code, man! [voiced like Ren], in reference to code that another
On 5/26/05, Bill Rawlinson [EMAIL PROTECTED] wrote:
Here I was just thinking he was joking around a little.
Let's review his comments, shall we?
1.
When I used to write C / C++ coding standards for a living,
I think this still counts as a drink.
2.
So the right hand spends time saying don't
What particular aspects? SQL
concurrency is a pretty large topic, depending on what aspects youre
referring to.
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott
Sent: Thursday, May 26, 2005 7:40
PM
To: CFCDev@cfczone.org
Subject: [CFCDev] Repost: SQL
Ok I am working on an application that is
a multi user intranet application, the current system works on the basis that
last in wins on the storage of the data placed back to the database.
I was wondering what other people do to
prevent this, like record locking. I was reading a few
a few articles on MSDN about the 3
types of record locking available
can
you elaborate? what are the 3 ways mentioned?
there's many ways to skin this (disconnected client)
cat...
-Original Message-From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]On Behalf Of Andrew
If you're not annoying somebody, you're not really alive.
-- Margaret Atwood
I read that somewhere. Perhaps you ought to change your quote, eh? By your
definition he was just living it up a little. I seem to remember you
taking a few digs historically. Give him time and he will grow as you have.
That depends on the requirements of the
system. Largely, plain old DB transactions take care of any concurrency
issues we have. In the rare instance that dirty updates are
not allowed, we have a dt_updated field in the table in question, which we read
and save in a hidden field when
keep
-n mind that database record locking != application data
locking
ie
"select ... for update" cannot work over a disconnected client so row-level or
table locking won't help
-Original Message-From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]On Behalf Of Andrew
The 3 types that I have read are:
Pessimistic
concurrency control - a row is unavailable
to users from the time the record is fetched until it is updated in the
database.
Optimistic
concurrency control - a row is unavailable
to other users only while the data is actually being
Hey folks,
I have two related web service related questions:
Is there a way to capture/store the entire posted info for a call to a
CFC web service, including the soap action?
And on the flip side, is there a way to capture all of the info that is
posting, again, all the SOAP and the soap
In most areas of our
application though, we dont care about dirty updates, since the fact that the
data may have changed would never cause the user to want to reconsider his
update.
and, just to prove your
point, Roland("In the end, it all
depends on your business requirements")we have
Is there a way to capture/store the entire posted info for a call to a
CFC web service, including the soap action?
And on the flip side, is there a way to capture all of the info that is
posting, again, all the SOAP and the soap action, when it makes a web
service call?
CF 7 introduced the
Massimo, Tiziana e Federica wrote:
CF 7 introduced the GetSOAPRequest() function:
http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/h
tml/wwhelp.htm?context=ColdFusion_Documentationfile=0493.htm#5054299
There is also GetSOAPResponse()
Thanks Massimo.
After
Andrew, you probably already realise this but these three "types" really
refer how the database itselfdoes it's updates, and maps to such things as
row and table locking.
this
tallies up to the oldADODB adLockReadOnly , adLockOptimistic ,
adLockBatchOptimistic , et al.
The point is that
47 matches
Mail list logo