Posted on by & filed under Content - Highlights and Reviews, Programming & Development.

codeA guest post by Justin Ribeiro, a software engineer, building on the edge with his company, Stickman Ventures, Inc. He will hack just about anything–code, hardware, house, car, and kids’ toys. You can find him on Twitter @justinribeiro.

Although sending data to and from Glass through the Mirror API is straightforward, determining the proper means to structure that data can be difficult. Glass is not your average platform; your design has to account for a different user interface and user experience.

With limited screen real estate, you can’t send the kitchen sink to Glass. Similarly, you can’t just shrink the font size in hopes of fitting more data onto a card. Besides paring down what you send to a user, you can also send groupings of cards called bundles.

Bundling cards allows you to send related information as subsequent cards that appear underneath a single timeline card. You can manage this in your application by creating a bundleid and then assign it to timeline cards that you create.

If you have a specific card you want to use as your front cover, you can set isBundleCover to true.

Bundling cards is not an end-all-be-all. Not all data works well in bundles, and you shouldn’t just insert a single card at the beginning of the day and update it with random, unrelated information.

Data doesn’t work with a bundle? You can paginate a card as well. If you’re just sending text, Glass will auto paginate as needed. If you’re sending HTML, you need to give Glass a hint as to what you want to do. You can add an auto-paginate class to your article tag that will have Glass handle the autopagination.

You can also handle this and break up your HTML before you send it to Glass into <article> blocks.

By default Glass will show the first card again when going into “Read More” more. If you don’t want to show the first page card when selecting, you can set it to cover-only:

Again, pagination is not a magic bullet; sending 20 paginated cards is hard on the end user and doesn’t really fit the overall smooth experience of Glass.

Conclusion

If you keep one thing in mind when developing for Glass, it’s about keeping the experience clean and usable. If your data doesn’t fit into a bundle, and your data doesn’t paginate well, then question if you need all that data. Simple, clean language with solid visuals gets you a long way to a solid Glassware application.

Look below for Glass and PHP resources from Safari Books Online.

Not a subscriber? Sign up for a free trial.

Safari Books Online has the content you need

Web Designer’s Guide to Google Glass is a hands-on guide to optimizing web sites for Google Glass will show you how to take advantage of the latest advancements of this tiny screen, including watching videos and viewing forms. You’ll also take a look at the Mirror API and building web-based native apps for Google Glass, and get insightful tips from an expert designer on avoiding web design pitfalls.
Fluent Conference 2013: JavaScript & Beyond Complete Video Compilation is for anyone who missed the Fluent Conference 2013 in San Francisco this past May, allowing you to catch every workshop, session, and keynote with this complete video compilation of the event. Catch up with this year’s lineup of speakers—seasoned pros as well as notable newcomers—as they share their expertise with JavaScript, HTML5, CSS, and related technologies that power the Web, and don’t forget about Fluent Conference 2014.
Programming PHP, 3rd Edition is an updated edition that teaches everything you need to know to create effective web applications with the latest features in PHP 5.x. You’ll start with the big picture and then dive into language syntax, programming techniques, and other details, using examples that illustrate both correct usage and common idioms.

Tags: Bundling cards, Glass, Google, Google Glass, Mirror API, php,

Comments are closed.