Thursday, April 29, 2010

Coldfusion Query of Queries (QoQ) Support

QoQ is convenient, but also poorly documented. I cannot find any official Adobe documentation with details about its features and limitations. It's features changes from version to version, usually only expanding (which is a good thing). There are also many bugs, and weird restrictions.

I guess Ben Forta's books rarely touched this topic for a reason.

So generally, I can only test what can be done by trial and error, and frequently find out that although it works on my computer, but will fail in another CF host due to difference in CF server version.

A summary of what can and cannot be done in CF QoQ (aka In Memory Query).
1. Data size: recommended 5,000 - 50,000 rows, subject to computer memory size;
2. join: inner join of two tables using WHERE clause
Can:
join two tables
inner join through a WHERE clause
cross join
Cannot:
use these clauses: LEFT JOIN, RIGHT JOIN, OUTER JOIN
join more than two tables
3. union: supported, but can be difficult to use due to strict type matching requirements;
4. dot notation: allow access to query in a structure through dot notation;
5. conditional operators: IS, IS (NOT) NULL, >, >=, <>, !=, <, <=, ==, BETWEEN, IN, LIKE
6. case sensitivity: it is case sensitive
7. other supported T-SQL keywords: GROUP, ORDER, DISTINCT, AVG, COUNT,

Beyond QoQ:
1. features from CFQuery tag: maxRows (equivalent to TOP), blockFactor
2. features from CFOutput, CFLoop: startRow, maxRows (combined equivalent to LIMIT)

Thursday, April 22, 2010

Windows XP "System Restore" and Subversion

Subversion users be aware: Windows XP "System Restore" will rollback your SVN working folder!

Just learned it the hardway. I did a system restore on my Windows XP box, and all of sudden all the projects are broken. It turned out that all my SVN working folders are rolled back too.

Solutions?
  1. Checkout "Head" from SVN repo again. Lucky for me, I do check-in frequently, and this solution works for me just fine;
  2. Start "System Restore", and this time select "Undo my last restoration";

Monday, April 19, 2010

Subversion (SVN) Client for Windows Quick Start

This is a brief guide to SVN client usage on Windows using Tortoise SVN client.

Recommended Software:
  1. Install Tortoise SVN client from this web site: tortoisesvn.tigris.org
  2. Install winmerge from winmerge.org for merging code
Check out:To check out a project from SVN server for the first time: start Windows Explorer, right click in the folder you want to save the checkout code, and select "SVN Checkout".

Check in procedures:
Check-in usually have three steps in the following order:
  1. add new file to server;
  2. check for new updates from server and merge if necessary;
  3. commit the changes back to the server;
Minimum requirement for the checked in code is that they can compile without errors.

More detailed checkin steps:
1. In windows explorer, right click the checkout root folder, and select “SVN Add”;
2. If new files are listed in the following dialog:
a. check the files that you want to send to SVN;
b. uncheck the files that you do not want to send to SVN, and add them to the ignore list;
3. Right click the root folder again, and select “SVN Update”
4. If there are changes or merge during update step, double check that the code can still compile;
5. Right click the root folder, and select “SVN Commit”, and type a proper comment about what are fixed, or the new features in this checkin;

Monday, April 12, 2010

Visaul Studio 2010 First Impression

It is officially released today. Tried a little bit and did not like it at all.

#1 problem: sluggish GUI response! No kidding. I thought Eclipse is slow, now I see something slower. No wonder it's release date was postponed to fix performance problem.

Of course, there is also problem finding my way around the IDE. Cannot seem to find a way to generate create script for my database project.