Bootcamp
Search…
3.POCE.5: Bird Watching

Introduction

Create an app for bird watching field notes. According to this website, a bird watching note should consist of the following properties. You don't have to include all of this information. Date, Behaviour, and Flock Size are sufficient. We will be adding properties like species and weather later.
  1. 1.
    Habitat
    1. 1.
      Note plant life, water sources and vegetation conditions, as well as which of the plants the bird is preferring as you observe it.
  2. 2.
    Date
    1. 1.
      Record the date, time and day of the week you are making the observation, as well as how long you were able to see the bird and whether or not you had clear views or just intermittent glimpses.
  3. 3.
    Appearance
    1. 1.
      Take copious notes on the bird's appearance, including the brilliance of plumage, any peculiar markings and any outstanding or unusual features such as missing feathers, leucistic patches or signs of illness. Record the bird's gender if possible.
  4. 4.
    Behaviour
    1. 1.
      Take notes on what the bird was doing as you observed it. Note general actions and specific reactions to changing conditions, such as the appearance of a predator or how the bird interacts with other birds. Note large actions such as preening, flight patterns, and foraging habits as well as small movements such as tail bobs, head cocks or wing stretches.
  5. 5.
    Vocalisations
    1. 1.
      If the bird sang or made other sounds during your observation, use mnemonics or descriptions of how it sounded. Note non-vocal sounds such as wing noises or drumming.
  6. 6.
    Flock Size
    1. 1.
      If you are observing more than one bird at a time, try to estimate how many birds are in the flock. Also, try to note how genders are balanced if possible, and check different birds to see if they are the same species or part of a mixed flock.
Begin by forking and cloning this repo.

Base

This app will render EJS files on the browser. Use Bootstrap to style the pages. Make the pages responsive so that they also don't look bad on a desktop width as well.
Begin this app with just three routes for the bird watching notes:
Work on them in the order listed below.

Routes

URL Path
Method
Purpose
/note
GET
Render a form that will create a new note.
/note
POST
Accept a POST request to create a new note.
/note/:id
GET
Render a single note.
/
GET
Render a list of notes.
Create a database for this app called birding.
Create a single table called notes and columns based on the bird-watching note properties above.
Notice that the name of the parameter of a single note has changed from index to id. We are now referencing the serial primary key of the notes table that will be called id.
Completeness of all parts of this app is not the point of this set of exercises, so don't worry too much about completing everything for the bird watching notes. In the coming post-class exercises we will be adding relationships to the app.

Comfortable

Routes

URL Path
Method
Purpose
/note/:id/edit
GET
Render a form to edit a note.
/note/:id/edit
PUT
Accept a request to edit a single note
/note/:id/delete
DELETE
Accept a request to delete a note.

More Comfortable

Implement sorting of the list on the index page.

Reference Solution

Click here to see the reference solution for this post class.