Today
Post on 12-Jan-2016
35 Views
Preview:
DESCRIPTION
Transcript
Today
• Microformats and a sprinkling of RDF
• Everyone good with SVN? Everyone checked something in? No? Try now.
• Mobile– Functionality– UX
If you get too many of the jokes, worry: http://thedailywtf.com
Microformats
Wouldn't it be cool if instead of scary custom parsing of a page's HTML to pull out someone's name or birthday or whatever…You could use something nice and repeatable.
jQuery('.vcard').each(function() {
var hcard = jQuery(this);
var name = hcard.find('.fn').text();
var bday= hcard.find('.bday').text();
});
But… meh.
RDFa – any better?
Yes! •http://rdfa.info/2010/04/22/facebook-adopts-rdfa/
– http://ogp.me – https://developers.facebook.com/docs/beta/opengra
ph/tutorial/ - subtle hint to use this in a project.
•Yesterday: http://news.slashdot.org/story/11/10/02/0010211/odf-12-is-approved – (With RDF support!)
Mobile
Mobile – why do WE care?
• Mobile provides metadata of "context"– (Possibly) location where the user is– (Always) accessible while the user is doing something– (Possibly) info about the user
• So?– ¾ of the world owns a mobile phone
How to go Mobile?• Go Native– Building an app that runs on iOS, Android, BB, etc is a lot
of learning and effort.– Unless you are a hardcore programmer, Objective C is
hard.*– Good luck making it work the same!
• Mobile Web Apps– almost there, but locks you out of the "fun things"
• "Let's build an iPhone interface" = FAIL• "Mobile is likely to be our primary interaction
method, let's design for that" = WIN
Surprisingly Not Locked Out
Web Apps: Slick UI with native gesture support, not too much heavy lifting
•Examples: – http://cssiphone.com (be impressed!)
•Frameworks (please add to this list!)– http://www.iui-js.org – http://jquerymobile.com
The Fun ThingsCan be done in HTML5
•Geolocation•Compass (Sometimes)•Storage (Kinda)•Media Playback•JSON-P
Locked Out•Accelerometer•Mic and Camera•Connection•Contact Viewing/Editing•Device Info•Events/Background•File Access - upload•Notifications•App Store•Cross-Domain Access
Conundrum
We don't want to be locked out
but
We don't have time to learn platform-specific languages
Smart people to the rescue
Only PhoneGap?
• No, just like not "Only jQuery"• http://mobileframeworks.com has a big list
What PhoneGap gives youA better JavaScript APIWith a Browser WindowWrapped up in an app… that's about it.
• Accelerometer• Camera• Capture• Compass• Connection• Contacts• Device• Events• File• Geolocation• Media• Notification• Storage
And… (drumroll) "The cross-domain security policy does not affect PhoneGap
applications."
What does it all mean?
• Developing a PhoneGap app ≈ Developing a Browser Plugin– (see, I had a plan!)
• Let's do it (in 20 minutes)
Planning
• iOS App• That knows where you are standing– And figures out the zip code
• And gets local presidential donation info– From NYT API
• To let you know if you should switch bumper stickers – Through some sort of infovis
In Parallel – Group up!• PhoneGap iOS "Hello World"– Get Lat/Lng from PhoneGap– Pass up the chain by calling loc2zip
• loc2zip(lat, lng); – Check out Google REST APIs
• zip2stats(zip);– Check out NYT API
• stats2vis(stats);– Check out Google Chart URLs
Everyone use https://svn.ischool.berkeley.edu/iolab11/demos/mobile1
Next Time
• Turn in Assignment 2 on Wednesday– Which means if you are stuck, you are asking
questions already… right?
• Demos Next Monday– Now with less broken delicious.com
top related