Bruce Phillips Blog on Java, ColdFusion, Flex and Spry - ColdFusion /blog/index.cfm Tutorials on using Java, ColdFusion, Flex, and Spry en-us Tue, 15 Nov 2016 19:22:24 -0700 Tue, 25 Mar 2008 09:06:00 -0700 BlogCFC Bruce Phillips Blog on Java, ColdFusion, Flex and Spry /blog/index.cfm no An Introduction to Integrating ColdFusion, ColdSpring, and Flex 3 /blog/index.cfm/2008/3/25/An-Introduction-to-Integrating-ColdFusion-ColdSpring-and-Flex-3 <p>I am presenting how to use ColdFusion, ColdSpring, and Flex together to the Kansas City Adobe RIA User Group on March 25, 2008. ColdSpring is a framework that helps developers manage the dependencies between ColdFusion Components (CFCs). ColdSpring has a feature that enables it to create a remote facade for any of the CFCs that it manages. A Flex application can connect to the remote facade CFC to get data, save information, or to perform other server side operations. My presentation provides an introduction on how to use ColdSpring to manage dependencies and how to enable ColdSpring to create remote facade CFCs. </p> <p>Using the links below you can download a copy of the presentation and the example projects. In the first part of the presentation, I explain how to setup the example projects and the database they use.</p> [More] Flex ColdFusion Tue, 25 Mar 2008 09:06:00 -0700 /blog/index.cfm/2008/3/25/An-Introduction-to-Integrating-ColdFusion-ColdSpring-and-Flex-3 The Grade Schooler's Guide to Mach-II Version 1.5 - Part 1 Naked Mach-II /blog/index.cfm/2008/2/9/The-Grade-Schoolers-Guide-to-MachII-Version-15--Part-1-Naked-MachII <h3>Introduction</h3> <p>Mach-II is a ColdFusion framework that can help you build complex web applications. Recently, the Mach-II developers (see reference 1) released version 1.5. I had previously used the older version of Mach-II and also recently took over a very large web application that uses Mach-II so I want to learn how to use the new features in Mach-II version 1.5. But after visiting the Mach-II website and looking over the documentation, I think it might be helpful to myself and others if I start a &quot;grade schooler's&quot; series of how to install, configure, and use Mach-II version 1.5. Please note, I'm far, far, far from being any kind of Mach-II expert. I've used the older version and I understand most of the basics, but I'm kind of like the junior high school kid who tutors 4th graders on math. If you need expert help, consult reference 6. </p> <p>This blog entry will just focus on getting and setting up Mach-II version 1.5. In my sample configuration I won't be integrating ColdSpring (see reference 2). Mach-II and ColdSpring work very well together and provide a powerful framework for building complex web applications. But let's start simple, after all this is grade school!</p> [More] ColdFusion Sat, 09 Feb 2008 16:55:00 -0700 /blog/index.cfm/2008/2/9/The-Grade-Schoolers-Guide-to-MachII-Version-15--Part-1-Naked-MachII The Grade Schooler's Guide To ColdSpring - Part 3 Providing Default Values To ColdSpring /blog/index.cfm/2008/1/1/The-Grade-Schoolers-Guide-To-ColdSpring--Part-3-Providing-Default-Values-To-ColdSpring <h3>Introduction</h3> <p>In this part of our grade school ColdSpring primer, let's discuss providing default values that ColdSpring may use when creating the CFC objects it will manage for us. In <a href="/blog/" target="_blank">the example code</a> for this entry I've added a new CFC - UserGateway. This CFC contains functions that work with more than one user. However, this CFC, like the UserDAO CFC, must know (is depending on) a value for the datasource that connects ColdFusion with the database. I need to use the same datasource name for the UserGateway CFC as is provided for the UserDAO CFC (in my example this is justCSdbMySQL). </p> [More] ColdFusion Tue, 01 Jan 2008 20:50:00 -0700 /blog/index.cfm/2008/1/1/The-Grade-Schoolers-Guide-To-ColdSpring--Part-3-Providing-Default-Values-To-ColdSpring The Grade Schooler's Guide To ColdSpring - Part 2 Flex To ColdSpring Connection /blog/index.cfm/2007/12/31/The-Grade-Schoolers-Guide-To-ColdSpring--Part-2-Flex-To-ColdSpring-Connection <h3>Introduction:</h3> <p>One of the web applications I'm developing for the Kansas City Adobe User Group uses a Flex front end. The backend CFCs are managed by ColdSpring (see <a href="/blog/index.cfm/2007/12/29/The-Grade-Schoolers-Guide-To-ColdSpring--Part-1-Naked-ColdSpring" target="_blank">part 1 Naked ColdSpring</a>). Since ColdSpring is managing the CFCs and their dependencies, I cannot just call my UserService CFC from Flex. My Flex application needs to connect to the UserService object being managed by ColdSpring, which has all of its dependencies resolved.</p> <p>ColdSpring provides a means to create a version of my UserService CFC that Flex can connect to. References 1 and 2 provide some advanced explanations of how to get ColdSpring to create a remote version of a CFC. This blog entry will provide the grade school version.</p> [More] Flex ColdFusion Mon, 31 Dec 2007 12:45:00 -0700 /blog/index.cfm/2007/12/31/The-Grade-Schoolers-Guide-To-ColdSpring--Part-2-Flex-To-ColdSpring-Connection The Grade Schooler's Guide To ColdSpring - Part 1 Naked ColdSpring /blog/index.cfm/2007/12/29/The-Grade-Schoolers-Guide-To-ColdSpring--Part-1-Naked-ColdSpring <h3>Introduction</h3> <p>&quot;<em>ColdSpring is a framework for ColdFusion Components, inspired by the Spring Framework for Java, and its core focus is to manage the dependencies within your CFC &quot;model.&quot;</em> (2). ColdSpring has been around for several years now, but I'd not really used it on a project yet. However, recently I took over the maintenance of a very large ColdSpring/Mach-II application and also am working with the Kansas City user group on creating a new user group web site that is using ColdSpring and Model-Glue. So I needed to get smart on ColdSpring and how to use its many features.</p> [More] ColdFusion Sat, 29 Dec 2007 16:53:00 -0700 /blog/index.cfm/2007/12/29/The-Grade-Schoolers-Guide-To-ColdSpring--Part-1-Naked-ColdSpring ColdFusion 7, Spry 1.6, and JSON - A Beginner's Tutorial /blog/index.cfm/2007/12/4/ColdFusion-7-Spry-16-and-JSON--A-Beginners-Tutorial <h3>Introduction</h3> <p>Spry now supports the JavaScript Object Notation (JSON) data format. You can use ColdFusion to generate JSON formatted data that can be used by Spry. One advantage of using the JSON data format over XML is the JSON format enables a smaller file size and quicker processing (see references 1 and 2). I wanted to test using JSON formatted data instead of XML with a project I was working on so I researched how to use ColdFusion to create JSON formatted data and use that data with Spry. This post provides a step-by-step tutorial to create a very simple example of using JSON formatted data with Spry.</p> [More] Spry ColdFusion Tue, 04 Dec 2007 22:21:00 -0700 /blog/index.cfm/2007/12/4/ColdFusion-7-Spry-16-and-JSON--A-Beginners-Tutorial Use Spry and ColdFusion To Create Paged Data With Additional Information Loaded Using Ajax /blog/index.cfm/2007/12/1/Use-Spry-and-ColdFusion-To-Create-Paged-Data-With-Additional-Information-Loaded--Using-Ajax <p>I needed to create a web page that would show data from a database a page of data at a time and for each item shown, have a link that would dynamically load into the page--just below the item--more details about that item. The challenge was that I could not return all the details needed from the database into one dataset because of the number of items and the size of each item. It would just take too long to get back all that XML. However, by using Spry and ColdFusion I could get the additional details for an item and load it into the page after the user clicked on a link for that item. Thus the dataset I first get when the page loads can be much smaller since it doesn't have to include all the extra details for each item.</p> [More] Spry ColdFusion Sat, 01 Dec 2007 22:59:00 -0700 /blog/index.cfm/2007/12/1/Use-Spry-and-ColdFusion-To-Create-Paged-Data-With-Additional-Information-Loaded--Using-Ajax Using The ValueList and ListToArray Functions To Convert Values Stored In A Query Column To An Array /blog/index.cfm/2007/11/24/Using-The-ValueList-and-ListToArray-Functions-To-Convert-Values-Stored-In-A-Query-Column-To-An-Array <p>I recently was fortunate to study an advanced ColdFusion developer's code. I noticed his use of the valueList and listToArray functions to convert the values stored in a query column to an array. The array then was used to provide the bean with a value for one its properties that was storing multiple values. </p> [More] ColdFusion Sat, 24 Nov 2007 10:11:00 -0700 /blog/index.cfm/2007/11/24/Using-The-ValueList-and-ListToArray-Functions-To-Convert-Values-Stored-In-A-Query-Column-To-An-Array Corrections To Flex Exchanging Data With ColdFusion Backend Posted on Adobe's Flex Developer Center /blog/index.cfm/2007/11/21/Corrections-To-The-Flex-Exchanging-Data-With-ColdFusion-Backend-Posted-on-Adobes-Flex-Developer-Cen <p>I was recently working my way through a Flex tutorial on exchanging data with a backend ( see: <a href="" target="_blank"></a>) provided by Adobe's Flex Developer's Center. The example in Adobe's tutorial uses the Flex HTTPService to consume XML produced by ColdFusion (there is also backend code for Java,, and PHP provided). Unfortunately, there are some mistakes in the ColdFusion backend code that prevented me from getting the example using ColdFusion on the backend to work. I posted a comment about the problem to the page and pointed readers to this blog entry. </p> [More] Flex ColdFusion Wed, 21 Nov 2007 17:32:00 -0700 /blog/index.cfm/2007/11/21/Corrections-To-The-Flex-Exchanging-Data-With-ColdFusion-Backend-Posted-on-Adobes-Flex-Developer-Cen Updating and Adding Records Being Displayed In ColdFusion 8's cfgrid /blog/index.cfm/2007/8/8/Updating-and-Adding-Records-Being-Displayed-In-ColdFusion-8s-cfgrid <h3>Introduction: </h3> <p>The <a href="" target="_blank">CF 8 Developer's Guide (pages 630-635)</a> discusses the <a href="" target="_blank">new cfgrid tag</a>. I was especially interested in how to update cfgrid's data provider by changing the values displayed in the grid and by adding a new record to the underlying data. The developer's guide provides an example of how to update the data source for values displayed by the cfgrid. However, the documentation explains that &quot;you cannot insert new rows directly in a grid...To add rows you must enter the data in a form, and make sure the grid refreshes after the form has been submitted.&quot; (page 633) Unfortunately, there is no example in the developer's guide of how to do that, so I created <a href="/cf8test/" target="_blank">my own example code</a> (based somewhat on the cfgrid update example provided in the developer's guide). To view a working version see: <a href='/cf8test/employees.cfm' target='_blank'> /cf8test/employees.cfm</a>.</p> [More] ColdFusion Wed, 08 Aug 2007 21:25:00 -0700 /blog/index.cfm/2007/8/8/Updating-and-Adding-Records-Being-Displayed-In-ColdFusion-8s-cfgrid ColdFusion 8 cfinterface Example - Using An Interface In CF 8 /blog/index.cfm/2007/8/5/ColdFusion-8-cfinterface-Example--Using-An-Interface-In-CF-8 <h3>Introduction</h3> <p>ColdFusion 8 added the cfinterface tag, which enables CF developers to use interfaces in their applications. Interfaces specify one or more functions that a ColdFusion component must implement. Coming from being a Java programmer to primarily doing ColdFusion web application development, I missed using interfaces. To help me learn how to use the new cfinterface tag, I implemented the SimUDuck application from chapter 1 of Head First Design Patterns. You can download the code (see the references below) for the application. I'll briefly walk through how cfinterface works.</p> [More] ColdFusion Sun, 05 Aug 2007 13:20:00 -0700 /blog/index.cfm/2007/8/5/ColdFusion-8-cfinterface-Example--Using-An-Interface-In-CF-8 Adding Percentages To A Chart Created With ColdFusion /blog/index.cfm/2007/5/24/Adding-Percentages-To-A-Chart-Created-With-ColdFusion <p>My boss wanted me to add percentages to a chart I built using ColdFusion. I researched the CF cfchart and cfchartseries tags in the CF documentation online to see if there was some way to get CF to do this for me. I didn't find any attributes that did that. So I spent a couple of hours adding code to do the math for me and display the percentages as part of each bars label. Later I learned I wasted my time!</p> [More] ColdFusion Thu, 24 May 2007 15:08:00 -0700 /blog/index.cfm/2007/5/24/Adding-Percentages-To-A-Chart-Created-With-ColdFusion ColdFusion Structures and Associative Array Notation /blog/index.cfm/2007/5/22/ColdFusion-Structures-and-Associative-Array-Notation <p>I recently had to create a bar chart in ColdFusion using a structure data type. To make it easy to display each bar's label I used the associative array notation for the key names when I created my structure. The associative array notation enables your structure keys to &quot;contains spaces, numbers, or special characters.&quot; (Reference 1). I've forgotten in the past that this alternative way of specifying structure keys is available in ColdFusion so this blog entry will remind me (and maybe others) about the associative array notation for structures. </p> [More] ColdFusion Tue, 22 May 2007 19:48:00 -0700 /blog/index.cfm/2007/5/22/ColdFusion-Structures-and-Associative-Array-Notation Troubleshooting A Problem In Flex With Relating An ActionScript Class To A ColdFusion CFC /blog/index.cfm/2007/5/16/Troubleshooting-A-Problem-In-Flex-With-Relating-An-ActionScript-Class-To-A-ColdFusion-CFC <p>I recently discovered the solution to a problem I was having relating an ActionScript class to a ColdFusion CFC. To troubleshoot the problem, I created a very simple test application. In the test application, I have a Person CFC and a PersonServices CFC. The PersonServices CFC has methods that return a single Person object and an array of Person objects. On the Flex side, I have a Person ActionScript class that matches up with the Person CFC. </p> <p>Initially, during my testing, the object returned by the CFC function was not being automatically cast to the correct ActionScript class type in Flex even though I had created the matching ActionScript class. Rather the type returned by the CFC was only recognized as a generic Object in my Flex application (instead of the Person ActionScript type it should have been).</p> [More] Flex ColdFusion Wed, 16 May 2007 16:11:00 -0700 /blog/index.cfm/2007/5/16/Troubleshooting-A-Problem-In-Flex-With-Relating-An-ActionScript-Class-To-A-ColdFusion-CFC Developing A Login System For A Flex Application With A ColdFusion and Database Backend Part 1 /blog/index.cfm/2007/3/16/Developing-A-Login-System-For-A-Flex-Application-With-A-ColdFusion-and-Database-Backend-Part-1 <h3>Introduction</h3> <p>At work, I'm developing a Flex intranet company newsletter application. One of the first parts of the application is a login for users. To document what I'm learning as I design this application, I'm starting a series of blog entries on creating a Flex application that uses a login system tied to a database backend to authenticate a user before showing the user the main application. I will start from scratch and post a series of articles on how I designed this login system.</p> [More] Flex ColdFusion Fri, 16 Mar 2007 22:31:00 -0700 /blog/index.cfm/2007/3/16/Developing-A-Login-System-For-A-Flex-Application-With-A-ColdFusion-and-Database-Backend-Part-1