2. 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
3. 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!
5. 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
6. 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
7. The AR content
• This is the central part: where the POIs come from
• A few options...
9. 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
10. XML (continued)
• Bonus: google maps conversion stylesheet!
• example: Vinkeveense plassen (diving layer)
• easy to set up, demo later if time permits!
11. Database
• Still no programming!
• just a DB schema:
• POI
• Action
• Object (2/3D)
• Transform (2/3D)
• User
• optional, for oAuth
12. 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
13. 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
14. 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);
15. Demo: orangedress
• Last week, ladies in orange
dresses got arested because
of strict FIFA rules
• It turned out to be a guerilla
marketing stunt which got
huge press attention
• Today the “Orange Dress
Ladies” will not be at the
football match
• Or... will they?
16. 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!
17. 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!
18. Credits
PorPOISe is created by Jens de Smit from SurfNET
twitter: @jfdsmit
Contributions from Squio.nl
> and you!?
http://code.google.com/p/porpoise