Easy Rich Internet Applications With ColdFusion 8

Published By: Scott Stroz on Mar 19, 2008 at 10:59 AM

Times Viewed: 1615

Categories: Alagad, ColdFusion

SitePoint recently published an article of mine about developing Rich Internet Applications with ColdFusion 8.

SitePoint is a repository of tons of tech-related articles. From what I understand, they will be releasing more ColdFusion related articles in the future.

What are you waitng for?  Go check it out

 

6 Comments

in regard to setting up the datasource. I never set up the apache derby datasource before so I didn't know you needed the driver class (org.apache.derby.jdbc.EmbeddedDriver) and the schema for the tables is APP so I modified the query to say APP.USERS instead of users.

Posted By: Michael White on Mar 20, 2008

@Michael - In ColdFusion 8, you should not need to worry about the driver class, it _should_ be handled automagically. Also, when I set up the code and database, I did not need to use APP. for the query.

Posted By: Scott Stroz on Mar 20, 2008

Hi Scott,
I gave a quick run last night at "following along at home" with your article on SitePoint, and I get why Michael was having trouble following your instructions on how to set up the Derby DSN. This instruction:
6. On the next screen, you'll be asked for the absolute path to the database folder. Set your path to the following: {path to web root}/RIA/database/RIA.

I had trouble deciphering where we're supposed to enter the path. CF on Windows asks for a JDBC URL, along with Driver Class, Driver Name, User name, Password, and Description; nothing about path. I tried both absolute path and URL path in the JDBC URL field, but that wasn't getting me anywhere. I tried adding the driver class Michael mentioned but that didn't get me anywhere either. Like him and probably most other people, I haven't used Derby before and so am not familiar with the ins and outs.

OK, CF uses Derby for the example apps like the cfartgallery DSN, so by examining those DSNs I figured out that I needed to set as so:

CF Data Source Name: ria
JDBC URL: jdbc:derby:C:\Inetpub\wwwroot\Clients\mydomain.com\wwwroot\RIA\database\RIA;create=false
Driver Class: org.apache.derby.jdbc.EmbeddedDriver

Obviously DSNs require a name, but both the URL and Class are also required (although the create=false part probably isn't). I think things are different because I'm looking at a Windows CF install and you are looking at a Mac. I found a screen shot in this blog post which shows what you were probably looking at: http://fusecf.blogspot.com/2007/08/coldfusion-8-and-derby-db-create-and.html
But that's not what us Winders folks are going to see, so the DSN creation step may cause more than one non-Mac person who is unfamiliar with Derby a bit of consternation. (Not sure what's required for Linux, the power supply on my Fedora box is on the fritz at the moment so I can't fire it up to see.)

I liked the article and code samples, nicely done!

Posted By: Scott Krebs on Mar 21, 2008

@Scott - On 3 CF8 instances I have access to, when I choose 'Apache Derby Embedded' from the list of data source types, on the resulting page I have a form that has the following form fields:

-CF data source name (text)
-Database folder (text) with a button that opens a new window and allows you to browse to the folder you are using)
-Create Database (checkbox)
-Description (textara)

There are no fields for JDBC URL.

It should be noted that I am using CF8 Multi-server installation. One instance is Enterprise edition and the others are developer edition, all running on Windows (either Server 2003 or XP).

Posted By: Scott Stroz on Mar 21, 2008

And my installation is the standard server configuration. Maybe that's the difference, rather than Mac vs Windows?

Posted By: Scott Krebs on Mar 21, 2008

Very nice sample, easy to use and extend. I've mapped it onto my database already..(on Windows, CF on Tomcat, Eclipse as the Dev platform)

As a relative CF beginner, how do you assimilate all the language special info (like the cfgrid special variable names to make the paging code work), and the combination of the CFC and the cfgrid.
(still have trouble with formatting the data in the html grid, dates and data alignments)..

also, one thing never shown, and not talked about that I can see, is how to recognize if a user changes the column order or column size, and how to make that persistant..

thanks again tho.. amazing what a small piece of code can do.

Sam

Posted By: Sam Detweiler on Mar 30, 2008

Add a Comment

Please provide your email address if you want to subscribe to this blog entry. An unsubscribe link is provided in notification emails. Your email address is never shown on this website.
Processing... Please wait
We are adding your comment.