You are previewing ColdFusion 9 Developer Tutorial.
O'Reilly logo
ColdFusion 9 Developer Tutorial

Book Description

Create robust professional web applications with ColdFusion

  • Fast-paced guide to the foundational concepts of developing in ColdFusion

  • Broad coverage of CFScript to deal with its expanded power in ColdFusion 9

  • Enhance the user interface with built-in ColdFusion AJAX features (layout, forms, script, maps, and more)

  • Packed with example code and real-world knowledge

  • In Detail

    Adobe ColdFusion is an application server, renowned for rapid development of dynamic websites, with a straightforward language (CFML), powerful methods for packaging and reusing your code, and AJAX support that will get developers deep into powerful web applications quickly. However, developing rich and robust web applications can be a real challenge as it involves multiple processes.

    With this practical guide, you will learn how to build professional ColdFusion applications. Packed with example code, and written in a friendly, easy-to-read style, this book is just what you need if you are serious about ColdFusion.

    This book will give you clear, concise, and practical guidance to take you from the basics of ColdFusion 9 to the skills that will make you a ColdFusion developer to be reckoned with. It also covers the new features of ColdFusion 9 like ORM Database Interaction and CF Builder.

    ColdFusion expert John Farrar will teach you the basics of ColdFusion programming, application architecture, and object reuse, before showing you a range of topics including AJAX library integration, RESTful Web Services, PDF creation and manipulation, and dynamically generated presentation files that will make you the toast of your ColdFusion developer town.

    This book digs deep with the basics, with real-world examples of the how and whys, to get more done faster with ColdFusion 9.

    Get up to speed in ColdFusion and learn how to integrate it with other Web 2.0 technologies

    Table of Contents

    1. ColdFusion 9 Developer Tutorial
      1. ColdFusion 9 Developer Tutorial
      2. Credits
      3. About the Author
      4. About the Reviewers
      5. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      6. 1. Web Pages—Static to Dynamic
        1. Turning HTML into a dynamic web page
          1. HTML requests
          2. ColdFusion requests
            1. Comments
            2. Variable output
            3. Functions
        2. Understanding and using simple variables
          1. Variable types
            1. Integers
            2. Strings
            3. Decimals
            4. Additional functions
            5. Find and FindNoCase
        3. Understanding structures
          1. CGI variables
        4. Let's get interactive
          1. URL variables
          2. Exception handling
            1. Standard error exception
            2. <CFTRY> and <CFCATCH>
        5. Setting page defaults
          1. HTML links
        6. Introduction to lists and loops
        7. Understanding arrays
        8. Conditional processing with If/<cfif>
        9. Conditional processing with switch
        10. Summary
      7. 2. Basic CFCs and Database Interaction
        1. Our first CFC
        2. Our first object
          1. Product (object)
        3. Using an object constructor
        4. Connecting to a database
        5. Returning data from the CFC
        6. Making our data query flexible
        7. The basic data object concept
        8. Object method access control
        9. Summary
      8. 3. Power CFCs and Web Forms
        1. The practice of protecting access
        2. Web forms introduction
        3. Managing our product data
        4. Getting data to our edit page
        5. Saving our data
        6. Improving page flow
        7. Adding a new record
        8. Let's look under the hood
        9. Summary
      9. 4. ORM Database Interaction
        1. Introduction to ORM in ColdFusion
          1. ORM-enabled application configuration
          2. ORM-enabled CFCs
          3. Understanding entities
        2. Working with entity-object relationships
          1. Many-to-many relationships
          2. Working with relational data
        3. ORM functions
        4. Summary
      10. 5. Application, Session, and Request Scope
        1. Life span
        2. Introducing the Application.cfc object
        3. Application variables
        4. The start methods
          1. Application start method—onApplicationStart()
          2. Session start method—onSessionStart()
          3. Request start method—onRequestStart()
        5. The end methods
          1. Request end method—onRequestEnd()
          2. Session end method—onSessionEnd()
          3. Application end method—onApplicationEnd()
          4. On Error method—onError()
        6. Scope visibility
        7. Practical application
        8. Universal datasource
        9. Mappings per application
        10. Custom tag paths per application
        11. Summary
      11. 6. Authentication and Permissions
        1. How ColdFusion recognizes users
        2. Custom authentication (additional power)
          1. Authentication data model
          2. Customizing authentication
        3. Extra notes
        4. Summary
      12. 7. CFScript
        1. Script basics
          1. Variables
          2. Switch/case
          3. If/then/else
          4. For loops
          5. For/in loops
          6. Do/while loops
          7. While loops
        2. Exception handling
          1. Throw/abort
        3. New functions/commands in CF9
        4. Summary
      13. 8. CF AJAX User Interface
        1. Changing times
          1. HTML-based websites
          2. Server-side languages
          3. Browser-side applications
            1. Flash
            2. JavaScript
        2. ColdFusion AJAX
          1. Layout
            1. <cfdiv />
            2. <cflayout />
              1. Border example
              2. HBox/VBox example
              3. Tab example
            3. <cfpod />
            4. <cfwindow />
          2. Menus and tool tips
            1. <cfmenu />
            2. <cftooltip />
        3. Styling notes
        4. Tips
        5. Map interaction
        6. Summary
      14. 9. CF AJAX Forms
        1. AJAX forms
          1. <cfgrid />
          2. Grid paging
        2. Grid updates and deletes
        3. Linked grids
          1. <cfinput />
            1. Binding page elements
          2. Binding immediately upon load
        4. The date requestor
        5. The autosuggest box
          1. <cfselect />
          2. <cftextarea />
          3. <cftree />
        6. The directory tree
        7. Message boxes
        8. Progress bar
        9. Summary
      15. 10. CF AJAX Programming
        1. Binding
          1. On-page binding
          2. CFC binding
          3. JavaScript binding
          4. URL binding
        2. Bind with event
        3. Extra binding notes
        4. Multiple radio buttons or checkboxes and multiple select
        5. Spry binding
        6. CFAJAXProxy
          1. CFAJAX proxy binding
        7. CFC proxy class objects
        8. Client debugging
        9. Firebug
        10. Built-in debugging
          1. Logging features
          2. Customization
          3. Automatically wired AJAX links
          4. Execute JavaScript after loading content
          5. Other cool commands
          6. Post for CFAJAX calls
          7. CFAJAX browser JavaScript API overview
        11. Summary
      16. 11. Introduction to Custom Tags
        1. Different forms of code reuse
          1. CFCs
          2. CFInclude
        2. Custom tags
          1. Our first custom tag
        3. Custom header/footer tags
        4. Nested tags
        5. CFInclude from custom tags
        6. Templates versus skins
        7. Managing custom tags
        8. CFModule approach
        9. Tag library approach
        10. Summary
      17. 12. ColdFusion Powered Views
        1. What is open source?
        2. The fun factor
          1. Installing the library
          2. Getting started
        3. Happily separated
          1. Manipulate DOM from server-side code
        4. Turning lemons to lemonade
          1. Separation complete
        5. Fun with lists
          1. Select list tag
          2. Other list tags
        6. Better form coding
          1. Metadata
          2. Smart form modes
            1. Edit mode
            2. Add mode
            3. View mode
          3. Style simplified
            1. But wait, there's more!
        7. Custom list item rendering
          1. Module render option
        8. Summary
      18. 13. Control Logic Processing
        1. The code side of applications
          1. The model
          2. The controller
        2. Shared variables
        3. Processing request events
          1. Event model for the coprocessor
            1. onPageStart() method
            2. onFirstCall() method
            3. onPostBack() method
            4. Form modes
            5. beforeViewCall() method
            6. onPageEnd() method
        4. Remote AJAX events
        5. Data versatility
          1. Lists
          2. Array of structures
          3. Modified data field names
          4. Query handling
        6. Personal extension of COOP
        7. Summary
      19. 14. Guide to Unit Testing
        1. When to test
          1. Mission critical
          2. Test-driven development
          3. Regression testing
        2. Installing our testing software
        3. Understanding assertions
          1. First test class
          2. Multiple tests
            1. HTML view
            2. Data view
          3. Built-in assertions
          4. MXUnit assertion extensions
        4. Testing private methods
        5. Testing included files and custom tags
          1. Variable testing
          2. Exception testing
        6. A son's view of testing
        7. Summary
      20. A. Beyond this Book
        1. Areas of interest
          1. Perspectives
            1. Business perspective
              1. Persona reviews
              2. Milestones
            2. Design/marketing perspective
            3. Developer perspective
        2. Current technologies
          1. AJAX
          2. Flash (Flex/AIR)
          3. Future
            1. HTML 5
            2. Devices
        3. Scale versus implementation
        4. Standards
          1. Libraries
            1. Size
            2. Features
            3. Begin with the end in mind
            4. Research
          2. Frameworks
          3. Methodologies
      21. B. Tools and Resources
        1. AJAX
          1. Firebug
          2. jQuery
        2. Analytics
          1. Google webmaster tools
        3. Coding
        4. Conferencing and collaboration
          1. Acrobat.com
          2. Google Docs
          3. GoToMeeting/Webinar
          4. Slide-sharing sites
        5. Data-management tools
        6. Graphics creation/acquisition
          1. Camtasia Studio
          2. Color Schemer
          3. Fireworks
          4. Lightroom
          5. SnagIt
        7. Open source libraries
        8. Project management
          1. FreshBooks
          2. Project Tracker
        9. Source control
        10. Usability
          1. Morae
        11. Virtual development box
        12. XML