You are previewing Railo 3 Beginner’s Guide.
O'Reilly logo
Railo 3 Beginner’s Guide

Book Description

Easily develop and deploy complex applications online using the powerful Railo Server

  • A complete guide to developing an application with Railo from start to finish

  • In depth coverage of installing Railo Server on different environments

  • A detailed look ORM, AJAX, Flex and other technologies to boost your development

  • In Detail

    Railo Server is one of the quickest ways to start developing complex web applications online. Widely considered as the fastest CFML (ColdFusion Markup Language) engine, Railo allows you to create dynamic web pages that can change depending on user input, database lookups, or even the time of day.

    Railo 3 Beginner’s Guide will show you how to get up and running with Railo, as well as developing your web applications with the greatest of ease. You will learn how to install Railo and the basics of CFML to allow you to gradually build up your knowledge, and your dynamic web applications, as the book progresses.

    Using Packt’s Beginner’s Guide approach, this book will guide you, with step-by-step instructions, through installing the Railo Server on various environments. You will learn how to use caches, resources, Event Gateways and special scripting functions that will allow you to create webpages with limitless functionality. You will even explore methods of extending Railo by adding your own tags to the server and building custom extensions.

    Railo 3 Beginner’s Guide is a must for anyone getting to grips with Railo Server.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Railo 3
      1. Railo 3
      2. Credits
      3. About the Authors
      4. About the Reviewers
      5. www.PacktPub.com
        1. Discounts
        2. Free eBooks
        3. Newsletters
        4. Code Downloads, Errata and Support
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Time for action - heading
          1. What just happened?
          2. Pop quiz - heading
          3. Have a go hero heading
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      7. 1. Introducing Railo Server
        1. Why use Railo Server?
        2. What does Railo Server do?
        3. A better look at Railo Server
        4. What else can you do with Railo Server?
          1. CFML compiler
          2. Railo archives—compiled code
          3. Wide variety of CFML tags and functions
          4. Object-oriented approach
          5. Scripting support
          6. Integrated administration frontend
          7. Background task execution
          8. Extension manager
          9. Easy update mechanism
          10. Compatibility
          11. Framework and application compatibility
          12. Security
          13. Virtual filesystems
          14. High performance
          15. Easy installation
          16. Inexpensive and free
          17. Easy clustering
        5. Summary
      8. 2. Installing Railo Server
        1. Getting up and running with Railo Express
        2. Time for action - downloading Railo
          1. What just happened?
        3. Customizing Railo Express
        4. Time for action - setting the administrator's password
          1. What just happened?
        5. Running the Railo Server Tomcat installer
        6. Time for action - installing on Windows
          1. What just happened?
        7. Adding CFML-enabled sites to IIS7
        8. Time for action - adding a site to IIS7
        9. Getting up and running with the Railo WAR and Jetty
        10. Time for action - downloading and installing Jetty
          1. What just happened?
        11. Time for action - booting up Jetty
        12. Time for action - downloading and deploying the Railo WAR
          1. What just happened?
        13. Summary
      9. 3. CFML Language
        1. Basics of the CMFL language
        2. Time for action - Hello World!
          1. What just happened?
        3. CFML tags
          1. Single tags with attributes
          2. Tags with expressions
        4. Time for action - single tag example
          1. What just happened?
          2. Tags with content
          3. Tags with sub tags
        5. CFML functions
        6. Time for action - using built-in functions
          1. What just happened?
          2. User-defined functions
        7. Time for action - using user-defined functions
          1. What just happened?
        8. CFML variables
          1. Structure variables
        9. Time for action - using structures
          1. What just happened?
          2. Array variables
        10. Time for action - creating an array
          1. What just happened?
        11. CFML scopes
          1. SERVER scope
        12. Time for action - adding a variable to the SERVER scope
          1. What just happened?
          2. APPLICATION scope
        13. Time for action - creating the APPLICATION scope
          1. What just happened?
          2. SESSION scope
        14. Time for action - creating a SESSION scope in your Application
          1. What just happened?
          2. REQUEST scope
        15. Time for action - using the REQUEST Scope
          1. What just happened?
          2. CGI scope
        16. Handling web data
          1. URL variables
        17. Time for action - getting variables from the URL
          1. What just happened?
          2. Have a Go Hero - try the isDefined() and StructKeyExists() functions
          3. FORM variables
        18. Time for action - getting FORM variables
          1. What just happened?
          2. Cookies
        19. Database access
        20. Time for action - installing MySQL and setting up our database
          1. What just happened?
        21. Time for action - configuring data sources in Railo Server
          1. What just happened?
        22. Time for action - running queries against our database
          1. Queries with parameters
          2. What just happened?
          3. Stored procedures
        23. Time for action - calling stored procedures
          1. Object Oriented Programming with Components
        24. Time for action - creating the Employee component
          1. What just happened?
        25. Summary
      10. 4. Railo Server Administration
        1. Server and Web context
        2. Time for action - setting up an example context
          1. What just happened?
          2. Setting up security
        3. Time for action - setting your password
          1. What just happened?
        4. How contexts relate to each other
        5. Time for action - setting the time zone
          1. What just happened?
        6. The Railo Web Administrator
        7. Time for action - investigating the Web Administrator
          1. What just happened?
          2. Settings
            1. Performance/Caching
        8. Time for action - comparing template caching settings
          1. What just happened?
            1. Regional
          2. Have a go hero - get the server time zone
            1. Charset
            2. Scope
              1. Cascading
        9. Time for action - restricting the scoping of variables
          1. What just happened?
              1. Session type
              2. Combine the URL and Form scope
        10. Time for action - merging the URL and FORM scopes
          1. What just happened?
              1. Session management
              2. Client management
              3. Domain cookies
              4. Client cookies
              5. Session timeout
              6. Application timeout
            1. Application
              1. Script Protect
              2. Request timeout
              3. Application listener
            2. Output
            3. Error
          2. Services
            1. Event Gateway
            2. Cache
            3. Datasource
            4. ORM
            5. Search
        11. Time for action - creating a search collection
          1. What just happened?
          2. Have a go hero
            1. Mail
            2. Tasks
            3. Scheduled tasks
          3. Extension
            1. Applications
            2. Providers
          4. Remote
            1. Archives and resources
            2. Mappings
        12. Time for action - creating mappings in our application
          1. What just happened?
            1. Component
              1. Base/Root Component
              2. Auto import
              3. Search local
              4. Cache
              5. Component "dump" template
              6. Data member access type
              7. Magic functions
        13. Time for action - using magic functions
          1. What just happened?
            1. Additional resources
            2. Custom tags
            3. CFX tags
          2. Development
        14. Time for action - setting the debug template
          1. What just happened?
          2. Security
          3. Documentation
        15. Summary
      11. 5. Developing Applications with Railo Server
        1. Railo applications
        2. Time for action - building the simplest application
          1. What just happened?
        3. Time for action - defining the application
          1. What just happened?
          2. Session and client settings
          3. Have a go hero
        4. Application events
          1. Pop quiz - Application.cfc
        5. Object relational mapping with Railo Server
        6. Time for action - upgrading Railo Server
          1. What just happened?
        7. Creating our database persistence store
        8. Time for action - creating a database
          1. What just happened?
        9. Time for action - creating our railoblog datasource
          1. What just happened?
        10. Using persistent components
        11. Time for action - creating the blog
          1. What just happened?
        12. Time for action - listing our blog posts
          1. What just happened?
        13. Time for action - adding comments
          1. What just happened?
        14. Caching in Railo Server
          1. Cache: what is it good for?
        15. Time for action - creating a cache connection
          1. What just happened?
        16. Time for action - using the Cache object
          1. What just happened?
        17. Time for action - getting well versed with more caching functions
          1. What just happened?
          2. Cache providers
          3. Cache types
        18. Time for action - caching a page with cfcache
          1. What just happened?
            1. Partial template caching
        19. Time for action - caching content within a template
          1. What just happened?
            1. Query cache
        20. Time for action - caching a query using cachedwithin
          1. What just happened?
            1. Resource cache
        21. Time for action - assigning an EHCache Lite connection to resources
          1. What just happened?
        22. Summary
      12. 6. Advanced CFML Functionality
        1. Scripting within Railo Server
          1. Why tags are good
          2. Why tags are bad
        2. The <cfscript> tag
          1. Loops
            1. Looping lists
        3. Time for action - looping through a list
          1. What just happened?
            1. Looping arrays
        4. Time for action - looping an array
          1. What just happened?
          2. Looping structures
        5. Time for action - looping through a structure
          1. What just happened?
            1. Looping queries
        6. Time for action - looping over queries
          1. What just happened?
          2. Scripted components
        7. Time for action - creating the component
          1. What just happened?
          2. Scripting tags
        8. Time for action - getting the contents of another site
          1. What just happened?
          2. Scripting wrapped tags
        9. Time for action - using the <cfloop> tag in CFScript
          1. What just happened?
          2. Scripting wrapped tags—Part 2
        10. Time for action - get a user by his/her ID
          1. What just happened?
          2. Built-in components
            1. The Query built-in component
        11. Time for action - using the Query component
          1. What just happened?
            1. The HTTP built-in component
        12. Time for action - getting the content of a website via the HTTP component
          1. What just happened?
          2. Have a go hero
        13. Summary
      13. 7. Multimedia and AJAX
        1. Video
          1. Displaying video
        2. Time for action - displaying a video player
          1. What just happened?
          2. Converting a video
        3. Time for action - installing the Video Extension
          1. What just happened?
        4. Time for action - creating clips for our video player
          1. What just happened?
        5. Time for action - creating poster frames and clips
          1. What just happened?
        6. Time for action - adding a playlist to <cfvideoplayer>
          1. What just happened?
        7. AJAX functionality within the Railo server
        8. Time for action - setting up the application and services
          1. What just happened?
        9. Time for action - binding the input to the component
          1. What just happened?
        10. Time for action - displaying the tasks
          1. What just happened?
        11. Time for action - deleting a task
          1. What just happened?
        12. Summary
      14. 8. Resources and Mappings
        1. Railo resources
        2. Accessing files locally
        3. Time for action - writing and reading files
          1. What just happened?
        4. Looping files
        5. Time for action - looping through the contents of a file
          1. What just happened?
        6. Mappings
        7. Time for action - creating a mapping for the log file
          1. What just happened
        8. Accessing code from mappings
        9. Time for action - creating our components
          1. What just happened?
        10. Railo archives
        11. Time for action - creating a Railo archive
          1. What just happened?
        12. Mappings and their settings
        13. Time for action - changing the settings of a mapping
          1. What just happened?
        14. Accessing your files from ZIP and TAR files
        15. Time for action - accessing files from a ZIP file
          1. What just happened?
        16. Using RAM as a quick location to store files
        17. Time for action - compiling plain text to CFML
          1. What just happened?
        18. Using Amazon's Simple Storage Service to use files in the Cloud
        19. Time for action - using Amazon's Simple Storage Service (S3)
          1. What just happened?
        20. Summary
      15. 9. Extending Railo Server
        1. Why create your own CFML tags and functions?
        2. Time for action - creating our own CFML tag
          1. What just happened?
          2. CFML functions
        3. Time for action - creating our own CFML function
          1. What just happened?
            1. Using return type "any"
            2. Structure and array notation in the form and URL scope
        4. Installing extensions
        5. Time for action - installing an extension for the web context
          1. What just happened?
          2. Server versus web extensions
          3. The extension installation system
        6. Time for action - installing the Galleon forums web application
          1. What just happened?
        7. Time for action - creating our own Railo application extension
          1. Creating the Famous Quotes App
          2. What just happened?
        8. Time for action - creating our own extension provider
          1. What just happened?
          2. The ExtensionProvider CFC
            1. GetInfo structure information
            2. ListApplications query information
            3. GetDownloadDetails function
          3. The role of the Web ID and Server ID
          4. Extend your ExtensionProvider
        9. The Railo Extension Store
        10. Summary
      16. 10. Creating a Video-sharing Application
        1. VideoShare: Getting to know our application
        2. Goals of the application
        3. Creating our application
        4. Time for action - creating our basic application
          1. What just happened?
          2. Have a go hero - create a datasource
        5. Laying it all out
        6. Time for action - creating the layout custom tag
          1. What just happened?
        7. Registering users
        8. Time for action - creating our user model object
          1. What just happened?
        9. User login and logout
        10. Time for action - log in or log out of the application
          1. What just happened?
        11. Uploading videos
        12. Time for action - uploading a video
          1. What just happened?
        13. Adding security
        14. Time for action - adding the secure tag
          1. What just happened?
        15. Assigning videos to users
        16. Time for action - storing our video to the database
          1. What just happened?
        17. Converting and playing videos
        18. Time for action - converting the uploaded video
          1. What just happened?
        19. Creating thumbnails for our videos
        20. Time for action - creating images from a video
          1. What just happened?
        21. Adding comments to our video page
        22. Time for action - adding comments to our videos
          1. What just happened?
        23. Creating the home page
        24. Time for action - getting the latest videos
          1. What just happened?
          2. Have a go hero
        25. Summary