Subscribe: Boyzoid's Blog - ColdFusion Stuff
Added By: Feedage Forager Feedage Grade B rated
Language: English
administrator  book  cfc  charting  code  coldfusion developer  coldfusion  cool  json  month  new  orm  property  reserved words  string  year 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Boyzoid's Blog - ColdFusion Stuff

Boyzoid's Blog & Stuff - ColdFusion Stuff

The Ramblings of a ganius

Published: Sun, 22 Jan 2017 21:53:35 -0500

Last Build Date: Sat, 02 Jun 2012 09:43:00 -0500


ColdFusion Developer Week

Sat, 02 Jun 2012 09:43:00 -0500

In case you happen to live under a rock, I wanted to remind everyone that ColdFusion Developer Week starts in a couple of days.

What's that? You don't know what ColdFusion Developer Week is? Well, its a FREE week's worth of ColdFusion training from some of the best ColdFusion peeps around (did you see the list of speakers?)

Well, now you know what it is. So, go register. Now. And I better see you in my session. If not...well....I might cry.

ColdFusion 10 - Loading Dynamic JSON for CFCHART

Tue, 13 Mar 2012 17:54:00 -0500

As I mentioned here, CFCHART allows us point to an external file for the JSON configuration string, however, this file needs to be a plain text file - we cannot point to a ColdFusion file to generate the JSON configuration for us. Thanx to some help from Ray Camden, I figured out a way to 'trick' CFCHART into doing just that. I will admit, it is a bit of a kludge, but it works...and it works nicely.


ColdFusion 10 - A Few Nice 'Quickies'

Thu, 08 Mar 2012 10:38:00 -0500

I thought I would take a break for talking about charting (but I will get back to it soon) to talk about some more 'small' enhancements to ColdFusion 10 that will make out lives just a tad bit easier.


ColdFusion 10 - More Charting Stuff

Tue, 06 Mar 2012 13:29:00 -0500

Here is a cool feature of the new charting in ColdFusion 10. As I have made mention of, the charting engine is using ZingChart 'under the hood' to generate the charts. ZingChart relies on a JSON string for its configuration - everything from what type of chart, to the data contained in a series, to the styling of the chart. When we use CFCHART, ColdFusion generates this JSON string for us. However, there is a way for us to tell ColdFusion what that JSON string should be.


ColdFusion 10 - Charting Style Defaults

Mon, 05 Mar 2012 12:26:00 -0500

I have become quite enamored with the new charting engine in ColdFusion 10. However, there are some things that I don't love about them - its not that I hate or dislike them, I just think they can be better. One such thing is the default styling of the tooltips.


ColdFusion 10 - Client Side Charting Demo

Wed, 29 Feb 2012 15:30:00 -0500

One thing I have not played around with in recent versions of ColdFusion was cfchart . I simply have not had a need to do so. During lunch today, I was working on something that I hope to incorporate into one of my cf.Objective() presentations that required me to use the new charting engine in ColdFusion 10.

I do not want to give too much away - just in case it winds up falling flat - but here is a sample graph with which I was working.



Media Files:

ColdFusion 10 - ColdFusion Administrator Changes

Mon, 27 Feb 2012 13:59:00 -0500

To continue my 'series' of posts about new features that may get over looked, I wanted to point out 2 pretty cool changes to the ColdFusion Administrator.


ColdFusion 10 - Reset CF Administrator Password

Sun, 26 Feb 2012 15:43:00 -0500

Raise you hand if you ever had a need to reset the CF Administrator password - because you forgot it or took over a system where no one knows the password. If you are a ColdFusion developer and you do not have your hand are lying.

It's happened to all of us at some point in time, especially on systems where we rarely need to access the Administrator. By know you probably also know that there is a way to do this that involves editing some configuration files and restarting ColdFusion. But ColdFusion 10 now offers us a new, and much easier, way to reset the password.


ColdFusion 10 - Form Fields With the Same Name

Sun, 26 Feb 2012 12:58:00 -0500

OK, here is a ColdFusion 10 feature that I like. I will admit, its not difficult to mimic this behavior, but its cool none-the-less.

We should all be aware of the fact that when you submit a form to ColdFusion for processing, and the form contains multiple form fields with the same name (a list of checkboxes, for example) that these values will be available to us as a comma-delimited list in the FORM scope. Typically, I wind up changing this value to an array as I find it easier to work with arrays.


Speaking at cf.Objective()

Wed, 22 Feb 2012 16:21:00 -0500

I am a little late on announcing this, but I, once again, have the honor of once again speaking at cf.Objective().

I am giving 2 presentations: one on how to set up your Business Model and one on how to create mobile apps using PhoneGap.

Dave Ferguson and I will also be doing a live broadcast of CFhour on Thursday night. Check out the rest of the schedule here.

ColdFusion 10 - For-In Loop for Queries

Tue, 21 Feb 2012 11:07:00 -0500

On top of some of the 'big ticket' items in ColdFusion 10, there are also a lot of small langauge enhancements that will make it even easier to use ColdFusion. One such example is using for-in syntax in queries.


ColdFusion 10 - Implicit CFC Constructor

Sat, 18 Feb 2012 10:00:00 -0500

Here is another neat new feature of ColdFusion 10 - Implicit CFC constructor. We can now set CFC properties when instantiating the CFC. This can be done by passing in name/value pairs or a structure. For example, let's assume we have the following CFC.

[code] component accessors="true" persistent="true" table="BOOKS" schema="APP" output="false" { /* properties */ property name="bookID" column="BOOKID" type="numeric" ormtype="int" fieldtype="id"; property name="title" column="TITLE" type="string" ormtype="string"; property name="description" column="BOOKDESCRIPTION" type="string" ormtype="clob"; } [/code]

In the past we would need to do this:

[code] book = new Book(); book.setTitle( "My Book Title" ); book.setDescription( "A really cool book" ); [/code]

But now, we can simply do this

[code] book = new Book( title = "My Book Title", description = "A really cool book" ); [/code]

Or, we can use this syntax.

[code] book = new Book( {title:"My Book Title", description:"A really cool book"} ); [/code]

Notice how when creating the structure, we are using ":" rather than "=". NOTE: You can still use "=" if you so desire, but by allowing us to use ":" it is more consistent with other languages, such as JavaScript.

ColdFusion 10 - Client Variable Storage

Fri, 17 Feb 2012 17:39:00 -0500

Here is a quickie, and one that will make a lot of people very happy. Here is the new default for 'Client Variable Storage'

Yep, that's right, they are no longer stored under 'registry'

*does celebration dance*

ColdFusion 10 - ORM Search

Fri, 17 Feb 2012 15:19:00 -0500

One of my favorite new features in ColdFusion 10 is ORM Search. ORM Search is pretty much what it sounds like, its a way to be able to quickly and easily search data stored in your ORM objects.

NOTE: All the code samples found in this post are from the sample code which you can get here. The code utilizes the 'cfbookclub' database and datasource that are installed when you install the demos


Media Files:

ORM, Reserved Words & MySQL...Oh My!

Mon, 13 Feb 2012 09:23:05 -0500

I am working on a small personal project, using it, in part, as a learning experience and giving Test Driven Development a try. I decided at the beginning of the project to use ORM for my data persistence. Over the weekend I ran into an interesting problem that, when I finally found the reason, was one I should have picked up a lot sooner.

The project is a basic personal budgeting application. I decided to create my objects and their relationships and let ORM create the database tables, columns and foreign keys. This took a bit of time, but all the database items got created without issue.

One object, the Budget object, has two properties named Year and Month - to specify what month and year the budget represents. I also have an Account object that can have many Budgets. One thing I wanted to do was sort the Budget relationship by Year and Month so that when I called Account.getBudgets() the most recent budgets would be on top.

This should have been easy considering the orderby attribute of the ORM property. However, when I added the following: [code] orderby = "Year desc, Month desc" [/code]
I was getting an error from Hibernate stating that the order-by property could not be parsed.

Well, Google was not much help. I was able to find pages about this error message, but not anything related to ColdFusion. After clicking around a few links, it finally hit me what the issue was. Year and Month must be reserved words in MySQL.

It took one more Google search to figure out how to escape reserved words in MySQL. For those who do not know, it the ` character (its the key to the left of the 1 key). By changing the orderby to: [code] orderby = "`Year` desc, `Month` desc" [/code]
I was able to get past the error and have the Budgets sorted correctly. This should have been something I thought of sooner, but I think I was thrown off the scent by the fact that the columns were created without issue. That will not happen to me again.

I should note that this fix might not work in other database engines as they use different characters to 'escape reserved words. However, since, for now, this will not run on anything but MySQL, I can continue along writing my unit/integration tests