PRODUCT SUPPORT ANNOUNCEMENT
Some videos and Web Editions may be returning errors on launch. Learn more.
The project-based guide to enterprise ColdFusion 5 development!
Core ColdFusion 5 is a relentlessly practical, project-focused guide to the specific techniques and skills you need to build serious enterprise applications with ColdFusion 5.
Certified ColdFusion expert Eben Hewitt walks you through constructing and integrating several increasingly complex, real-world applications. Every project delivers critical skills you'd otherwise have to learn through trial and errorand provides rock-solid code you can use in your own projects.
Hewitt's realistic "notes from the field" cut through the hype, helping you jump start your own projectsand build working systems fast. From the fundamentals of CFML to advanced database integration, to building a complete e-commerce site and XML-based content serialization, there's no better book for developers who just want to get the job done.
The accompanying CD-ROM contains completely unrestricted copies of ColdFusion Express and Macrodmedia Flash Toolkit for ColdFusion, all of the book's source code, plus 30-day evaluation copies of all these Macromedia enterprise development tools:
1. Getting the Lay of the Land.
What Is ColdFusion? What Can It Do for You? Why ColdFusion? What's New in Macromedia ColdFusion 5? What Difference Does the Macromedia Merger Make?
What Is the Internet? Application Servers.
Operating-System Requirements. Hardware Requirements. Choosing a Web Server. Choosing a Data Server. Choosing a Version of ColdFusion 5. Getting ColdFusion 5. What's Next?
Step 1: Checking Installation Requirements. Step 2: License Agreement. Step 3: Customer Information. Step 4: Web Server. Step 5: Choose Destination Path. Step 6: Choose Components to Install. Step 7: Assign Passwords. Step 8: Confirm Selections. Step 9: Install Files. What ColdFusion Installs on Your Machine. Troubleshooting Your Installation. Installing ColdFusion on Linux. Uninstalling ColdFusion.
Introduction to the ColdFusion Markup Language. How to Begin. Your First ColdFusion Template. Setting and Outputting Rules.
What Is Scope? Scopes Available to ColdFusion. The CGI Scope. Conclusion.
What Are Expressions? What Is Conditional Logic? Flow Control. A Complete Site Flow Control Framework.
What Are Functions? User-Defined Functions. Working with Lists. Arrays. Structures. Putting It to Work.
Three-Tier Architecture. What Is a Database? The Relational Database. Normalization. A Database Creation Script for Microsoft SQL Server. Tips for Writing a Database and Planning Your Web-Based Application. Conclusion.
Data Manipulation Language. Connecting to a Database. ColdFusion Datasources. Creating a Datasource in ColdFusion Administrator. ,CFQUERY. Inserting Records. Updating Records. Deleting Records. Joins. GROUP BY. HAVING. A Complete Search Engine Application. Conclusion.
Server. Security. Tools.
What Is a Loop? The Query Loop. The Conditional Loop. List Loops. Looping over Structures. ,CFFLUSH.
How Does CFScript Work? Conditional Processing. Looping. Another User-Defined Function. Conclusion.
Defining the Application Framework. Session Variables. Client Variables. Server Variables. Error Handling. Logging Site Information with ,CFLOG. Creating a Personalized Web Page.
Making a Simple Graph. Horizontal and Bar Graphs. Pie Graphs. Line and Area Graphs. Speeding Load Time with ,CFSAVECONTENT. Using ,CFGRAPHDATA. A Complete Data Drill-Down Graph Application.
Sending Email. Sending HTML Email. Conclusion.
Advantages of Custom Tags. Disadvantages of Custom Tags. Creating a Simple Custom Tag. Passing Values into and out of Custom Tags. Making a Banner Ad Custom Tag. How ColdFusion Finds Custom Tags. Nested Custom Tags. Encrypting Custom Tags. Conclusion.
XML. WDDX Datatypes. Serializing and Deserializing Data. WDDX in Action. Conclusion.
CFHTTP. The GET Method. The POST Method. What Do We Do Now?
Store. Shop. Images. Queries. Checkout. Admin. Conclusion.
Core ColdFusion 5 is the book I wish I'd had when I began writing applications. One way of teaching programming is for the author to entice you, gentle reader, into the Technicolor landscape of the programming language at handthe author is your friendly guide, pointing out the dazzling array of colors and scents, while you, the Maui-shirted, floppy-hatted tourist, peer dimly into your map as you stand gawking dead center at the intersection of 42nd and Broadway. You get your required caramel milkshake at Ellen's Stardust Diner and move on to stand in line for Cats tickets. Or something like that.
This is a different kind of book.
I learned ColdFusion on the flydevouring websites and books devoted to the topic, nosing about in newsgroups and loitering on lists while I tried to get my first applications up and running. I learned by reading, by asking endless questions, by trying things over and over until something clicked. I learned from the generosity of hundreds of programmers it has been my pleasure to work with. I don't view it as an academic subject. This learning process was all very glamorous, but I think I wasted a lot of time that I didn't need to waste.
The approach is this: programmers are, above all, problem solvers. That's what they get paid to do. Therefore, the language is presented as a set of tools that are available to you to solve business problems. The code you will work with will consist of numerous non-trivial, practical examples that you can build on and incorporate into your own websites. My belief is that you can learn best how it all fits together by seeing it in action, working together. For instance, it's fun to learn about cookies, and it's great to know that by using the CFLOCATION tag in your templates you can quickly jump to another URL. This is the sort of thing one learns as a programming tourist. Only when discussing a real-world application where all the parts have to fit together do you discover that, because of HTTP headers, you can't effectively set a cookie in the same template that you use CFLOCATION to get out of. But that's exactly the sort of thing you need to know when you sit down to write ColdFusion.
You are a person in the world where people live. This indicates a certain relationship with space and time. This book was designed with these key factors in mind. There is only so much space in a book, so what you've got in your hands is the set of tools with which to continue on your own: There's the complete tag and function reference. There are lists of dozens of websites where you can get ColdFusion code, find more information on related topics, discover hundreds of places where you can host your ColdFusion website, and more. You get a list of the common ColdFusion errors you'll run into when debugging your applications, what they mean, and how to fix them. You put together a ColdFusion application for Web-enabled cell phones and a working e-commerce site, complete with rotating banner ads.
The idea is to save your walls from the repeated impact of your head. This book will give you everything you need to get up and running quickly, effectively, and with an understanding of the real-world implications of developing with ColdFusion.
The remainder of this preface briefly illuminates key things you will need to start using this book, and ColdFusion, quickly.
This book was written for anybody who wants practical knowledge of how to make Web applications on an easy, scalable, powerful platform.
You know HTML already. You do not need to know another application programming language. You do not need knowledge of Web servers or data servers.
Maybe you know ASP or JSP and want to learn another language. This book is perfect for you. Maybe you just took an IT job at Symantec or Doctor Solomon's or Bank of America or the University of Utah or the Recording Industry of America. Or maybe you were just elected Senator of your fine state, and, while browsing at http://www.Senate.gov noticed the little ".cfm" extension on your website and wondered what it was. All of the above organizations entrust their Web transactions to ColdFusion. And with good reason.
This book was also written for Web developers and for people who have done a static website or two and want to make their next one dynamic. The ability to create an online store, to interact with data warehouses via enterprise-level features such as stored procedures and data probing, lets you get really serious. The ability to personalize your website, catering its content to each individual visitor, will allow you to create truly compelling relationships with your users. The ability to search and share documents in just about any format will allow your organization to stay ahead of the information cycle.
Project managers and sales engineers will benefit from this book's discussions of planning an enterprise-level website and making all of the components come together.
Despite a seemingly universal predilection toward Mountain Dew, Web programmers are a diverse species. Whether you are a pleasantly dressed co-ed working in a college computer lab with well-modulated air, or if you're grinding out 18-hour days in a high-tech job shop and have recently started looking like the long-lost fourth member of ZZ Top, or whether you're all by yourself in your basement playing gladiator with IIS and scramming the cat from chewing your cables, this is the right book for you.
You will need several things to work successfully through the exercises in this book. You will need a computer with a text editor. You will need access to ColdFusion Server 5 software, a Web server, and an Internet connection. A 30-day evaluation version of ColdFusion 5 comes on the CD-ROM with the book, Notepad or Pico comes with your OS, and Apache is free, so you're in pretty good shape.
This is a practical book. Its purpose is to answer the questions you need answered by showing you how everything works together (HTTP 1.1 headers, the Web server, your applications, conditional logic, and so forth). Some of this may be old hat to you. I have therefore tried to flag you about beginner material that you may want to skip.
Here is what you get:
http://www.CoreColdFusion.com. Check out
This book begins where HTML left off. We start with an overview of how the Internet works and an overview of what ColdFusion does. We then move into a discussion of SQL (the Structured Query Language), the language used to create and manipulate databases and their data. If you have a solid understanding of relational databases and SQL, you can probably skim Chapters 9 and 10.
Each chapter will have roughly the same structure. You will be introduced to the key concepts in a general way, and quickly move into details as they pertain to ColdFusion or application development. You'll come out of most chapters with a working example that you can take with you.
Because each chapter builds on the last, it is a good idea to read the book from beginning to end. If you're used to programming in another Web application language such as PHP, you might want to at least skim the introductory chapters on the World Wide Web and HTTP, as well as the SQL chapters, just so I don't make unfortunate assumptions.
As the book continues, and you've got the key concepts and a number of tags and functions under your belt, we'll start putting together bigger applications with a number of pieces that have to fit together. That is the only way you can learn how to work with ColdFusion in large-scale websites.
Many of the examples in this book were created with the ColdFusion Application Server running on a Windows 2000 with IIS 5. The database used in most cases is Microsoft SQL Server 2000. Oracle 8i is used in some examples. Access has generally been eschewed because, while it is inexpensive and therefore easier to get hold of, it is desktop software and unsuited to a production environment. You can make most of the examples in this book work with Access or Paradox with little or no modification. You can even use Excel spreadsheets and plain text files with some modification. That's a fabulous aspect of ColdFusion, and just one demonstration of its flexibility. However, I try to discourage the use of desktop database software with ColdFusion for applications that are likely to have more than a couple of concurrent connections or any frequency of use.
If you point your browser to
http://www.CoreColdFusion.com, you will discover the companion website to this book. It is meant to provide you with a resource for taking your applications to the next level and continuing your work.
Some features of the website include:
If I've done my job, this book will teach you what you need to know about ColdFusion in order to go do it in the real world. Hopefully it will also prove useful long after you know what you're doingit has been organized to serve also as a reference. It's got the complete language in it, updated for ColdFusion 5. And it's got working examples that represent the most commonly needed tasks in Web programming today.
You can give me feedback at
writer@CoreColdFusion.com. I welcome your comments and suggestions for future editions.
Thank you for picking this up. I really hope you like it.