Book Image

Railo 3 Beginner's Guide

By : Mark Drew , Gert Franz, Paul Klinkenberg, Jordan Michaels
Book Image

Railo 3 Beginner's Guide

By: Mark Drew , Gert Franz, Paul Klinkenberg, Jordan Michaels

Overview of this book

<p>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.</p> <p>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.</p> <p>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.</p>
Table of Contents (16 chapters)
Railo 3
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface

Preface

Railo Server is one of the quickest ways to start developing complex web applications. Widely considered as the fastest CFML (ColdFusion Markup Language) engine, Railo Server allows you to create dynamic web pages that can change depending on the 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 Server, as well as enabling you to develop your web applications with ease. You will learn how to install Railo Server and the basics of CFML as the book progresses to allow you to gradually build up your knowledge and your dynamic web applications.

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 web pages 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.

What this book covers

Chapter 1, Introducing Railo Server, gives an introduction to Railo Server and also shows us an overview of how it is a breeze to develop web applications.

Chapter 2, Installing Railo Server, describes how to install Railo Server under a number of operating systems as well as using different servlet containers.

Chapter 3, CFML Language, provides a foundation for using the CFML Language to develop sites in Railo Server. This chapter also covers object-oriented programming with components as well as functions and tags.

Chapter 4, Railo Server Administration, details the functionality in the server and web context. It also explains how different settings affect the behavior of the server and cover a number of other topics, such as Extension , Archives and Resources, and Security.

Chapter 5, Developing Applications with Railo Server, looks at how applications can be defined programmatically, the Application.cfc lifecycle, and also how components interact with the database and even looks into various caching techniques.

Chapter 6, Advanced CFML Functionality, looks at the scripting formats available in CFML, while investigating the CFScript language. It also looks at the built-in components available in Railo Server.

Chapter 7, Multimedia and AJAX, this practical chapter goes through converting and displaying video, as well as communicating between the browser and the server using the AJAX functionality of Railo Server.

Chapter 8, Resources and Mappings, describes how to use local and remote resources via the use of mappings within Railo Server. It also looks at how we can use ZIP and TAR files, using RAM as a handy resource and saving our files out in the Cloud using Amazon S3.

Chapter 9, Extending Railo Server, looks at how we can create new tags and functions for Railo Server and create an extension so that we can share our changes to the core server with other Railo Server users via our own Extension Provider.

Chapter 10, Creating a Video-sharing Application, brings together all your skills into a single application, setting up the Object Relational Model (ORM), creating security, converting your videos, and displaying your videos for everyone to use!

What you need for this book

You can run Railo server on a PC or a Mac, under Windows, OS X, and Linux.

To edit the code snippets described in the book, you will need a text editor, such as TextMate on OS X or Textpad on Windows. As long as you are able to edit text files the choice of software is up to you.

Who this book is for

If you want to develop your own dynamic web applications using CFML, then this book is for you. No prior experience with Railo or CFML is required, although you are expected to have some experience in web application development and the knowledge of HTML, basically, how websites work in general.

Conventions

In this book, you will find several headings appearing frequently.

To give clear instructions of how to complete a procedure or task, we use:

Time for action - heading

  1. 1. Action 1

  2. 2. Action 2

  3. 3. Action 3

Instructions often need some extra explanation so that they make sense, so they are followed with:

What just happened?

This heading explains the working of tasks or instructions that you have just completed.

You will also find some other learning aids in the book, including:

Pop quiz - heading

These are short multiple choice questions intended to help you test your own understanding.

Have a go hero heading

These set practical challenges and give you ideas for experimenting with what you have learned.

You will also find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: " Using the <cfvideo> tag, we are able to convert to a number of formats."

A block of code is set as follows:

<script type="text/javascript" charset="utf-8">
onError = function(code,message){
alert(code + ' - ' + message);
}
displayTodos = function (data){
document.getElementById('taskname').value = "";
Railo.Ajax.refresh('displayTodos');
}
</script>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<head>
<link rel="stylesheet" href="main.css" type="text/css">
<title>Todo</title>
<cfajaxproxy bind="cfc:todo.TaskService.addTodo({taskname})"
onSuccess="displayTodos"
onError="onError"/>
<cfajaxproxy cfc="todo.TaskService"" jsclassname="TaskService">

Any command-line input or output is written as follows:

sudo vi /etc/default/jetty

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Go to Members ¦ Login and use your new username and password to log in to the website."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to, and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

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.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.