W3C Widgets the basics



Similar documents
Android Programming Family Fun Day using AppInventor

WEB, HYBRID, NATIVE EXPLAINED CRAIG ISAKSON. June 2013 MOBILE ENGINEERING LEAD / SOFTWARE ENGINEER

the future of mobile web by startech.ro

Personal Financial Manager (PFM) FAQ s

Deep analysis of a modern web site

Bridging the Gap: from a Web App to a Mobile Device App

Lecture 4 Cross-Platform Development. <lecturer, date>

ios SDK possibilities & limitations

Conducting Virtual Meetings

First Data Personal Financial Manager (PFM) FAQ s

RecoverIt Frequently Asked Questions

Designing for the Mobile Web Lesson 3: HTML5 Web Apps

How To Develop A Mobile App With Phonegap

ON24 MOBILE WEBCASTING USER GUIDE AND FAQ FEBRUARY 2015

Adobe Connect Support Guidelines

Developing multidevice-apps using Apache Cordova and HTML5. Guadalajara Java User Group Guillermo Muñoz Java Developer

PhoneGap Build Starter

How to Choose Right Mobile Development Platform BROWSER, HYBRID, OR NATIVE

Web Conferencing Version 8.3 Troubleshooting Guide

Communications Cloud Product Enhancements February 2016

Choosing the web s future. Peter-Paul Koch Drupal Jam, 12 mei 2016

Choosing the web s future. Peter-Paul Koch FOWA, 6 October 2015

place/business fetch details, removefromfavorite () function, 189 search button handler bind, B BlackBerry build environment

Mobile Ad Injector User Guide

Developing Offline Web Application

Bluetooth Pairing with CUE - Android TM

MOBILE APPS. QA Testing for mobile applications

JavaScript Testing. Beginner's Guide. Liang Yuxian Eugene. Test and debug JavaScript the easy way PUBLISHING MUMBAI BIRMINGHAM. k I I.

Certificate III in Recordkeeping 1 BSB30807

Building native mobile apps for Digital Factory

Retool your HTML/JavaScript to go Mobile

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. PhoneGap

Novell Filr 1.0.x Mobile App Quick Start

Building Mobile Applications Creating ios applications with jquery Mobile, PhoneGap, and Drupal 7

BASIC COMPONENTS. There are 3 basic components in every Apache Cordova project:

Rich Internet Applications

With a single download, the ADT Bundle includes everything you need to begin developing apps:

Book of over 45 Spells and magic spells that actually work, include love spells, health spells, wealth spells and learning spells and spells for life

Jenesis Software - Podcast Episode 3

Workstation Certification Tool Frequently Asked Questions

JTouch Mobile Extension for Joomla! User Guide

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

Mobile App Infrastructure for Cross-Platform Deployment (N11-38)

Audio Web Conferencing Elluminate Live and Skype Guidelines for Use

10 Tips & Tricks to Using Open Atrium

SellerDeck 2013 Reviewer's Guide

Certificate IV in Project Management Practice 1 BSB41513

How to use network marketing via the social network

This guide is to help you get started with Live Chat Support on your Wix website. If you have any additional questions after reading this guide,

12Planet Chat end-user manual

Affiliate Marketing: How 30 minutes of work made me $100 overnight. By A. Geoff Barnett

Developing Exceptional Mobile and Multi-Channel Applications using IBM Web Experience Factory IBM Corporation 1

Building a Simple Mobile optimized Web App/Site Using the jquery Mobile Framework

Best practices building multi-platform apps. John Hasthorpe & Josh Venman

Mobile Development with Qt

Oracle Applications Release Notes Release 12 for Apple Macintosh OS X version 10.4 (Doc ID )

A PRACTICAL GUIDE TO db CALCULATIONS

Administering Jive Mobile Apps

GENERAL TRAINING ACCOUNTS

Single Sign-On Portal User Reference (Okta Cloud SSO)

Adobe Summit 2015 Lab 712: Building Mobile Apps: A PhoneGap Enterprise Introduction for Developers

Clarity High School Student Survey

Cross-Platform Phone Apps & Sites with jquery Mobile

Web Browser. Fetches/displays documents from web servers. Mosaic 1993

Frequently Asked Questions for the USA TODAY e-newspaper

BBC LEARNING ENGLISH 6 Minute English Is student life all good?

Internet Explorer Settings for Optum CareTracker

HYBRID APPLICATION DEVELOPMENT IN PHONEGAP USING UI TOOLKITS

What HTML5 is, isn t, and why it matters

ipad, a revolutionary device - Apple

How To Use Titanium Studio

CiviMobile & CiviSync Mobile. Peter McAndrew Rohit Thakral

Mobile Development Frameworks Overview. Understand the pros and cons of using different mobile development frameworks for mobile projects.

Full version is >>> HERE <<<

Example. Represent this as XML

HTML5 the new. standard for Interactive Web

Mobile Learning Application Based On Hybrid Mobile Application Technology Running On Android Smartphone and Blackberry

Shentel (Shentel.net)

Quick Tricks for Multiplication

If you see "Skip installation of the current version and test the currently installed version of Java" then select that hyperlink.

Web Design Contract. Summary: What do both parties agree to do? Date: [date] Between us [company name] and you [customer name]

Quick Start Guide Mobile Entrée 4

How to pick the right development model for your next mobile project

Transcription:

Hell is other browsers - Sartre W3C Widgets the basics Peter-Paul Koch (ppk) http://quirksmode.org http://twitter.com/ppk Vodafone Widget Camp, 2 May 2009

The mobile web Four problems with making a website work well on a phone: - Small memory - Small display - Flaky browsers - Flaky connections

The mobile web Four problems with making a website phone-compatible: - Small memory - Small display - Flaky browsers - Flaky connections

Flaky connections If the guy next to you is downloading a few movies your network connection will slow down regardless of how good it's supposed to be. I don't see this problem disappearing any time soon.

Flaky connections This is a serious problem for the mobile web, especially when your site uses 200K of custom JavaScript plus a few libraries. They have to be downloaded every time the user visits your site and caching isn't always reliable.

Flaky connections Solution: Put the core files on your mobile phone so that you only need to download the data.

Flaky connections W3C Widgets offer this solution: - Local applications - HTML/CSS/JavaScript - Run in a browser (any browser) - Can handle Ajax requests

W3C Widgets Eventually, I'll be able to share a widget with a friend via Bluetooth, even if I use an Android and he uses a Nokia S60 or a HTC Windows Mobile or a Blackberry and It Just Works

W3C Widgets Wouldn't that be totally astoundingly absolutely inconceivably interoperable?

W3C Widgets And hundreds of thousands of web developers already know how to create widgets. It's just HTML/CSS/JavaScript, after all.

W3C Widgets It Just Works in the Vodafone Widget Manager for S60 phones.

W3C Widgets It Just Works S60 in the Opera/T-Mobile Widget Manager for (probably) Windows Mobile phones.

W3C Widgets It Just Works S60 Windows Mobile in the Nokia Widget Runtime on S60 (as long as you add an info.plist file)

W3C Widgets It Just Works S60 (2x) Windows Mobile Otherwise, though, there's no support. Yet. (I asked Google nicely, though.)

W3C Widgets We need: - a browser (preferably a good one such as Opera Mobile, Android WebKit, or Safari) - a way of associating.wgt files with this browser OR an installation mechanism - JavaScript device APIs

JavaScript Device APIs are APIs that grant access to phone functionality - camera - contact list - text messages - etc.

JavaScript Device APIs are necessary for a true mobile experience. W3C widgets should be able to tie into phone functionality.

JavaScript Device APIs - BONDI specification (not yet implemented) - Phonegap library (Android, Blackberry, iphone) - Opera/T-Mobile widget manager (Windows Mobile) - Adobe Air

JavaScript Device APIs Security If I receive a widget from someone and it uses device APIs how do I know it's not going to try to steal my contact list?

JavaScript Device APIs Security This problem will probably be solved by signed widgets and security levels. On the lowest security levels, phone users will be prompted for every device API call the widget wants to perform. Higher levels do it automatically.

JavaScript Device APIs Security Unfortunately both JavaScript überguru Douglas Crockford and Dojo library creator Alex Russell don't believe in this solution. More research is necessary.

W3C Widgets Security JavaScript's same-source policy is not implemented in widgets, because they have to be able to request data from any source. This, too, requires more thought.

Practicalities Before we continue this is totally new, untried technology. So don't take anyone's word for anything, especially when it concerns design and interface.

Practicalities All the speakers here could be totally wrong, and it might be YOU who figures out exactly why, how, and when to use W3C widgets.

Practicalities - Create 1 HTML page with the CSS, JavaScript, and images you need. - Add an icon and a config.xml - Zip the lot - Change extension to.wgt - It Just Works.

Practicalities widget object The widget object contains some special methods and properties for widgets. http://www.quirksmode.org/m/widgets.html

Practicalities widget object widget.identifier 0382742819384738353 What does this number mean? I have no idea, either.

Practicalities widget object widget.setpreferenceforkey(value,key) sets a preference that can be retrieved by preferenceforkey(key) The value,key order is totally absurd And yes, you could also use cookies.

Practicalities widget object widget.getattention() lights up the screen Useful for applications that require the user to stare at them for a long time without taking action.

Practicalities widget object widgetmodechange event fires when the user docks or undocks the widget. widget.addeventlistener ('widgetmodechange',yourfunction,false)

Practicalities widget object widget.widgetmode - application: running on a phone - widget: running on a desktop - docked: docked/minimised

Practicalities config.xml <widget id="http://quirksmode.org/widget" dockable="true"> <widgetname>test widget</widgetname> <icon>pix/myicon.gif</icon> <width>200</width> <height>200</height> <security> <access> <host>quirksmode.org</host> </access> </security> </widget>

Practicalities config.xml <widget id="http://quirksmode.org/widget" dockable="true"> Widget needs unique ID for updating purposes. The dockable attribute says the widget may continue to run scripts in docked mode.

Practicalities config.xml <widgetname>test widget</widgetname> <icon>pix/myicon.gif</icon> Set name and (local) icon of widget. Advise: keep name short, you've only got 60px of space.

Practicalities config.xml <width>200</width> <height>200</height> Set maximum width and height of widget. May not become larger than display, though.

Practicalities config.xml <security> <access> <host>quirksmode.org</host> </access> </security> The widget is allowed to download files from this/these host(s). Warning: changed in Opera 10.

Practicalities Writing and debugging While creating a widget you can test in any browser. It's just HTML/CSS/JavaScript, after all.

Practicalities Writing and debugging When you've zipped the widget and changed the extension to.wgt you can test in Opera. (Ignore Opera 10 right now because of security changes.)

Practicalities Writing and debugging Finally, upload to mobile phone and test there. This is a necessary step; unfortunately it's not possible to test widgets without a mobile phone. Desktop just isn't the same.

Practicalities Writing and debugging Use the SDK for the tricky bits. You'll hear more about that later.

More information Mobile research: http://quirksmode.org/m/ Yahoo! and Google presentations via http://quirksmode.org/blog/

Thank you for your attention

Questions? Ask away. Or ask me on Twitter http://twitter.com/ppk or on my site http://quirksmode.org