Wednesday, February 24, 2010

ColdFusion 9 Performance Brief Released!

Why repeat what you will eventually read. The Quick and Dirty truth .... It is way, way, way faster than before.

Use the following link to download it now!

http://bit.ly/CFFast

After that ... UPGRADE YOUR COLDFUSION SERVERS!!!!

Thursday, February 11, 2010

New Beta of Google Chrome for Mac now Available!!!

Google just released a new beta of the Google Chrome for Mac! This new beta adds several new features like extensions and bookmark syncing that was left out of the initial beta release.

I am excited and you should be too, this is a great browser and you should give it a try.

Click here to get Google Chrome

If you are on a PC and are still using IE, especially 6, get a brain and start using a real browser like firefox and/or google chrome.

Wednesday, January 20, 2010

Output SQL Data to XML easily

So today I needed to output data to XML at my job and rather than going the traditional way of creating a ColdFusion file to query and output the data I decided to see if I could just do it in MSSQL. Well, appears there is by using the "for XML" clause. There is a lot to learn from it and the docs are available in the following links.

What I will do here is just explain some of the basics so you can go ahead and do as you please from here on. For my examples I will use the AdventureWorks default database but you can easily modify the SQL I have to your own and play with the results.

There are several ways to get XML output based on the XML Mode used, the following are available.

  • RAW
    The RAW mode takes the query result and transforms each row in the result set into an XML element with a generic identifier row as the element tag and the columns in the SELECT as attributes.
  • AUTO The AUTO mode returns query results in a simple, nested XML tree.
  • EXPLICIT (I DO NOT DEMO THIS ONE)
    In EXPLICIT mode, you can explicitly define the shape of the resulting XML tree. Using this mode requires that the queries be written in a specific way, so that additional information about the desired nesting is specified explicitly as part of the query. The reason I don't demo this one is because of the new PATH mode in SQL 2005+, if you are still in 2000 and need to write complex XML docs then I suggest you look up this mode.
  • PATH (SQL 2005+)
    A simple way to generate complex XML documents rather than explicit.

The examples are as follows


Using for XML AUTO Returns this
Using for XML PATH Returns this
Using for XML PATH('path'),ROOT('root')
Here we add a root node and a cutom name for each row by defining the path value. Returns this
Using for XML PATH('path'),ROOT('root') and making the contactID column an attribute
Here we add a root node and a custom name for each row by defining the path value. Returns this
Using for XML RAW('path'),ROOT('root'), ELEMENTS XSINIL
This is the same as PATH it just returns the parent node with the XML Namespace. The ELEMENTS directive provides an XSINIL option to map NULL values to an element with an attribute xsi:nil="true". Returns this

In conclusion

When working with this data you can either render your results to text and/or grid. I prefered grid because the results are essentially a link that opens the xml document which then you can either copy and paste or save to your hard drive.

Some books to consider ....

Beginning SQL Server 2008 for Developers: From Novice to Professional
SQL Server 2008, Developer Edition
Murach's SQL Server 2008 for Developers (Murach: Training & Reference)

Tuesday, January 12, 2010

Maximixe Google Chrome on a Mac

So today I was playing with Google Chrome on my mac and have decided to make it my default browser for "Browsing the Internet". I say that because I will still use Firefox as my main browser for "Development Debugging" and of course like any other web developer I am forced to continue to support IE 6+, so for that I use Parallels and test on my VM.

Anyways, enough for the introduction to this post. Basically one thing I did not like about Google Chrome was that I could not maximize the window to my full screen size, well at least until now. I first tried using the default Mac option of clicking the green button on the window with the option key held down but that didn't work. All that did was maximize the window to the content within. So what is the answer you may ask?

Shift+Green Button

Yeap that is it, that will maximize your window to your full screen size. If this post was useful, let me know by leaving me a comment below.

Woo Hoo!!! I got Google Voice!!!!

So as the tile of my post says, I finally got my Google Voice invitation. You will notice now a "Call Me" widget on the right hand side of my blog. So go ahead and call me and leave me a message if you need to get in touch with me. I've opted to send it directly to voice mail for now but from time to time I may be picking it up.