TAD

Agenda

  1. Idea
  2. Data Model
  3. Toolbox
  4. Architecture
    1. Security
    2. Rendering
    3. Routes
  5. Tests
  6. Retrospective
  7. Demo
  8. Sources

Idea - A diary for GPS tracks

A web-based diary for GPS tracks and activities!

Basic Functionality

Must have

Nice to have

Data Model

Problems

Toolbox

Back End

Database (e.g. Play! InMemory for development and MySQL for production)

Java

Play! Framework
Form HelperTemplates
ebeans JUnit

Front End

HTML

HTML5 Input TypesForms

CSS

Foundation 4

JavaScript

jQueryGoogle Maps APIFull CalendarDataTablesChart.js

Note: Some HTML5 input types are only available in Google Chrome!

Architecture

Security

Architecture

ORM

Architecture

Rendering

Architecture

Routes


GET		/tad/view/activity			controllers.Tad.viewActivity()
GET		/tad/view/kind				controllers.Tad.viewKind()
GET		/tad/view/item				controllers.Tad.viewItem()

GET		/tad/return/activity			controllers.Tad.getActivities()
GET		/tad/return/kind			controllers.Tad.getKinds()
GET		/tad/return/item			controllers.Tad.getItems()

...

http://tad.mi.hdm-stuttgart.de/tad/return/activity
http://tad.mi.hdm-stuttgart.de/tad/delete/activity?id=1
http://tad.mi.hdm-stuttgart.de/tad/clone/activity?id=1

Tests

A mix of common unit tests and functional tests!

Unit tests

Functional tests

Retrospective

General

ORM with eBeans

+ Pro

  • I didn't wrote any SQL!
  • I developed on an in-memory database, but migrating to MySQL was barely more than changing the configuration!
  • I didn't miss any feature!

- Con

  • Instead of fighting with SQL I was fighting with ebeans
  • I still need to know the database structure and can't do all refactoring in pure Java

    Activity.find.where()
    		.eq("kind_id", id)
    		.findList();
    

Development with Play!

+ Pro

  • Easy and fast!
  • Good integration of ebeans (ORM)!
  • Some really good tools (for testing, development and so on...)

- Con

  • Differences between versions are confusing
  • Using forms to edit only parts of entities is complicated

Demo

http://tad.mi.hdm-stuttgart.de

Sources

/

#