
Premium Content articles are the very best articles from the world's leading internet technology, subject-matter experts. We have many categories of content below on a wide variety of subjects that has all been commissioned from both big name authors.
Co-o-old Fusion, Baby!
This article, that is part of the Dreamweaver 8 e-book, continues our walk through the Application realm of Dreamweaver 8 with a look at the integration available in the new upgrade for Macromedia’s own server model, Cold Fusion. When the fabulous Cold Fusion Server Model 7 was released early this year, it packed a lot of power and gave developers a lot to think about in terms of what they could do, but not necessarily how to do it, unless they wanted to hand code.
Dreamweaver 8 has taken care of that by integrating a previously semi-satisfactory set of extensions into the core product and making them not only work, but work well. It has also given us a whole new toolbar for Cold Fusion forms that changes depending on whether the server model is Cold Fusion 6 or Cold Fusion 7.
And finally, Dreamweaver 8 has so much functionality packed into it for the Cold Fusion developer that there is almost no reason to visit the Cold Fusion Administrator, at least not regularly. In fact in the preparation of this article, I did not leave the Dreamweaver program to access the Administrator even once. It’s all right here in Dreamweaver at your fingertips.
Come on .. have a look. Who knows? If you don’t do Cold Fusion today, perhaps you will be doing Cold Fusion tomorrow! I wouldn’t be the least bit surprised!
Creating a ColdFusion components in Dreamweaver
One of the questions that we hear a lot is, “How do I use CFC’s? Everybody talks about it, but how does it work?”
This tutorial contains a movie on how to create ColdFusion components by using the CFC panel in Dreamweaver. Michael van Leest explains how to do this in the “Object Orientated” way.
First Michael creates a CFC with Dreamweaver and modifies it so it contains 3 methods (functions):
- getGreeting
- setName
- setGreeting
The component will also contain 2 variables that can be used and manipulated by all 3 functions.
Coldfusion MX (7), Multiple Update Delete Functionality
Click click click click click…. AAAHH! The clicking madness
One of the common user friendly functionality is the ability to update and/or delete multiple records at the same time. This has benefits for the user because it is much easier to maintain data and the user doesn’t need to click hundreds of times to do the same with 1 click. But also the traffic of your database and web server goes down enormously and in the end it will benefit your application. So if you want to make your customer happy, this is the way to go if you need to update records frequently.
In this article we’re going to build a “restaurant menu manager”. With this manager you can insert dishes, put them in a specific dish type and set the display order of the individual dishes within a dish type.
Sounds complicated huh?! If you’re not familiar with Coldfusion, it could be, if you are familiar, it isn’t.
So take a look at the prerequisites
ColdFusion MX: Securing Your Application
In the last article we built out the back-end administration of the website in CFForms & Administration (Part 2 of 2). We had already built the tools to allow people to put stuff into the database, so we built a way to get things out of the database. Our goal was to build the framework for our back-end, and build one tool that allowed us to report off the sales leads. The last article was full of great tips, additional use of Dreamweaver code wizards and we also spent a great deal of time explaining the code that we used as well. One such example is that we introduced recordset paging and recordset navigation. These two useful tools allow you to be informed on what records you’re viewing, and a means to navigate through all the records being returned.
In this article we want to secure what we’ve created so that only people with the right login, password and security role can log in and interact with the back-end admin section. We will focus our attention on the Application framework, the Application.cfm file, Application variables and how to secure your website with a login and password using <cflogin>, <cfloginuser>, <cflogout> as well as some related functions: GetAuthUser() and IsUserInRole().
Introduction to Coldfusion Components
Introduction
Coldfusion Components also known as CFC’s. A lot of people I know who program Coldfusion and not use CFC’s have as excuse; it’s too hard to learn! It’s too hard to learn?? No way!!
It’s very easy to learn. It’s just an other way of thinking than you’re used to. You must see CFC’s as building blocks. By constructing “building blocks” you’re code is much cleaner and far more reusable, thus quicker to build your application. Most (if not every) Coldfusion developer knows UDF’s (User Defined Functions) and Custom Tags. CFC’s are almost the same as Custom Tags, but have some differences:
- Custom Tags have a single entry point; CFC’s can have multiple entry points. This makes it possible to create a single component that does many related actions. (To do that with custom tags you would need multiple tags or cumbersome switch processing.)
- Custom Tags have no formalized parameters passing and validation mechanism; CFC’s do. In other words unlike custom tags, CFC’s can validate passed data, enforce data types, check for required parameters, and optionally assign default values.
- Custom Tags cannot persist; CFC’s can. Custom Tags are blocks of code that are executed as is, while CFC’s are objects and can be treated as such.
- Custom Tags are designed to contain code; CFC’s are designed to contain both code and data.
- Custom Tags are accessible only by Coldfusion and only locally; CFC’s can be accessed as web services, opening up a whole new world of reuse possibilities.
To sum it up, CFC’s and Custom Tags are quite different. Although their functionality does overlap a little, they really do not solve the same problems at all. So to learn the basics of CFC’s while head right on it and start with some sample “spaghetti code” and transform it to a structured and reusable way; a CFC. Please note that this article only covers the basics of CFC’s and does not handle any advanced topics.
Coldfusion MX 7: Performance tuning
In this tutorial we’re going to talk about performance tuning your Coldfusion application. Some of the performance tips are compatible with Coldfusion MX 6.x, but most of the performance tips are Coldfusion MX 7 only features. We’re going to talk about query/database performance, caching your pages and finding the “bottle necks” in your application.
ColdFusion MX: CFForms and Back-End Administration (part 2 of 2)
ColdFusion MX: CFForms and Back-End Administration (part 2 of 2)
In the last article (part 1) we went through all the different types of server-side as well as client-side validation of data submitted by a form. We even exposed some of the JavaScript that is written by ColdFusion when using <cfform> and <cfinput> together. We also looked at the key differences between server-side validation and client-side validation as a best approach to how to build your next form / action page application. I was hoping to get into the Back-End Administration construction but my article got too big and ran out of time to “Git-'R-Done!"
In this article we’re picking up where we left off to build out the back-end administration of the website. This is a good time to begin it since we’ve added some front-end capabilities that work with a database. It stands to reason that if we allow people to put stuff into the database, we better have a way to get things out of the database. Our goal is to build the framework for our back-end, and build one tool that will allow us to report off the sales leads. We’ll have a search interface so we can pull database records based on form criteria supplied by an admin user. We’ll automatically pull the top 10 most recent records and make the table display columns clickable so the user can sort the data they’re seeing by ascending and descending order on the column itself. We’re going to use some of the ColdFusion code wizards in Dreamweaver MX 2004, and we’ll look at some intermediate to advanced-level ColdFusion code suitable for a beginner. One such example is that we will introduce recordset paging and recordset navigation. These two useful tools allow you to be informed on what records you’re viewing, and a means to navigate through all the records being returned.
ColdFusion MX: CFForms and Back-End Administration part 1
ColdFusion MX: CFForms and Back-End Administration (part 1 of 2)
In the last article we began to build a web application using forms to insert records into a MySQL database. The concept was simple, we had potential customers that were interested in a vacation from our OKCTravel.com website and they used a form to have their information and interests stored in a database. I gave an overview on HTML forms as well as the SQL for an insert statement and how to orchestrate a “form page, action page” type of application.
In this article we’d like to expand a little on our forms by introducing CFForms using the <cfform> tag. Without giving away all of its secrets, ColdFusion will parse your page and create valid JavaScript routines to handle some very common client side validation of your forms. This is great because end-users will be prompted with JavaScript alert boxes of the things that are incorrect on their form which saves them from having to submit the form to the server to do the checking.
Here are the topics that we’re going to cover in part 1 of this article:
- <cfform>
- <cfinput>
- Server-Side vs. Client-Side Validation
These topics will give us a chance to explore everything there is to offer about forms and client-side validation in addition to building out our back-end administration (in part 2). This article will not cover security just yet. We’re going to build the framework and a working application and perhaps in the next article we’ll discuss securing our application, but by the end of this article series you’ll have a completed framework for your entire website. When you read this article, don’t forget to grab the source code too – it’s all included just for you!
Free! - Coldfusion MX 7, Learning the new features
What’s new in ColdFusion MX 7
Finally a real “developer” version is released of ColdFusion. The release of MX a few years ago was more a performance update by making it a Java based server instead of the “full of memory leaks” C++ version.
With the capabilities of Java, the ColdFusion team managed to create some very helpful features, such as reporting capabilities, FlashPaper 2/PDF creation, Rich Forms, new Charting engine, improved search engine (Verity), Dreamweaver MX 2004 server management integration, Gateways, Administrator API and lots and lots of other features.
So let’s start with one of the, in my eyes, best productivity enhancements, Rich Forms.
Rich Forms
With the ColdFusion Rich Forms you can easily create complex forms, generated in plain HTML, Xforms (XML) or Flash forms. Let’s take a look at an example of a Rich Form in Flash format.
<cfform name="foo" action="process.cfm" method="post" format="flash" skin="haloBlue" width="390" timeout="10" preloader="true">
<cfformgroup type="tabnavigator">
<cfformgroup type="page" label="Message Inbox">






