layar development on the porpoise platform

19
Layar Development on the PorPOISe platform Layar Development Day 19 June 2010

Upload: johannes-la-poutre

Post on 24-May-2015

4.995 views

Category:

Technology


2 download

DESCRIPTION

Slides of my workshop for the Layar Developer Day held June 19th, 2010 in Amsterdam. Introduction to the PorPOISe platform as a Layar API server.

TRANSCRIPT

Page 1: Layar Development on the PorPOISe platform

Layar Development on the PorPOISe platform

Layar Development Day 19 June 2010

Page 2: Layar Development on the PorPOISe platform

The Layar API

• Based on HTTP requests:

• much like a regular web request

• contains user location (and more)

• Response (JSON):

• Point Of Interest Objects (POI)

• layer metadata

Page 3: Layar Development on the PorPOISe platform

Implementations• Roll your own

• basic cases are pretty simple

• you really learn how Layar works

• Use an existing framework

• don’t reinvent the wheel

• more complicated scenarios are implemented...

• ...or easy to add (contribute!)

• the programmers virtue: be lazy!

Page 4: Layar Development on the PorPOISe platform

The PorPOISe Platform

Page 5: Layar Development on the PorPOISe platform

PorPOISe• Open Source Layar Application Server

• permissive BSD license

• well designed, OO architecure

• runs under a standard PHP web server

• out of the box support for XML file and database sources

• 3 POI types: point, 2D, 3D objects

• basic web app and web view templates

• support for standard oAuth

Page 6: Layar Development on the PorPOISe platform

PorPOISe Setup• Download distribution

• http://code.google.com/p/porpoise

• Upload to webserver

• Configuration:

• add developer details to config.xml

• add layar description to config.xml

• Deployment:

• add porpoise endpoint to Layar deployment site

Page 7: Layar Development on the PorPOISe platform

The AR content• This is the central part: where the POIs come from

• A few options...

Page 8: Layar Development on the PorPOISe platform

XML file<?xml version="1.0" encoding="utf-8"?>

<pois> <poi> <id>1</id> <title>Parking lot</title> <line2>Central parking, free</line2> <line3>Open all day</line3> <line4>Wheelchair accessible</line4> <lat>52.234127</lat> <lon>4.959914</lon> <imageURL>http://maps.google.com/icons/parkinglot.png</imageURL> <attribution>(c) TABworldmedia.com</attribution> <type>1</type> <action> <uri>http://my.server.com/action1</uri> <label>Make reservation</label> </action>

Page 9: Layar Development on the PorPOISe platform

XML advantages• Easy to create, no programming!

• No additional configuration needed

• performs well for up to a few hundred POIs total

• When to use

• small projects

• prototypes

• as part of a XML / XSL transformation chain

Page 10: Layar Development on the PorPOISe platform

XML (continued)

• Bonus: google maps conversion stylesheet!

• example: Vinkeveense plassen (diving layer)

• easy to set up, demo later if time permits!

Page 11: Layar Development on the PorPOISe platform

Database• Still no programming!

• just a DB schema:

• POI

• Action

• Object (2/3D)

• Transform (2/3D)

• User

• optional, for oAuth

Page 12: Layar Development on the PorPOISe platform

Database advantages• Robust and can be more secure

• Performs well for many thousands POIs

• When to use

• large projects

• high performance needed

• dynamic content, user authentication

• complex selection criteria

Page 13: Layar Development on the PorPOISe platform

API gateway

• The PorPOISe server acts as a converter between a geo-location aware service and Layar

• Example: Twitter (tweepsaround), Foursquare, Gowalla

• Still just one method to implement:

• iPOIConnector::getPOIs(Filter $filter);

• extend WebApiPOIConnector for oAuth support

Page 14: Layar Development on the PorPOISe platform

Virtual POI server

• The PorPOISe server generates “virtual POIs” relative to the observer

• Great for screenshot layers

• again just one method to implement:

• iPOIConnector::getPOIs(Filter $filter);

Page 15: Layar Development on the PorPOISe platform

Demo: orangedress• Last week, ladies in orange

dresses got arested becauseof strict FIFA rules

• It turned out to be a guerillamarketing stunt which gothuge press attention

• Today the “Orange DressLadies” will not be at thefootball match

• Or... will they?

Page 16: Layar Development on the PorPOISe platform

Demo: orangedress• Let’s produce a real layer: put the Orange Dress Ladies in the

middle of Moses Mabhida Stadium - in AR

• locate stadium on Google Maps

• create XML file

• adapt PorPOISe configuration

• upload files & graphics

• request publication...

• ...done!

Page 17: Layar Development on the PorPOISe platform

Future• PosPOISe is Open Source so you can contribute!

• Some ideas:

• implement the API changes we discuss today

• write a test suite (SimpleTest is great!)

• performance optimization

• new database schemas

• implement true geohashing for 1 billion POI projects

• ...anything goes!

Page 18: Layar Development on the PorPOISe platform

CreditsPorPOISe is created by Jens de Smit from SurfNET

twitter: @jfdsmit

Contributions from Squio.nl> and you!?

http://code.google.com/p/porpoise