Home > Store

Core ColdFusion 5

Register your product to gain access to bonus material or receive a coupon.

Core ColdFusion 5

Premium Website

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2002
  • Dimensions: K
  • Pages: 992
  • Edition: 1st
  • Premium Website
  • ISBN-10: 0-13-066061-2
  • ISBN-13: 978-0-13-066061-9

The project-based guide to enterprise ColdFusion 5 development!

  • Develop serious applications with ColdFusion 5—fast!
  • Practical, project-based coverage delivers skills and code you can use right now
  • Database integration, Flash graphs, XML, wireless development, and much more
  • New ColdFusion 5 features: user-defined functions, query-of-queries, and data-driven graphs
  • Complete, working applications include an e-commerce site, a banner ad management system, a WML address book application, a site search, an intelligent agent, a ColdFusion 5 certification practice test, and much more!
  • Includes complete CFML tag and function reference
  • CD-ROM: 30-day evaluation copies of the latest Macromedia ColdFusion 5 products, plus an unrestricted copy of ColdFusion Express, and all source code

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 error—and 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 projects—and 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.

  • Preparing your ColdFusion environment and installing ColdFusion 5
  • CFML fundamentals: variables, templates, expressions, conditional logic, structures, arrays, lists, and functions
  • Designing and working with relational databases
  • Building a secure application framework and providing for state management and personalization
  • All of the new ColdFusion 5 features: user-defined functions, query-of-queries, and data-driven graphs
  • Deploying ColdFusion applications in wireless environments
  • Includes a complete ColdFusion 5 tag and function reference-plus step-by-step guidance on creating your own custom tags
CD-ROM INCLUDED

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:

  • ColdFusion 5.0 Enterprise Application Server for Windows, Linux, and Solaris
  • ColdFusion Studio 4.5
  • HomeSite 4.5
  • Macromedia Spectra 1.5 Application Framework
  • JRun Java Server 3.0.1 for Linux and Windows

Sample Content

Table of Contents



Preface.


Acknowledgments.


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?



2. The World Wide Web and HTTP.

What Is the Internet? Application Servers.



3. Preparing Your ColdFusion Environment.

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?



4. Installing ColdFusion 5.

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.



5. ColdFusion Markup Language and Variables.

Introduction to the ColdFusion Markup Language. How to Begin. Your First ColdFusion Template. Setting and Outputting Rules.



6. Passing Data Between Templates.

What Is Scope? Scopes Available to ColdFusion. The CGI Scope. Conclusion.



7. Expressions, Conditional Logic, and Flow Control.

What Are Expressions? What Is Conditional Logic? Flow Control. A Complete Site Flow Control Framework.



8. Functions and Complex Data Types.

What Are Functions? User-Defined Functions. Working with Lists. Arrays. Structures. Putting It to Work.



9. Designing a Relational Database.

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.



10. Working with Relational Databases.

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.



11. A Note about the ColdFusion Administrator.

Server. Security. Tools.



12. Loops.

What Is a Loop? The Query Loop. The Conditional Loop. List Loops. Looping over Structures. ,CFFLUSH.



13. ColdFusion Scripting.

How Does CFScript Work? Conditional Processing. Looping. Another User-Defined Function. Conclusion.



14. The ColdFusion Application Framework.

Defining the Application Framework. Session Variables. Client Variables. Server Variables. Error Handling. Logging Site Information with ,CFLOG. Creating a Personalized Web Page.



15. Graphing with ColdFusion.

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.



16. Sending and Receiving Email with ColdFusion.

Sending Email. Sending HTML Email. Conclusion.



17. File and Directory Management.

,CFFILE. ,CFDIRECTORY.



18. Writing Custom Tags.

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.



19. XML and ColdFusion.

XML. WDDX Datatypes. Serializing and Deserializing Data. WDDX in Action. Conclusion.



20. Creating Intelligent Agents.

CFHTTP. The GET Method. The POST Method. What Do We Do Now?



21. A Complete E-Commerce Application.

Store. Shop. Images. Queries. Checkout. Admin. Conclusion.



Appendix A: ColdFusion 5 Tag Reference.


Appendix B: Coldfusion Function Reference.


Appendix C: Common Errors and What to Do about them.


Appendix D: Getting a Coldfusion Job.


Appendix E: Getting Certified in Coldfusion.


Appendix F: Best Practices.


Appendix G: Wireless Coldfusion with Wap and WML.


Appendix H: Coldfusion resources, User Groups, and Hosts.


Appendix I: SQL Function Reference.


Index.

Preface

Preface

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 hand—the 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 fly—devouring 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.

Who You Are

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.

What You Need

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.

What You Get

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:

  • A clear, detailed explanation of the ColdFusion language and how you can leverage it to build fantastic Web applications.
  • Information, tips, and tricks about becoming a ColdFusion Certified Developer.
  • Thousands of lines of complete, working code.
  • On the CD-ROM, you get 30-day evaluation versions of Macromedia ColdFusion Enterprise Server 5.0 for Windows, HP-UX, Sun Solaris, and Linux; ColdFusion Studio 4.5.1 (the optional development environment for creating ColdFusion templates); HomeSite 4.5.1, Macromedia's award-winning HTML editor; The Harpoon Flash Toolkit; ColdFusion Express, the nonexpiring, limited-functionality product for serving ColdFusion pages; JRun 3.0.1, the award-winning server for Java Server Pages, Servlets, and Enterprise Java Beans; Macromedia Spectra 1.5 for Windows and Sun Solaris, the packaged application solution for content management, e-commerce, and personalization—written in ColdFusion!
  • A website companion to the book filled with even more ColdFusion resources. The website is located at http://www.CoreColdFusion.com. Check out http://www.conditionallogic.com as well.

How This Book Is Organized

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.

About the Website

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:

  • Databases, files, and code from the book
  • Code for creating the website
  • Enhancements and expansions to discussions in the book
  • Links to ColdFusion hosting providers
  • Resource links for ColdFusion User Groups and the most useful ColdFusion sites on the Web
  • Information about becoming a Macromedia ColdFusion Certified Developer
  • A newsletter with product and informational updates on ColdFusion and Spectra
  • A forum for reader feedback—tell me what you think!
  • A schedule of ColdFusion and Spectra training seminars happening every month, all over the United States
  • Fun things like the ColdFusion challenge—a compendium of tips and tricks
  • Security bulletins

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 doing—it 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.

Updates

Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership