Designing and Developing for Google Glass
Allen Firstenberg
Jason Salas
Prologue
Most logical people would probably come to the conclusion that attempting to write a book for a product not yet released to market and with next to no public information available about it is, well, how can we best say thisstupid. But thats precisely the challenge we took on when proposing this book to OReilly, as an extension of our faith and optimism about the exciting new realm of wearable computing and the implementation of it within Google Glass.
Writing this material was a particularly challenging project, to say the least. We were tasked with not only authoring a book within an incredibly compressed timeframe, but with extremely little information about the new platform with which to work. Googles steadfast commitment to not letting details about the product leak out made getting details about timelines, specifications, and API capabilities quite tough. But our symbiotic optimism about Glass and our unique dichotomyAllen being a coder who can write, Jason a writer who can codecarried us through this labor of love.
By the same token, the staggered way that information was disseminated as the product neared its glorious launch made writing this book a constant torrent of rewrites, tweaks, updates, and deletions. Written over a period of nearly two full years, the book has been expanded from its original 12 chapters to as many as 19, then pared back down to 15.
Due to numerous evolutions, several of the chapters have effectively been completely rewritten numerous times. And with information made public teetering back and forth between topics governing marketing, engineering, technical specs, and product philosophy, it made for a wildly anachronistic writing process.
But that, as they say, was half the fun.
At the end of the day, we wrote this book as much for our own edification as we did for the Glass community, in its current membership and with scores more to come.
For just as Googlers (in)famously have their dogfooding practice of internally testing new technologies, we wanted to ensure we knew exactly what Glass was all about and what it can do for us as well as for society and bring that to the people.
We hope you thoroughly enjoy this book as much as we did putting it together!
Allen and Jason
Preface
A New (R)evolution in Computing
Google Glass has taken the popular imagination by storm like few other technologies have, potentially being the most transformative consumer device since the iPad and it did so long before its commercial release . Scores of people have shown ardent interest in learning as much as they could about the mysterious machine and the ecosystem that encapsulates it, and many flocked to develop software for it in order to capitalize on its next-gen model of information delivery. Many producers of mobile services beat down the door to learn how to repurpose their existing data and codebases to establish presence for their applications in this new space.
And a significant number of people were hesitant to embrace Glass due to concerns with privacy, legality, health issues, and the personal image using it conveys.
This book effectively addresses all these issues by presenting a simple philosophy weve been heavily promoting to Glass enthusiasts: Think for Glass . While many forthcoming books will discuss coding conventions, design patterns, and development idioms, and will do so very well, our work presents a holistic view of Glass not only as hardware, but as a proper computing platform requiring the adoption of a new mindset for users to truly appreciate the product and with which architects can build maximum value.
Like many of you, we were captivated by our first glimpses of Google Glass in 2012. We immediately knew that Glass was going to be different, more than just a cell phone on our faces, and we wanted to help others understand how it would change our lives. In a series of Hangouts, at first, and later through presentations and helping in the various communities, we shaped our core philosophies of Glass. In this book, we hope to share those philosophies with you.
As two passionate members of the Google development community, each of us an experienced programmer, writer, and Glass enthusiast, we hope this book will serve as a primer to the device, an overview of the platforms guiding principles, and a broad introduction to writing Glassware.
What Were Bringing to the Table
What we need to state up front is that this isnt just a How to code for Google Glass bookwe wholeheartedly believe its much much more than that. Rather than merely copy and paste Googles API documentation and run through the general environment for programming, testing, and distributing Glass applications, we seek to educate you with a philosophy centered on awareness of the Google Glass ecosystemgetting you to Think for Glass. By this merit, youll have a better understanding about the approach necessary to get the most out of this revolutionary new computing platform.
Well be looking at what Glass means for users, developers, and society as a whole.
This book is organized to be flexible to your interests while still presenting the material in a logical fashion to teach you all about Glass. Weve essentially organized the material as a three-act play. While some of the more technical sections build upon concepts that preceded them in earlier chapters, the topics are largely arranged in such a way that they can be consumed completely out of order without losing focus, giving you the freedom to jump to the discussion that intrigues you most, or skip over stuff that doesnt pique your interest. New Glass owners (or those of you contemplating taking the leap) will particularly enjoy the first few chapters, which deal with how to properly Discover the platform.
Maybe you just want to be one of the cool kids and talk to your peers with deep expertise about what Glass is and how they can use it. Living on the bleeding edge is totally awesome, and weve written just for that reason.
If youre a designer who wants to create for the hottest UI to hit the consumer tech industry in years, youll want to make sure you read the Design section. Well be talking about the Glass aesthetic and how to compose effective designs that maximize data in a minimal display, how the experience is fundamentally different than designing for other platforms, and what we mean when we say you should Think for Glass. Before you dive into code, youll want to consider Chapters to make sure that what you want to do works well with the people who use Glass.
If youre a programmer whos heard the buzz about wearable computing, youll then want to continue to the third part of the book, Develop . In this section, it may behoove you to read Chapters where we talk about the Glass Development Kit.
Or if youve been itching to create a slick mashup with some third-party web APIs and want to corner a very emerging space, weve got you covered, toocheck out the latter chapters for insight.
And simply starting from page 1 and running through the entire book will give you a well-rounded Glass education in order to understand the Glass ecosystem and build effective Glassware. Being able to Think for Glass means that you have to understand the system in total. Youll truly grasp what the system is all about and how to best make it work for you once youre done reading.
And at the end of the book, weve included a helpful appendix that focuses on hacking Glass. We also feature Glassware Done Right, a series of case studies that highlight noteworthy third-party services and applications that are top-shelf examples of programs written specifically for the Glass experience that really get the job done. Some are simple, some are complex, but theyre all outstanding and all really fun to use, with each illustrating a positive lesson to follow about how to implement a specific software idea or challenge with this new model.