At some point you will have to troubleshoot server problems. Trust me - it will happen. It's no good sticking your head in the sand or your fingers in your ears (or both - tricky, but doable). Your first question will likely be, "Where do I find out information about what is happening on the server." Fortunately there are a great many log files in Coldfusion. Unfortunately they are not easy to find, and they contain different formats of information. There are 3 "groups" of file based logs on a Coldfusion MX installation. These groups are mostly the same for CFMX 7 as they are for CFMX 6 and CFMX 6.1 (a few exceptions). Here's a rundown:Read More
Bill Moore is a very good friend of mine. He owns and operates EV World. Bill is a case study for the best and worst thing about Coldfusion - it's ease of use. The fact that CFML is accessible as a language makes it a great choice for designers to enter the world of web programming. Bill is an excellent designer and an amazing individual. It's impossible to meet him without warming to him immediately. His real passion isn't web programming, it's alternative energy technology. He uses Coldfusion because he can write all kinds of code and it will usually work. In fact, Bill absorbs only the amount of CF that he needs to update his site and add the features he wants. As you can see by reviewing his site that is actually quite a lot by now. The rest of his enormous energy is devoted to promoting alternative sources to fossil fuels. Looking at EV World it's hard to believe it's the work of a single man. It looks more like a corporation with a team of developers. He offers subscription services, reviews, news, dozens of articles - a whole cornucopia of content for anyone interested in a green way of life. Yet Bill would not characterize himself as a Cold fusion developer.Read More
Locking among CF developers arouses the same sort of Ire as the Linux Vs. MS debate. There are CF developers who believe that locking is unnecessary in most cases and locking everything is an unnecessary waste of time and effort. There are others who believe that everything should be locked without regard to any examination of the data or its significance. Both camps have salient points and I do not fault either of them for their viewpoint. In our case we err on the side of caution. We lock every write for the session and application scope and we lock "most" reads of the session scope. That's our standard and I only mention it to get it out of the way. I do not intend write an apology on wether you should lock or not. Instead, I think we should examine how locking syntax varies and how it used appropriately (or inappropriately).Read More
For example, using MOD 100 (or whatever threshold makessense to you) and currrent row I could run a calculation that gives me the percent commplete of the output. let's say 13 percent at row 200. Then, I would write this: ( <script> movie.SetVariable(13,"13%"); </script >) .. the first item is the frame number I want the movie to go to and stop, the second variable is a label. I use <CFFLUSH> to send it to the html page where it is run "inline" immediately. The result is a nice looking status bar that climbs incrementally at the top of the report and lets the user know that data is being sent to the browser and to please be patient. This approach can be useful for things like data upload tools where user uploads a spreadsheet or database that is subsequently inserted into a table or appended to a file.
For source files click here.Read More
Finding a cause for something as generic as a CPU spike can be a frustrating task. In my experience it is best to start with "known" issues and get them out of the way. First, ensure that the OS is up to date with all patches (if using w2k - sp4). Likewise the RDBMS server should be up to date - both the OS and the application (sql2000 SP 2 for example). Next, examine the CF server and make sure that it is up to date as well. Be careful - make sure that all patches are installed and tested for compatibility on the dev server first. I never install a patch on the first day - or without doing it on the dev server first. Patches get rolled back too. Current CF 5 version is 5.0 - but there is an extensive list of hot fixes that may or may not be germane to your installation. Here's a link to Macromedia's Patch List.Read More
There are many things you can do to optimize a web site before you ever examine the CFML. In fact, many poorly written sites run just fine because on big beefy servers and robust database servers. Sometimes, when troubleshooting a site's performance you start with those resources - is the web server too busy? Is the database indexed and optimized? Is there enough RAM? Is the CF server correctly configured? ... and so on. Once you have Exhausted these possibilities it may be time to look at the actual CF code itself. That's when your advanced knowledge and experience can begin to really pay off.Read More