14
PHP Development for Google Glass with Phass John Coggeshall @coogle

PHP Development for Google Glass using Phass

Embed Size (px)

DESCRIPTION

My talk given at OSCON 2014 on developing Google Glass applications in PHP using Phass -- a free open source platform for Google Glass.

Citation preview

Page 1: PHP Development for Google Glass using Phass

PHP Development for Google Glass with Phass

John Coggeshall@coogle

Page 2: PHP Development for Google Glass using Phass

Welcome! Thanks for coming to my talk!

A little about me

- Core PHP Dev

- Author

- Speaker

- Aquarium Hobbyist

Page 3: PHP Development for Google Glass using Phass

Building GlassWare

Building GlassWare for Google Glass comes in two different flavors-Native Applications - (Java-based Android SDK)

-Web Applications - (Whatever you want, JSON API)

This talk is going to focus (obviously) on Web applications

Page 4: PHP Development for Google Glass using Phass

Building GlassWare – Getting Started

Building GlassWare using the JSON API (called the Mirror API) is relatively straightforward

-https://developers.google.com/glass/

Before we get started, let’s review some basic Glass concepts

Page 5: PHP Development for Google Glass using Phass

Building GlassWare – Terminology

The glass interface is represented primarily as a series of ‘cards’ chronologically ordered in a timeline

Timeline cards are HTML/CSS

- Can contain payloads (video, audio, etc.)

- Can be grouped into bundles of cards

Page 6: PHP Development for Google Glass using Phass

Building GlassWare – Terminology

Things your Glass interacts with (i.e Sharing) are ‘Contacts’

- Contacts can be individuals (Share with Sue)

- Contacts can be applications (Share with Twitter)

- Building a feedback loop between glass and your application will require a contact

Page 7: PHP Development for Google Glass using Phass

Building GlassWare – Terminology Your Glass application can

‘subscribe’ to events happening on glass and interact with them

- Timeline card events for cards you create (i.e. card is inserted, deleted, etc.)

- Subscribe to location events (i.e. user is located at these GPS coordinates updated every 10 minutes)

- Subscription notifications are handled through URI callbacks.

Page 8: PHP Development for Google Glass using Phass

Building GlassWare – Example

Here’s a few examples:-User takes a picture, shares with the ‘Twitter’ contact, which posts the picture to their feed

-Your app receives a location update, and inserts a timeline card which shows the closest bar

-Your app on a periodic basis inserts a kitten video into the timeline, and based on feedback (i.e. deleted?) automatically curates future videos.

Page 9: PHP Development for Google Glass using Phass

Introducing Phass

So what’s Phass?

Phass is a Zend Framework 2 component which abstracts away all of the plumbing for your Glass applications

- OAuth2, Notification Events, Dealing with Attachments, Timeline items, Contacts, etc.

Of course, it’s open source and available on Github: http://github.com/coogle/phass

Page 10: PHP Development for Google Glass using Phass

Introducing Phass

The Goal is to like all frameworks, let you focus on your app and not the details- I.e. automatically creating the proper user context when a location event comes in, so you can focus on what to do when the event happens

Designed as a ZF2 module intentionally – can be loaded up and immediately used by any ZF2 based application to make it Glass-friendly

Page 11: PHP Development for Google Glass using Phass

Phass Demo App

To facilitate both testing and assist people, there is a demo application for Phass as well

-http://github.com/coogle/phass-demo-http://phass.coogleapps.com/

We’re going to use this demo app to walk you through some of the basics of using Phass to build Glass applications of your own!

Page 12: PHP Development for Google Glass using Phass

…. Bring on the demos!

Page 13: PHP Development for Google Glass using Phass

Upcoming enhancements

More powerful view rendering based on common Glass card UIs

-https://developers.google.com/glass/tools-downloads/playground

Implementing some of the less-used API calls that I haven’t gotten to yet

Bug fixesWant to help? Pull Requests welcome!

Page 14: PHP Development for Google Glass using Phass

Questions? Thanks!John Coggeshall

@coogle

http://github.com/coogle/phasshttp://github.com/coogle/phass-demo

http://phass.coogleapps.com/