Layar February 20th Webinar – Get Started With the Layar Creator
Layar Development on the PorPOISe platform
-
Upload
johannes-la-poutre -
Category
Technology
-
view
4.994 -
download
2
description
Transcript of Layar Development on the PorPOISe platform
Layar Development on the PorPOISe platform
Layar Development Day 19 June 2010
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
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!
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
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
The AR content• This is the central part: where the POIs come from
• A few options...
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>
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
XML (continued)
• Bonus: google maps conversion stylesheet!
• example: Vinkeveense plassen (diving layer)
• easy to set up, demo later if time permits!
Database• Still no programming!
• just a DB schema:
• POI
• Action
• Object (2/3D)
• Transform (2/3D)
• User
• optional, for oAuth
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
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
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);
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?
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!
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!
CreditsPorPOISe is created by Jens de Smit from SurfNET
twitter: @jfdsmit
Contributions from Squio.nl> and you!?
http://code.google.com/p/porpoise