Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 2.24 KB

README.md

File metadata and controls

78 lines (54 loc) · 2.24 KB

Learning to Dance

A tutorial at YAPC::EU 2011 on using Dancer.

In this lesson you'll be implementing a website for accessing an airport search engine based on Dancer.

Doing the exercises you'll learn how Dancer is used, and how the code should be structured to make a site easy to change and maintain.

Teacher: Andrew Solomon Teaching Assistants: Adam Taylor, Liz Goldstein

What's Dancer?

Dancer is a micro 'web framework' - a toolkit for developing a dynamic web application. It is inspired by the Ruby framework, Sinatra.

Prerequisites

  • Basic Perl knowledge
  • Basic HTML/HTTP knowledge

Preparation

  • Bring a laptop with Perl installed

  • Install Task::Dancer (somewhat large) or install Dancer and Dancer::Template::TemplateToolkit

  • Install Data::Types

  • Either checkout a copy of this talk git clone git://github.com/andrewsolomon/YAPC2011DancingLesson.git

  • Or download and untar/unzip from the 'Downloads' button https://github.com/andrewsolomon/YAPC2011DancingLesson

  • Open the slides with your browser: README.www/README.md.html README.www/part1.md.html README.www/part2.md.html

  • Check that everything works:

$ cd YAPC2011DancingLesson/solutions/part2/airport-toolkit
$ ./bin/search_airports --matching syd

If it doesn't run, install any prerequisites we forgot!

Instructions

Do your exercises in the directories

YAPC2011DancingLesson/exercises/part1/ex1 
YAPC2011DancingLesson/exercises/part1/ex2
...

and if you get stuck, you'll find solutions in

YAPC2011DancingLesson/solutions/part1/ex1 
YAPC2011DancingLesson/solutions/part1/ex2
...

Paths to take

The lesson is divided into two sections:

This provides you with the basic toolkit of skills for implementing a web site.

This is where the interface to the search engine is implemented. If you just want to cut to the chase, you can skip some of the exercises as follows:

(Quick and) Dirty Dancing

  • Part 1: Ex 1 - 4, 6, 8
  • Part 2: Ex 1 - 4