Links Getting Started with Widgets, Gadgets and Mobile Apps



Similar documents
Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

CST 150 Web Design I CSS Review - In-Class Lab

Coding Standards for Web Development

Web layout guidelines for daughter sites of Scotland s Environment

Further web design: Cascading Style Sheets Practical workbook

Agenda. 1. ZAPms Konzept. 2. Benutzer-Kontroller. 3. Laout-Aufbau. 4. Template-Aufbau. 6. Konfiguration. 7. Module.

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

Chapter 1 Introduction to web development and PHP

JJY s Joomla 1.5 Template Design Tutorial:

ios App Development Using Cordova

Web Design with CSS and CSS3. Dr. Jan Stelovsky

Introduction to Web Development

Introduction to web development and JavaScript

Chapter 1. Introduction to web development

Contents. Downloading the Data Files Centering Page Elements... 6

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

HTML Fails: What No One Tells You About HTML

CSS. CSS - cascading style sheets CSS - permite separar num documento HTML o conteúdo do estilo. ADI css 1/28

Web Design and Databases WD: Class 7: HTML and CSS Part 3

Web Authoring CSS. Module Descriptor

Mobile Web Applications using HTML5. L. Cotfas 14 Dec. 2011

Version: Contact details. Simon Carmiggeltstraat DJ Amsterdam. P.O. Box EB Amsterdam The Netherlands T

Chapter 7 Page Layout Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

<link rel="stylesheet" type="text/css" media="all" href="css/iphone.css" /> <!-- User defined styles -->

.NET Best Practices Part 1 Master Pages Setup. Version 2.0

8 STEPS TO CODE KILLER RESPONSIVE S

Google Web Toolkit. Progetto di Applicazioni Software a.a. 2011/12. Massimo Mecella

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

Mobile Web Site Style Guide

Create Your own Company s Design Theme

Base template development guide

ShoreTel Enterprise Contact Center 8 Installing and Implementing Chat

GUIDE TO CODE KILLER RESPONSIVE S

HTML and CSS. Elliot Davies. April 10th,

CSS for Page Layout. Key Concepts

Differences between HTML and HTML 5

OPENTABLE GROUP SEARCH MODULE GETTING STARTED ADD RESERVATIONS TO YOUR WEBSITE

AEGEE Podio Guidelines

Responsive Web Design: Media Types/Media Queries/Fluid Images

{color:blue; font-size: 12px;}

MCH Strategic Data Best Practices Review

CSS - Cascading Style Sheets

Microsoft Expression Web Quickstart Guide

THE SAS OUTPUT DELIVERY SYSTEM: BOLDLY TAKE YOUR WEB PAGES WHERE THEY HAVE NEVER GONE BEFORE! CHEVELL PARKER, SAS INSTITUTE INC.

Responsive Web Design (RWD) Building a single web site for the desktop, tablet and smartphone

Development Perspective: DIV and CSS HTML layout. Web Design. Lesson 2. Development Perspective: DIV/CSS

Responsive HTML and Drupal

What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure

CS134 Web Site Design & Development. Quiz1

Website Login Integration

Wykład 2_2 TINT. Kaskadowe arkusze stylu Tabele, zastosowanie znaczników div. Zofia Kruczkiewicz

How To Customize A Forum On Vanilla Forum On A Pcode (Forum) On A Windows (For Forum) On An Html5 (Forums) On Pcode Or Windows 7 (Forforums) On Your Pc

HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL

Citrix StoreFront. Customizing the Receiver for Web User Interface Citrix. All rights reserved.

Contents. Introduction Downloading the Data Files... 2

Introduction to Web Technologies

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY

Creating an newsletter using SimpleNews and phplist

Eloqua What is this and why should I read it?

01/42. Lecture notes. html and css

Application Development Guide for

Creator Coding Guidelines Toolbox

jquery Sliding Image Gallery

Scoop Hosted Websites. USER MANUAL PART 4: Advanced Features. Phone: scoop@scoopdigital.com.au Website: scoopdigital.com.

Outline of CSS: Cascading Style Sheets

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

WordPress and HTML Basics

GEMFIND. We Handle The Journey. So You Can Focus On The Destination. WEB TECHNOLOGIES FOR THE JEWELRY INDUSTRY - Est. 1999

Web Development I & II*

How to Customize Support Portals

Apple URL Scheme Reference

CIS 467/602-01: Data Visualization

BT MEDIA JOOMLA COMPONENT

The Essential Guide to HTML Design

UComment. UComment is a comment component for Umbraco, it makes it very easy to add comment functionality to any Umbraco content document you wish.

Introduction to Adobe Dreamweaver CC

Create interactive web graphics out of your SAS or R datasets

HTML5 and CSS3. new semantic elements advanced form support CSS3 features other HTML5 features

Getting Started Guide

Web Design for Programmers. Brian Hogan NAPCS Slides and content 2008 Brian P. Hogan Do not reproduce in any form without permission

Learning Web Design. Third Edition. A Beginner's Guide to (X)HTML, Style Sheets, and Web Graphics. Jennifer Niederst Robbins

A send-a-friend application with ASP Smart Mailer

Application Development Guide for Samsung Smart TV

Web Designing with UI Designing

WEB DEVELOPMENT IA & IB (893 & 894)

Kentico CMS 7.0 Personal Site Guide

Transcription:

Widgets, Gadgets, and Mobile Apps for Libraries: Tips, Code Samples, Explanations, and Downloads Michael Sauers Technology Innovation Librarian Nebraska Library Commission msauers@nlc.state.ne.us Jason A. Clark Head of Digital Access and Web Services Montana State University Libraries jaclark@montana.edu Karen A. Coombs Head of Web Services University of Houston Libraries kacoombs@uh.edu Mobile/Gadget/Widget Design Building Blocks 1. LEARN learn and use the platform (iphone, Blackberry, browser, WWW) 2. THINK MODULAR think of atomic library services; can they work in this environment? 3. DESIGN and TEST pick the pieces you need, format those pieces for display 4. DISPLAY work within the confines of the platform, keep it simple Mobile/Gadget/Widget Design Multiple Endpoints Facebook, MySpace igoogle, Blogs Content/Learning Management Systems (moodle, Drupal, etc.) Mobile Devices An opportunity to broadcast our library signals and get into workflow of our users Links Getting Started with Widgets, Gadgets and Mobile Apps WidgetBox: http://www.widgetbox.com/ Creating Open Search Plugins: https://developer.mozilla.org/en/creating_opensearch_plugins_for_firefox Google Gadgets: http://code.google.com/apis/gadgets/ Designing for the Mobile Web: http://www.sitepoint.com/article/designing-for-mobile-web/ Making the Mobile Web Faster: http://code.google.com/speed/articles/mobile.html * View more related links at: http://delicious.com/tag/il2009+w15 Portable Libraries Sample Applications MSU Library Search OpenSearch Plugin TERRA: The Nature of Our World Google Gadget Mobile Digital Collections with Flickr * View samples and download code at http://www.lib.montana.edu/~jason/files.php 1

Step #1: MSU Library Search OpenSearch Plugin XML Markup XML Source: <?xml version="1.0" encoding="utf-8"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <ShortName>MSU Libraries Catalog</ShortName> <Description>Search MSU Libraries Catalog</Description> <Tags>books journal cds dvds</tags> <Image height="16" width="16" type="image/xicon">http://www.lib.montana.edu/meta/img/msu_favicon.ico</image> <Url type="text/html" method="get" template="http://isbn.lib.montana.edu/uhtbin/cgisirsi/x/0/0/57/5?user_id=webbz&password=web 19bz&library=BOZEMAN&searchdata1={searchTerms"/> <InputEncoding>UTF-8</InputEncoding> <AdultContent>false</AdultContent> </OpenSearchDescription> Step #1: MSU Library Search OpenSearch Plugin Explanation Simple XML markup Provides metadata, images and search template Step #2: MSU Library Search OpenSearch Plugin Link it up <link rel="search" type="application/opensearchdescription+xml" title="msu Libraries Catalog" href="http://www.lib.montana.edu/~jason/files/tools/msucatalog-opensearch.xml"/> Step #2: MSU Library Search OpenSearch Plugin Explanation Make it accessible on the Web Create an auto discovery link (see above) 2

Step #1: TERRA Google Gadget Create XML container XML source: <?xml version="1.0" encoding="utf-8"?> <Module> <ModulePrefs title="terra: The Nature of Our World" title_url="http://www.lifeonterra.com/" description="browse and search TERRA: The Nature of Our World for nature videos" screenshot="http://www.lifeonterra.com/meta/images/terra-gadget-screen.jpg" thumbnail="http://www.lifeonterra.com/meta/images/terra-gadget-thumb.jpg" author="montana State University Libraries" author_location="bozeman, MT, USA" author_email="jaclark@montana.edu" > <Require feature="tabs" /> <Require feature="dynamic-height" /> <Require feature="setprefs"/> </ModulePrefs> <UserPref name="show_date" display_name="show Dates?" datatype="bool"/> <UserPref name="show_summ" display_name="show Summaries?" datatype="bool"/> <UserPref name="num_entries" display_name="number of Entries:" /> Step #1: TERRA Google Gadget Explanation Google Gadget uses XML for instructions Name the modules assigned to the gadget <Module> List the requirements and user preferences needed to direct the xhtml and javascript to do something Step #2: TERRA Google Gadget Add behavior w/xhtml and javascript XML source: <Content type="html"> <![CDATA[ <script type="text/javascript"> // Initialize tabs, designate the tab named "TERRA Feed" as // the tab selected by default. var tabs = new _IG_Tabs( MODULE_ID, "TERRA Feed"); function init() { // Create the tab and define a corresponding <div> in the // HTML portion of the gadget. Add static content to the <div>. tabs.addtab("terra Feed", "feed"); tabs.addtab("terra Search", "search"); // Call init function to initialize and display tabs. _IG_RegisterOnloadHandler(init); </script> <div id="feed" style="display:none"> <p><img src="http://www.lib.montana.edu/meta/img/msu_favicon.ico" alt="terra video rss feed" /> <strong>terra: The Nature of Our World</strong></p> <style> #content_div { font-size: 80%; margin: 5px; background-color: #FFFFBF; </style> <div id=content_div> 3

<script type="text/javascript"> // Get userprefs var prefs = new _IG_Prefs( MODULE_ID ); var showdate = prefs.getbool("show_date"); var summary = prefs.getbool("show_summ"); var entries = prefs.getint("num_entries"); // If user wants to display more than 9 entries, display an error // and set the value to 9, the max allowed. if (entries > 9) { alert("you cannot display more than 9 entries."); entries = 9; // Use the _IG_FetchFeedAsJSON() function to retrieve core feed data from // the specified URL. Then combine the data with HTML markup for display in // the gadget. _IG_FetchFeedAsJSON( "http://feeds.feedburner.com/terravideos", function(feed) { if (feed == null){ alert("there is no data."); return; // Start building HTML string that will be displayed in gadget. var html = ""; // Access the fields in the feed //html += "<div><b>" + feed.title + "</b>"; //html += "<div>" + feed.description + "<br>"; // Access the data for a given entry if (feed.entry) { for (var i = 0; i < feed.entry.length; i++) { html += "<div>" + "<a target='_blank' href='" + feed.entry[i].link + "'>" + feed.entry[i].title + "</a> "; if (showdate==true) { // The feed entry Date field contains the timestamp in seconds // since Jan. 1, 1970. To convert it to the milliseconds needed // to initialize the JavaScript Date object with the correct date, // multiply by 1000. var milliseconds = (feed.entry[i].date) * 1000; var date = new Date(milliseconds); html += date.tolocaledatestring(); html += " "; html += date.tolocaletimestring(); if (summary==true) { html += "<br><i>" + feed.entry[i].summary + "</i>"; html += ""; 4

_gel("content_div").innerhtml = html; // The rest of the function parameters, which are optional: the number // of entries to return, and whether to return summaries., 5, summary); </script> <a href="http://feeds.feedburner.com/terravideos" target="_blank">+ subscribe</a> <div id="search" style="display:none"> <p><img src="http://www.lib.montana.edu/meta/img/msu_favicon.ico" alt="terra video search" /> <strong>terra: The Nature of Our World</strong></p> <form action="http://www.lifeonterra.com/results.php" method="post" target="_blank"> <input type="hidden" name="max" value="25" /> <input type="hidden" name="low" value="0" /> <input class="txt_search" type="text" name="keyword" maxlength="35" size="25" /> <input type="submit" id="submit" class="submit" value="search" /> </form> <a href="http://www.lifeonterra.com/search.php" target="_blank">+ advanced search</a> ]]> </Content> Step #2: TERRA Google Gadget Explanation Using javascript methods that are part of Google Gadget API to control action/behavior of the gadget <script type="text/javascript">, var tabs, _IG_RegisterOnloadHandler(init); XHTML markup for tabbed display and <div id=content_div> to hold dynamic content <div id="feed" style="display:none">, <div id="search" style="display:none"> Use javascript to assign and parse feed, print out dynamic content var prefs, _IG_FetchFeedAsJSON("http://feeds.feedburner.com/Terravideos", Step #3: TERRA Google Gadget Upload to server and submit to Google Test gadget at http://code.google.com/apis/gadgets/docs/legacy/gs.html#scratchpad If you want to brand your gadget, will need to create image screenshot and thumbnail (see below) Instructions for submitting gadget - http://www.google.com/ig/submit 5

Step #1: Mobile Digital Collections Create xhtml markup xhtml source: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>portable Libraries, Mobile/iPhone View of Content : Montana State University Libraries</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=500"> <!-- <meta name="viewport" content="width=320"> 480 is width of iphone sideways --> <link rel="shortcut icon" href="/meta/img/msu_favicon.ico" /> <link rel="stylesheet" type="text/css" media="print" href="/meta/styles/print.css" /> <link rel="stylesheet" type="text/css" media="handheld" href="/meta/styles/mobile.css" /> <h1>portable Libraries, <span>mobile/iphone View of Content</span><small>from MSU Libraries</small></h1> <div class="container"> <h2 class="trigger"><a href="#">dudes Enroute to Buffalo Stampede (Ca. 1920's)</a></h2> <div class="toggle_container"> <div class="block"> <h3>dudes Enroute to Buffalo Stampede (Ca. 1920's)</h3> <a title="dudes Enroute to Buffalo Stampede (Ca. 1920's)" href="http://www.flickr.com/photos/msulibrary/3329345848/"><img src="http://farm4.static.flickr.com/3646/3329345848_f7e0d9ef23_s.jpg" alt="dudes Enroute to Buffalo Stampede (Ca. 1920's)" /></a> <p><strong>date Uploaded:</strong> Wed, 4 Mar 2009 12:49:42-0800</p> Step #1: Mobile Digital Collections Explanation The markup framework for our mobile app - digital skeleton Tags that inform display - <meta name="viewport" content="width=500" /> Tags that javascript will use to create actions - <h2 class="trigger">, <div class="toggle_container"> 6

Step #2: Mobile Digital Collections Add behavior with javascript javascript source: <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(document).ready(function(){ ); </script> $(".toggle_container").hide(); $("h2.trigger").toggle(function(){ $(this).addclass("active");, function () { $(this).removeclass("active"); ); $("h2.trigger").click(function(){ $(this).next(".toggle_container").slidetoggle("slow,"); ); Step #2: Mobile Digital Collections Explanation Load the Prototype javascript library Tell it which xhtml tags to use - <h2 class="trigger">, <div class="toggle_container"> Assign action using internal function with Prototype library hide(), addclass("active"), slidetoggle("slow,") * Learn more about Prototype internal functions - http://www.prototypejs.org/api 7

Step #3: Mobile Digital Collections Add style with CSS, images CSS source: /* =miscellaneous and special global settings ----------------------------------------------- */ body { font: 10px normal Arial, Helvetica, sans-serif; margin: 0; padding: 0; line-height: 1.7em; *, * focus { outline: none; margin: 0; padding: 0;.container { width: 500px; margin: 0 auto; h1 { font: 4em normal Georgia, 'Times New Roman', Times, serif; text-align:center; padding: 20px 0; color: #aaa; h1 span { color: #666; h1 small{ font: 0.3em normal Verdana, Arial, Helvetica, sans-serif; text-transform:uppercase; letter-spacing: 1.5em; display: block; color: #666; h2.trigger { padding: 0 0 0 50px; margin: 0 0 5px 0; background: url("../img/h2_trigger_a.gif") no-repeat; height: 46px; line-height: 46px; width: 450px; font-size: 2em; font-weight: normal; float: left; h2.trigger a { color: #fff; text-decoration: none; display: block; h2.trigger a:hover { color: #ccc; h2.active { background-position: left bottom; 8

.toggle_container { margin: 0 0 5px; padding: 0; border-top: 1px solid #d6d6d6; background: #f0f0f0 url("../img/toggle_block_stretch.gif") repeat-y left top; overflow: hidden; font-size: 1.2em; width: 500px; clear: both;.toggle_container.block { padding: 20px; background: url("../img/toggle_block_btm.gif") no-repeat left bottom;.toggle_container.block p { padding: 5px 0; margin: 5px 0;.toggle_container h3 { font: 2.5em normal Georgia, "Times New Roman", Times, serif; margin: 0 0 10px; padding: 0 0 5px 0; border-bottom: 1px dashed #ccc;.toggle_container img { float: left; margin: 10px 15px 15px 0; padding: 5px; background: #ddd; border: 1px solid #ccc; Step #3: Mobile Digital Collections Explanation Create rules for display and format using our mobile.css file <div> tags are given absolute widths, <h2>, <img>, <a> tags styled for mobile (e.g., display:block) Step #4: Mobile Digital Collections Upload to server and test it out Test mobile view with iphoney (http://www.marketcircle.com/iphoney/) or search Google for iphone emulator Final Thoughts Start with simple display formats basic xhtml and CSS Keep experimenting and learning with a single widget/gadget/mobile service Train yourself to recognize when library web services can become atomic as widgets, gadgets, etc. 9