Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e59d5b0487
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 115 lines (66 sloc) 2.709 kb

NAME

Angelos::Manual::Tutorial - Zero to Angelos in a Angelos

DESCRIPTION

This tutorial should give you everything you need to build your first application with Angelos.

HOW TO

The requirements

Here's what you need to have installed -- at least when we write it.

Installing Angelos

On most systems you can use Perl's bundled CPAN module to download and install Angelos:

  # sudo cpan install Angelos

Setting up the Scaffolding

Once you have Angelos happily installed, you're ready to create your first application.

Change directory to some place it will be safe to create a new Angelos application. (Angelos will create a subdirectory for you).

  # angelos generate --name MyApp
  Can't guess application root from current path (/tmp) or bin path (/usr/bin)
Let's take those one by one.
bin
conf

Configuration files live in conf/,

log

Angelos uses Log::Dispatch to configure its logging. By default, it dumps logs named server.log and error.log into the log directory.

share/root/templates

Angelos uses Template as its primary templating system. Put your application's templates into share/root/templates/. Out of the box, comes with an application skeleton that it installs in share/root/templates/. This default application is a convenient way to get a basic application up and running quickly, but probably needs some customization as you build a more advanced application.

share/root/static

Some nontrivial percentage of the stuff your web application serves out doesn't need to (or shouldn't) pass through your templating engine.

Just drop your static files into share/root/static/ and Angelos will serve them out if it can't find a template with the right name.

Out of the box, Angelos comes with a CSS style, Javascript libraries and a Pony. Look in share/root/static in the Angelos distribution, or in the same place Angelos stuck its default templates.

lib/MyApp

To build a basic Angelos application, you only need to worry about two sorts of classes, Models and Controllers.

lib/MyApp/Model
lib/MyApp/Controller
lib/MyApp/View
t

Angelos starts off your application with a basic harness, but can't yet write all your tests for you. (It does, however, build simple tests for model classes you generate.)

var

Angelos stores cache files here while the server is running. You shouldn't ever have to touch this directory.

That's it!

GETTING HELP

Online Help

Joining the mailing list

Browsing the wiki

REPORTING BUGS

Something went wrong with that request. Please try again.