Macromedia has just published my new Devnet article, Tips for CFMX-ifying ColdFusion 5 Applications. The article discusses how an old CF5 application can benefit from the move to ColdFuaion MX. It is targetted to beginners, but any comments are welcome.
I should point out that the picture is at least three or four years old.
Archived Comments
>>With ColdFusion MX, there is only one reason to lock application, session, or server variables, and that is the danger of a race condition. For this application, it is not a concern.
Why not? I have an old application I need to rewrite for cfmx, but you make it sound like cflock isn't needed any more. Can you clarify? I was under the impression cflock was needed to protect variables from being overwritten by another call at the same time.
Read Ben Forta's comment on the subject here.
http://www.forta.com/blog/i...
Andy
stylo, if Andy's link doesn't help, let me know.
is it just me (likely), or do the contents of the zip file not extract to proper subdirectories?
i've tried twice, and both times they just all get extracted to the web root.
Yep, zip got messed up. I'm pinging them now. I'll post the zip on my blog as well.
Posted. See main blog.
Thanks for the link.
One simple question:
In the MM page they talk about a possible race condition with
cfset session.cartTotal = session.cartTotal + currentPrice
I'm correct in thinking, am I not, that the possible session race would be per user session, not all sessions combined? Only if a single user loaded two pages together at the same time could there be a race condition here, not two different users on the same page (because they each have their own session variables).
If correct, then given that a user could always have two windows open at the same time, there would always be a race possiblity with session variables then, no? And always a need to lock them then, no?
Correct stylo - the issue in that case would be for the user himself.
But do you always need to lock them? No. In the specific example given, it was critical that you access the data in a single thread manner. There are many cases where it is not critical. So, for example, accessing session.name, to simply print out your name, has no need to be locked. Any type of simple display of a session var would _normally_ not be locked. The thing is to just think about how you are using the variable.
ray, dude, get a new picture. ;)