Monthly Archives: June 2008

Quick Fix – Transfer and Reserverd Words

I ran in to this when I first started using Transfer ORM a while back, when I was building a new app. However, now I am curious for those working on an existing app and db structure.

If you have a table called User, for example, Transfer will throw an error. It generates the SQL without brackets [ ] and will usually indicate a syntax error. When really it’s the reserved word USER that is throwing things off.

Originally, our team decided to rename the DB table to CoreUser and just map it in the XML to make the object look pretty. Again, this was for a new app we were building so it was early in the game and no additional refactoring was necessary at the time.




I did a quick Google search to see if any posts had mentioned another approach. Nothing new popped up, similar stories and struggles.

I happen to catch Mark online today and figured I’d run it by him. As always Mark hooked me up with a simple effective solution. So simple it made me feel stupid for not trying it.

Add the brackets to the table name in the transfer.xml file.




Cake.

CFUnited Speaker Cancellation

Unfortunately, I had to cancel my trip to DC. A nasty case of Strep throat has me out of commission and living off of chicken soup right now.

I was really looking forward to the great opportunity and being a part this amazing event, Teratech worked so hard to put together.

I apologize to anyone who signed up for the session. In my place, I have asked Rolando Lopez, from About Web, to give my presentation.

Together IBM and AMD Break Speed Record

“A unique hybrid of Cell BE and AMD Opteron processors, has recorded an official throughput speed above one quadrillion floating point operations per second — one petaflop.”

You may have heard the phrase ‘Cell technology’ being thrown around before the Sony PS3 hit the shelfs. Well, sure enough the same basic architecture is being coupled with AMD Opteron processors to break new records when it comes to supercomputers and processing power.

The article goes on to mention that the tests were conducted last month at a benchmark of 1.026 petaflops. It notes Sun Microsystems has only a few weeks to make a run at there goal set back in June 2007 of 1.7 petaflops. But it looks like the DOE using IBM and AMD have set the bar fairly high.

Take a look at the full article:
DOE supercomputer broke the petaflop barrier, conference acknowledges

Have Our CFML Prayers Been Answered?

I wanted to leave comments on Sean’s and Ben’s posts, but after writing them, they were just too long, and it can’t hurt to drive a little traffic to one of the smaller people, right?

It seems the buzz around the direction of CFML relating to OpenBD, Adobe, and Railo has gotten serious. Rightfully so. You have three teams playing on the same field right now. For the spectators, or developers, for sake of metaphor, it’s gonna be great to watch, and hopefully drive attendance.

Railo and JBoss, could be the spaghetti and meatballs of the CF community. They have just lit a fire that was dwindling. I pleaded for some consideration from Adobe when it came to marketing ColdFusion in my recent post. It got all kinds of feedback, but my opinion remains unchanged. As a matter of fact, I feel much relieved now.

I did not intend to put Adobe down, or offend anyone. It was more like yanking on a giants coat tails to get their attention. Not that I am or ever was going to jump ship and go Railo or OpenBD, but my confidence in CFML’s lifespan was shaken. It has now been renewed. Whether it’s Railo or not, the announcement should inspire all of us including those at Adobe.

JBoss is going to open up their Caching and Messaging, and introduce CFers to Hibernate. They may have to catch up in other areas…but WOW these three alone are major. I am not sure about their plans for distribution. I have not been able to find any facts, but I am assuming that Railo will either be included with install package or available in a plug-n-play manner.

That’s old school door knocking, reincarnated, if you ask me. Its gonna put CF in front of more managers, more developers (Java and CF), and at an Enterprise level.

Beautiful.

Just makes you wonder what the next big announcement will be, and by what team…

Coldfusion? No body does Coldfusion anymore.

It’s good to see everyone is taking the time to discuss and think about CF and its future. I just hope we don’t spend too long talking and justifying while other products like Railo, and openBD put their efforts into development and a more proactive marketing strategy.

Software is heading down the same path as music and movies on the internet. While the MPAA has spent years attempting to get things under control, they have only wasted the time and money involved. Now, artists and independent movie makers have made their own way using the new technologies available. I know it’s not as easy for Adobe to cash in on tickets and merchandise, but I am sure they are intelligent enough to find the equivalent.

I don’t have the answer, but if I had to make an off the cuff decision, I like the sound of distributing Standard for free and charging for Enterprise. It would allow for CF to be evaluated by more then just developers. Rather then pleading CF’s case and trying to show management why its worth the $, let the smaller companies create some jobs and buzz with the Standard Edition. We are a dying breed, but we are not dead. You can rebut that all you want, but tell me how often you hear ‘Coldfusion? No body does Coldfusion anymore.’

Truth is, Adobe hold the reigns to a lot of our livelihood. We’ve been doing this so long, and most of us have a passion for it. There’d be nothing worse then having to let go and move into something new at this stage of the game. I don’t think anyone means to point fingers or stir the pot, but its a political conversation and thats usually what happens.

I am grateful Adobe picked up Coldfusion and didn’t abandon it. But Adobe is not depending on income from Coldfusion to stay alive. They also have one of the best anti-piracy schemes in place for their other software packages. They should realize the opportunity to be a part of the future. Acrobat.com and Google’s suite of online applications are taking the food out of giants like Microsoft’s mouth. CF gives us the power to create RIAs and services like this. GIVE us that power, and let us be proud to thank you with a link back POWERED BY ADOBE icon. External links from trusted sites are the new gold in the SEO world.

Adapt. Please.

Using jQuery to Validate A Required Selection with Checkboxes

I have a form with two sets of check boxes. I need to validate a selection from each set has been made before I allow a submit. jQuery has a handful of selectors to help you easily get a hold of elements.
The common approach is to treat the check boxes as a single object, and traverse through each node using the .each() method. But I wanted to find a simple one-line approach I could re-use for each set.

Typical Approach (single set of check boxes)

$("input[@type=checkbox][@checked]").each(
function() {}
);

That’s not going to work if you have two sets of check boxes on the form with different names.






Don’t make the mistake of using the ID as a selector:
$(‘#fieldId:checked’)
It will limit you to the first element of the set.

To validate a required selection has been made, we’ll select the check boxes we need by selecting the checked ones by name, and counting the size(nodes) of the object. From there the logic is in your hands. In this example, I am checking to see if at least one has been checked in either set.


if($('input[@name=fieldName]:checked').size() == 0){
alert('Please Make A Selection for fieldName');
}else if($('input[@name=fieldNames]:checked').size() == 0){
alert('Please Make A Selection for fieldNames');
}

UPDATE

JQuery 1.3+ no longer supports the ‘@’ syntax.

The above code would then be:

if($('input[name=fieldName]:checked').size() == 0){
alert('Please Make A Selection for fieldName');
}else if($('input[name=fieldNames]:checked').size() == 0){
alert('Please Make A Selection for fieldNames');
}