First semester university project: Ticket reservation for movie theaters
Java TeX CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status Test Coverage Open Issues ShareLatex PDF

Bookie is a ticket reservation system for movie theaters written by @kasperisager and @sigriddalsgard as our first semester project at the IT University of Copenhagen. Many cups of coffee were harmed in its making ☕️

It features a homebrewed data-persistence library named Donkey which sits on top of JDBC and acts as an ORM. Donkey speaks both MySQL, PostgreSQL, as well as SQLite and takes care of handling any differences between these so we don't have to. We're lazy students after all.


JDBC is not the worst but gets really tiresome to work with. Registering drivers, getting connections, preparing statements, writing SQL, etc. are all things we're simply way too lazy to do. It's 2014: Who writes SQL by hand anymore? Donkey does away with all that, allowing us to focus on what matters: Data modelling. Isn't that really the reason why anyone would write an ORM?

The following is an example of a simple Donkey model:

public class Person extends Model {
  public String name;
  public int age;

  public Person() {
    super("people", YourApp.db());

This will give you a basic model that you can then insert(), update(), or delete() from your database. Donkey takes care of defining a database schema for you as long as you keep your fields public. To grab some models from the database use find() and findAll():

List<Person> johns = Model.find(Person.class).where("name", "John").get();

List<Person> people = Model.findAll(Person.class);

Donkey of course also provides a solid set of tools for working more hands-on with databases.

Copyright © 2014-2015 The Authors. Licensed under the terms of the MIT license.