1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Adobe ColdFusion Anthology doc

543 853 2

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 543
Dung lượng 31,32 MB

Nội dung

Dinowitz Adobe ColdFusion Anthology Companion eBook Available 7.5 x 9.25 spine = 1.03125" 544 page count THE EXPERT’S VOICE ® IN WEB DEVELOPMENT Adobe ColdFusion Anthology Clear and Concise Concepts from the Fusion Authority Michael and Judith Dinowitz Foreword by Ben Forta, Director of Platform Evangelism, Adobe Systems Inc. this print for content only—size & color not accurate CYAN MAGENTA YELLOW BLACK PANTONE 123 C BOOKS FOR PROFESSIONALS BY PROFESSIONALS ® Adobe ColdFusion Anthology Dear Reader, This book is an anthology of the most current technical articles published in the Fusion Authority Quarterly Update, a collection of some of the most impor- tant issues in the ColdFusion community in a single volume. Over the years it has been published, the Fusion Authority Quarterly Update has become known for one thing first and foremost: the quality of its articles. From that treasure trove of content, we have created this volume, which represents what we feel were the cream of the crop among those articles, including “The Shoemaker and the Asynchronous Process Elves” and “You Might Have a Performance Bottleneck If ” The topics, best practices, and development tools covered in this book are essential to ColdFusion developers and include: • working with ColdFusion frameworks, such as Model-Glue, Fusebox, Mach-II, and ColdSpring • using Application.cfc • integrating with web services • building object-oriented applications • implementing version control with Subversion Each article is written by experts in the field with practical, hands-on-experi- ence and covers its topic thoroughly. Every article in this anthology has been thoroughly updated to reflect all of the new features and functionality released in ColdFusion 9. Whether you are new to the language or a CFML guru, we are certain you will find the articles in this book an invaluable resource and reference for your library. Even if you're new to the language, you will receive much from reading this book. Michael Dinowitz, Publisher Judith Dinowitz, Master Editor-in-Chief The Fusion Authority Quarterly Update US $39.99 Shelve in: Web Development User level: Intermediate www.apress.com SOURCE CODE ONLINE Companion eBook See last page for details on $10 eBook version ISBN 978-1-4302-7215-1 9 781430 272151 5 39 9 9 Michael Dinowitz Judith Dinowitz www.it-ebooks.info www.it-ebooks.info Adobe ColdFusion Anthology Clear and Concise Concepts from the Fusion Authority ■ ■ ■ Michael and Judith Dinowitz www.it-ebooks.info Adobe ColdFusion Anthology: Clear and Concise Concepts from the Fusion Authority Copyright © 2010 by Michael and Judith Dinowitz All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-7215-1 ISBN-13 (electronic): 978-1-4302-7214-4 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. President and Publisher: Paul Manning Authors: Charlie Arehart, Peter Bell, Mike Brunt, Doug Boude, Raymond Camden, Sean Corfield, Pete Freitag, Hal Helms, Mike Henke, Doug Hughes, Kevin Jones, Wally Kolcz, Dave Konopka, Boyan Kostadinov, Brian Kotek, Mark Kruger, Mark Mandel, John Mason, Nathan Mische, Adrian J. Moreno, Jake Munson, Ben Nadel, Jim Pickering, Jim Priest, Joe Rinehart, Jared Rypka-Hauer, Terry Ryan, Chris Scott, and Matt Woodward Lead Editor: Matthew Moodie Technical Reviewers: Mark Drew, Brian Kotek, Mark Mandel, and Sean Corfield Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Coordinating Editor: Debra Kelly Copy Editor: Marilyn Smith Production Support: Patrick Cunningham Indexer: Brenda Miller Artist: April Milne Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. For information on translations, please e-mail rights@apress.com, or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at www.apress.com. www.it-ebooks.info iii Contents at a Glance Foreword xxv About the Authors . xxvi About the Technical Reviewers . xxxvii Acknowledgments . xxxviii Introduction xxxix PART 1: COLDFUSION FUNDAMENTALS. 1 ■Chapter 1: Working with Application.cfc 3 ■Chapter 2: Application.cfc Reference 15 ■Chapter 3: From User-Defined Functions to ColdFusion Components 17 ■Chapter 4: onMissingTemplate()— Error Handler and So Much More 47 ■Chapter 5: “Say What?” Handling Unknown Messages ■with onMissingMethod() 61 PART 2: DOCUMENT CREATION IN COLDFUSION. 73 ■Chapter 6: PDF Support in ColdFusion 75 ■Chapter 7: Image Processing in ColdFusion 89 www.it-ebooks.info ■ CONTENTS AT A GLANCE iv PART 3: ESSENTIALS TO SERVER PRODUCTIVITY . 101 ■Chapter 8: Tuning Your Java Virtual Machine: ■Finding Your Ideal JVM Settings Through Metrics Log Analysis 103 ■Chapter 9: The Shoemaker and the Asynchronous Process Elves. 111 ■Chapter 10: Asynchronous Gateways Step-by-Step 117 ■Chapter 11: You Might Have a Performance Bottleneck If…. 121 PART 4: COMMUNICATION AND INTEGRATING WITH OTHER TECHNOLOGIES 143 ■Chapter 12: An Introduction to Consuming ■and Deploying Web Services in ColdFusion 145 ■Chapter 13: Web Services and Complex Types 157 ■Chapter 14: Type Validation When Returning an Array of Components . 179 ■Chapter 15: Sending E-mail the Right Way 181 ■Chapter 16: ColdFusion and Microsoft Exchange 189 ■Chapter 17: BlazeDS 199 PART 5: OBJECT-ORIENTED PROGRAMMING (OOP) . 211 ■Chapter 18: Object-Oriented Programming: Why Bother? 213 ■Chapter 19: The Object-Oriented Lexicon 217 ■Chapter 20: Design Patterns: Exposing the Service Layer. 225 ■Chapter 21: Beans and DAOs and Gateways, Oh My! . 231 ■Chapter 22: SOA for the Rest of Us 239 ■Chapter 23: How Base Classes Can Help You Generate Your Applications 249 PART 6: COLDFUSION FRAMEWORKS . 257 ■Chapter 24: An Introduction to Frameworks 259 www.it-ebooks.info ■ CONTENTS AT A GLANCE v ■Chapter 25: Fusebox 5 Fundamentals . 265 ■Chapter 26: Mach-II Fundamentals . 281 ■Chapter 27: Model-Glue Fundamentals . 299 ■Chapter 28: ColdSpring Fundamentals 315 ■Chapter 29: Reactor Fundamentals . 321 ■Chapter 30: Developing Applications with Transfer . 331 ■Chapter 31: FW/1: The Invisible Framework . 347 PART 7: DESIGNING THE USER INTERFACE . 359 ■Chapter 32: Separating Layout from Logic 361 ■Chapter 33: Creating Dynamic Presentations in ColdFusion 369 ■Chapter 34: Working with JSON and cfajaxproxy 375 ■Chapter 35: Prototyping for Interface Driven Architecture: ■Easing the Transition from Prototype to Application . 385 PART 8: DEVELOPMENT TOOLS 389 ■Chapter 36: Turbo Charging Eclipse 391 ■Chapter 37: An Introduction to ColdFusion Builder 407 ■Chapter 38: The ColdFusion Debugger Explained: ■Interactive Step Debugging for ColdFusion 8 and 9 . 421 ■Chapter 39: Getting Started with Subversion 433 ■Chapter 40: Subversion in the Workflow 445 ■Chapter 41: Advanced Subversion 451 ■Chapter 42: Automating Your Development with Ant 461 Index 477 www.it-ebooks.info vi Contents Foreword xxv About the Authors . xxvi About the Technical Reviewers . xxxvii Acknowledgments . xxxviii Introduction xxxix PART 1: COLDFUSION FUNDAMENTALS. 1 ■Chapter 1: Working with Application.cfc 3 What Is an Application? 3 Adding Application Variables . 5 The onApplicationStart Method 5 The onSessionStart Method 6 The onRequestStart Method 7 The onError Method . 8 The onApplicationEnd Method 10 The onSessionEnd Method 10 The onRequestEnd Method 11 The onRequest Method 11 A New Application Structure 13 ■Chapter 2: Application.cfc Reference 15 www.it-ebooks.info ■ CONTENTS vii ■Chapter 3: From User-Defined Functions to ColdFusion Components 17 User-Defined Functions . 17 Creating UDFs . 18 Executing UDFs and Passing Parameters 27 Error Handling. 30 A Full UDF Example . 31 ColdFusion Components . 32 Creating CFCs . 33 The CFC Container: The cfcomponent Tag 39 Implementing Security 39 Defining Properties: Variables and This 40 Understanding Encapsulation 41 Caching Components . 41 Using Inheritance . 43 Parting Words 45 ■Chapter 4: onMissingTemplate()— Error Handler and So Much More 47 404 Missing Template Handling: Step-by-Step Basics 47 Setting Global Handlers . 48 What Is the onMissingTemplate() Method, and When Is It Called? 49 Method Invocation within onMissingTemplate() . 51 When Errors Occur 52 Reasons for Calling onMissingTemplate() 53 Request Errors and Corrected Requests 53 Content Redirects . 54 Dynamic Page Generation 55 Fusebox URL . 58 Model-Glue URL . 59 www.it-ebooks.info ■ CONTENTS viii Mach-II URL . 59 We’re Not Done Yet, but 59 ■Chapter 5: “Say What?” Handling Unknown Messages ■with onMissingMethod() 61 Get the Message? 61 Message Received 63 Defining onMissingMethod() 64 Using onMissingMethod() . 65 Automatic get/set Methods 66 Method Injection . 68 Aspect-Oriented Programming 70 Summary . 72 Further Reading . 72 PART 2: DOCUMENT CREATION IN COLDFUSION. 73 ■Chapter 6: PDF Support in ColdFusion 75 PDF Support in ColdFusion MX 7 (and Earlier) 75 PDF Support in ColdFusion 8.0.1 and beyond 76 The isPDFFile and isPDFObject Functions . 77 What Exactly Can We Do with the cfpdf Tag? 79 Getting and Setting Information 80 Adding a Watermark . 84 Using DDX . 86 Where to Go Next 88 www.it-ebooks.info [...]... Professional He’s a certified Advanced ColdFusion developer and instructor for each release since ColdFusion 4 Now an independent contractor living in Alpharetta, GA, Charlie provides highlevel troubleshooting/tuning assistance and training/mentoring for ColdFusion teams (carehart.org/consulting) He runs the Online ColdFusion Meetup (coldfusionmeetup.com, an online ColdFusion user group with 2,000+ members),... User Group, and is a frequent speaker for his local ColdFusion User Group He has been developing with ColdFusion since version 4.0 xxvii www.it-ebooks.info ■ ABOUT THE AUTHORS ■Raymond Camden is a software consultant focusing on ColdFusion and RIA development A long-time ColdFusion user, Raymond has worked on numerous ColdFusion books including the ColdFusion Web Application Construction Kit and has... worked with ColdFusion since 1999 for several companies He is an advocate of Eclipse, Source Control, Mylyn, and anything that makes developing ColdFusion more productive and easier His main focus currently is learning Git, Ruby on Rails, and ColdFusion on Wheels An Adobe Community Professional, Mike has spoken at several user groups and enjoys discussing ColdFusion with anyone ■Doug Hughes is a ColdFusion. .. together in one comprehensive anthology The ColdFusion community has long been seeking this type of higher-end content and will be well-served by the book you are holding in your hands Ben Forta Director of Platform Evangelism Adobe Systems Inc Author, The ColdFusion Web Application Construction Kit xxv www.it-ebooks.info About the Authors ■Michael Dinowitz is a longtime ColdFusion expert (since early... recruited Mike in 1999 to join a ColdFusionJRun consulting team This team was dispatched world-wide to help Allaire and then Macromedia clients design and troubleshoot ColdFusion applications In 2001, Mike co-founded his own company, Webapper Services, LLC He now works independently, helping ColdFusion users worldwide to create strategies that ensure that Enterprise-level ColdFusion applications can be... Allaire/Macromedia /Adobe Community Professional ■Judith Dinowitz is the Master Editor-in-Chief of the House of Fusion magazines and journals, where she enjoys serving up ColdFusion and Flex goodness on a weekly and quarterly basis xxvi www.it-ebooks.info ■ ABOUT THE AUTHORS A veteran ColdFusion developer since 1997, Charlie Arehart is a longtime contributor to the community and a recognized Adobe Community... Quarterly Update and the ColdFusion Developer's Journal He also presents at conferences and contributes to online webzines He founded many community web sites, including CFLib.org, ColdFusionPortal.org, ColdFusionCookbook.org, and is the author of open source applications, including the popular BlogCFC (www.blogcfc.com) blogging application Raymond can be reached at his blog ( www.coldfusionjedi.com) or... 187 ■Chapter 16: ColdFusion and Microsoft Exchange 189 ColdFusion and Exchange Integration Requirements 189 ColdFusion Exchange Tags 190 Using cfexchangeconnection 190 Using cfexchangecalendar, cfexchangecontact, and cfexchangetask 191 Using cfexchangemail 194 Using cfexchangefilter 195 ColdFusion and Exchange Interaction... (http://cfwebtools.com), a ColdFusion development company Starting as a network engineer, Mark discovered ColdFusion in 1998 He founded the Nebraska ColdFusion User Group ( http://necfug.com) in 1999 and started CF Webtools in 2000 CF Webtools has grown to 12 developers and works with high-profile customers such as ACS Inc, Lincoln Financial, and the City of San Francisco and Pasadena, CA As an avid ColdFusion programmer... advocate, Mark blogs at ColdFusion Muse (coldfusionmuse.com), and he lives in Omaha, NE with his wife, Ann, and three children - Jasmine, Aaron, and Matthew xxxi www.it-ebooks.info ■ ABOUT THE AUTHORS ■Mark Mandel is a full-time consultant and lead developer on several open-source projects, most notably Transfer ORM, ColdSpring, JavaLoader, and ColdDoc He has been working with ColdFusion for a number . Dinowitz Adobe ColdFusion Anthology Companion eBook Available 7.5 x 9.25 spine = 1.03125" 544 page count THE EXPERT’S VOICE ® IN WEB DEVELOPMENT Adobe ColdFusion. Dinowitz www.it-ebooks.info www.it-ebooks.info Adobe ColdFusion Anthology Clear and Concise Concepts from the Fusion Authority ■ ■ ■ Michael and Judith Dinowitz www.it-ebooks.info Adobe ColdFusion

Ngày đăng: 17/02/2014, 23:20

TỪ KHÓA LIÊN QUAN

w