1. Introduction
    1. About Agavi
    2. MVC in Agavi
    3. Overview of Agavi
    4. Overview of Application Execution Flow
    5. A Word About Actions
    6. Application filesystem layout
    7. Overview of application configuration
  2. Setting Up The Initial Application
    1. Installing Agavi
    2. Creating an Agavi Project
    3. Finishing The Setup
    4. Finishing The Basic Setup
    5. Installing a New Copy of Your Application
  3. Adding First Code
    1. Creating A New module
    2. Creating A New Action
    3. Tying Things Together — An Introduction To Routing
    4. Fixing The Bloggie Routing
    5. Accessing Request Parameters and Validation Basics
    6. Handling Validation Errors
  4. Putting The M in MVC
    1. Creating A New Model
    2. Adapting The Actions and Views
    3. Custom Validators
  5. Polishing It Up
    1. Layers and Layouts
    2. Applying Our Layout
    3. What Are Slots?
    4. Adding The Post's Title To The URL
    5. Routing Callbacks
    6. Using Callbacks for the Title in URLs
  6. Connecting to a database
    1. The Database Manager
  7. Handling Output Variants
    1. Output Types
    2. Exception Templates
    3. Generating an RSS Feed
  8. Form Processing
    1. Adding a Post
    2. Editing a Post
    3. The Form Population Filter (FPF)
  9. Creating a User Authentication System
  10. Adding To The Master Template

A Word About Actions

Actions interact with models to implement the aplication specific logic, they serve to offer interaction between incoming requests and the business model. All data retrival (database access, flatfiles and etc) should be encapsulated in actions. An action also handles all the validation requirements and all error handling.

RequestMethods and Action Execution

Request methods are a concept in Agavi that abstracts from the HTTP verbs GET/POST/PUT etc to more general terms that are applicable in any environment. Agavi can be used in SOAP, XML-RPC, console and other contexts where HTTP may not be involved. The most common methodnames are Read and Write, but others like Create and Delete exist and you can define your own methodnames on the fly if required. The default methodnames are chosen to map nicely to the standard HTTP verbs and also fit nicely into all other environments. The default mapping for HTTP verbs is as follows:
Table 1. HTTP Verb Transations
Verb Translation
GET Read
POST Write
PUT Create
DELETE Delete
An action may respond to a specific request method by simply implementing a method named after the request method, such as executeRead to respond to GET requests or executeWrite to respond to POST requests. An action may respond to as many request methods as you wish simply by implementing more than one execute method. An action may respond to all request methods by implementing a method execute(). An action may skip all exection by simply defining a method isSimple() and returning a boolean true. If an action does not respond to a request method, the default method getDefaultView() is called.