In-browser storage and me Jason Casden North Carolina State University Libraries Code4Lib 2012.

Slides:



Advertisements
Similar presentations
Build Amazing Apps with Web Standards Mobile HTML5 Applications In Hours, Not Days.
Advertisements

HTML5 Overview Owen Williams owen at dynabooks daht com Owen Williams owen at dynabooks daht com.
Computer Forensics Internet Artifacts.
Single Page Apps with Breeze and Ruby.
CTS2 DEVELOPMENT FRAMEWORK CTS2 Overview. Schedule What is it? Why a framework? What does this do for me? Plugins Implementations available now CTS2 Compliance.
HiveMind Distributed File Storage Using JavaScript Botnets Copyright 2013 Sean T. Malone.
HTML5: Risky Business or Hidden Security Tool Chest Johannes B. Ullrich, Ph.D.
Using Evernote and Google Docs in your web or mobile application (and potentially Dropbox and Skydrive) By Peter Messenger Senior Developer – Triple Point.
HTTP Request/Response Process 1.Enter URL ( in your browser’s address bar. 2.Your browser uses DNS to look up IP address of server.com.
Bridging the Gap between eBook Readers and Browsers eBooks: Great Expectations for Web Standards W3C Workshop on Electronic Books and the Open Web Platform.
Copyright Justin C. Klein Keane HTML 5 Security Philadelphia OWASP August, 2013.
HTML5 That’s What You Need to Know Today Ingo Rammer | thinktecture |
Πολυμεσικό Υλικό στο Internet: Συγχρονισμός, Επεξεργασία και Διακίνηση Συγχρονισμός Πολυμεσικών Εφαρμογών & Σχετικά Εργαλεία 13/11/2014 Β. Μάγκλαρης Μ.
Introduction to HTML5 Programming donghao. HTML5 is the New HTML Standard New Elements, Attributes. Full CSS3 Support Video and Audio 2D/3D Graphics Local.
Developing HTML5 Application using MVVM pattern Pekka Ylenius.
HTML5 Storage. Why Local Storage? Data accessed over the internet can never be as fast as accessing data locally Data accessed over internet not secure.
Italian C++ Community Chromium as a framework Raffaele Intorcia Tiziano Cappellari.
HTML5 Applications with ASP.NET Web Forms Stephen Walther Superexpert.com
Building Mobile Apps in the Cloud – Comparing Approaches.
LinkedIn Mobile How we do we do it?. Build Design Code Testing Deploy Platform iOS Android Browser Other.
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
Introduction to Model-View-Controller (MVC) Web Programming with TurboGears Leif Oppermann,
It’s always better live. MSDN Events Developing ASP.NET AJAX Controls with Silverlight.
Platform as a Service (PaaS)
Presented by…. Group 2 1. Programming language 2Introduction.
Chapter 25 Utilizing Web Storage.
Kay Herzam Herzam IT Consulting What‘s new in ASP.NET MS TechTalk.
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
HTML5 GAMING By Scott Benton. HTML5 New HTML Standard Previous Version of HTML, HTML 4.01, Released in 1999 Not an Official Standard Yet No Browsers Have.
CHASING THE EVOLVING WEB Aaron Readify Senior Developer, Technical Specialist (Web) Microsoft MVP – Internet Explorer (Development) SESSION.
Tips for working with disconnected web mapping apps Andy Gup, Javier Abadia.
Lightning Talk Fred Rodriguez Nguyen Do CPSC 473 May 6, 2012.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
Mobile App Support Jacob Poirier Geri Hengesbach Andrea Menke Erin Rossell.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Software Requirements Specification (SRS)
Feature Windows Phone IE10 iOS Safari Android Chrome Blackberry WebKit Web Storage Yes (7)YesYes (2)Yes (6) Geolocation Yes.
Blending in-person and online library services by utilizing mobile technology Jason Casden North Carolina State University Libraries ASEE - Mobile Strategies.
CHAP 6. USING THE HTML5 WEB STORAGE API.  Cookie - Are a built-in way of sending text values back and forth from server to client.  Servers can use.
WEB PUSH Johannes Brodwall. Outline The low down Is it time? Implementation notes Firefox Chrome Safari Implementation bits.
Putting Performance Best Practices Together to Create the Perfect SPA Chris Love2Dev.com.
HTML 5 Tutorial Chapter 6 Web Storage. Storing Data on The Client HTML5 offers two new objects for storing data on the client: localStorage - stores data.
CS2550 Dr. Brian Durney. SOURCES  JavaScript: The Definitive Guide, by David Flanagan  Dive into HTML5, by Mark Pilgrim
Fundamentals of Web DevelopmentRandy Connolly and Ricardo HoarFundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy.
Rich Internet Applications 9. HTML 5 and RIAs. HTML 5 Standard currently under development by W3C Aims to improve the language with support for the latest.
Suma Replace and dramatically improve the entire workflow for collecting and analyzing data about the use of physical spaces.
Reading ROOT files in (almost) any browser.  Use XMLHttpRequest JavaScript class to perform the HTTP HEAD and GET requests  This class is highly browser.
Overview Web Technologies Computing Science Thompson Rivers University.
Let’s look what flash can do: OK, that wasn’t flash! That was HTML5.
TypeScript for Alfresco and CMIS Steve Reiner CTO Integrated Semantics.
丁建文 國立高雄應用科大資管系副教授 兼任計網中心軟體發展組組長 跨平台行動應用軟體開發技術 : HTML5 & Mobile JavaScript Framework 暨南大學.
Using HTML5 to Build Offline Applications Woody Pewitt Icenium
Best Web Technologies for
CAESked Computer Aided Engineering Scheduler. Introduction Team Members: Chris Fruin & Jerry Grochowski What CAESked is: Web based class scheduling application.
Phonegap Bridge – Storage CIS 136 Building Mobile Apps 1.
Data Storage in Android Димитър Н. Димитров. Why talk about data? Why not 3D graphics or network connectivity? Data as fundamental term in computer science.
Development of Internet Applications HTML5 Ing. Jan Janoušek 7.
Platform as a Service (PaaS)
Web Technologies Computing Science Thompson Rivers University
Platform as a Service (PaaS)
CIS 136 Building Mobile Apps
The Application Lifecycle
CIS 136 Building Mobile Apps
Chasing the evolving web
HTML5 and Local Storage.
HTML5 and Local Storage.
CS3220 Web and Internet Programming Cookies and Session Tracking
BOF #1 – Fundamentals of the Web
Web Technologies Computing Science Thompson Rivers University
Blazor A new framework for browser-based .NET apps Ryan Nowak
Presentation transcript:

In-browser storage and me Jason Casden North Carolina State University Libraries Code4Lib 2012

“ What we really want is – a lot of storage space – on the client – that persists beyond a page refresh – and isn’t transmitted to the server” - Mark Pilgrim, Dive Into HTML5

Themes “A lot of space” – Reasonably large amounts of various types of data – Caching binary content Network independence – Performance – Offline use – Security Persistence – Data stability – Local customization – Ability to easily resume a session

Potential library uses

Staff-facing apps – Barcode scan – Stacks tools – Mobile data collection tools Caching (geotagged) collections data Catalog shopping cart

In-browser storage IRL (Suma)

Suma Replace and dramatically improve the entire workflow for collecting and analyzing data about the use of physical spaces and services.

Illustration by Joyce Chapman

What is the data?

Data synchronization

Joyce Chapman, Suma team member.

How many Sumas can I put you down for?

Other attempts Cookies Plugins – Flash – Silverlight – Java – Google Gears – etc. window.name Browser-specific features – IE's userData – Mozilla globalStorage – Filesystem features used by TiddlyWiki

Persistence?

“A lot of storage space” 5MB is the magic number Can sometimes be increased Some differences between browsers

Presentation scope No SessionStorage No in-memory storage No ApplicationCache

Current options

Web Storage aka localStorage, DOM Storage

Main features W3C Candidate Recommendation (split from HTML5) Named key-value store Widespread browser support Simple API

Limitations Performance can be poor – No indexing – Need to fake relational or object store features Values are strings – JSON.stringify/JSON.parse – Base64 encoding for binary data No transactions

Code

Browser support Firefox 3.5+ Chrome 4.0+ Safari 4.0+ Opera IE 8.0+ iOS Safari 3.2+ Firefox mobile Opera Mobile Android Browser 2.1+

Web SQL Database aka WebDB

Main features W3C Working Draft Basically, it's SQLite Very solid mobile support Good performance Indexing Transactions Asynchronous API features

…this is awkward.

Limitations Deprecated No Mozilla or IE support Requires SQL/RDBMS experience

Code

Browser support Chrome 4.0+ Safari 3.1+ Opera iOS Safari 3.2+ Opera Mobile Android Browser 2.1+

Indexed Database API aka IndexedDB, WebSimpleDB

Main features W3C Working Draft Object store (NoSQL) Flexible data schema Transactions Indexed fields Asynchronous API

Limitations Limited browser support Young, changing spec [see: setVersion()] Somewhat complex API

Code

Browser support Firefox 4.0+ Chrome Firefox Mobile 6.0+ IE (forthcoming)

File API: Writer

Main features W3C Working Draft Sandboxed filesystem Great for fairly large data storage Binary data management Asynchronous API

Limitations Very limited browser support No indexing Spec still being sorted out (see: “File API: Directories and System”)

Code

Browser support Chrome (partial support from 8.0)

What to do NOW?

Web (DOM) Storage Pretty much universally supported.

Web SQL DB Do you need to support all browsers?

IndexedDB API The future?

Libraries The solution to the browser problem?

lawnchair

Collection of objects Adapters for: – Web Storage – IndexedDB – Web SQL Database – window.name – Google Gears – IE userData – BlackBerry persistent store – In-memory store

lawnchair

lawnchair persistence.js

Asynchronous JavaScript object-relational mapper Adapters for: – Web SQL Database – Google Gears – In-memory storage with explicit Web Storage commit/read – Server-side support for node.js and MySQL – “Experimental support for QT 4.7 Declarative UI framework (QML)”

persistence.js

lawnchair persistence.js persistJS

lawnchair persistence.js persistJS amplify.store

lawnchair persistence.js persistJS amplify.store localStorageDB

lawnchair persistence.js persistJS amplify.store localStorageDB

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel ActiveJS ActiveRecord

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel ActiveJS ActiveRecord JazzRecord

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel ActiveJS ActiveRecord JazzRecord picnet.data.DataManager

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel ActiveJS ActiveRecord JazzRecord picnet.data.DataManager ShinyCar

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel ActiveJS ActiveRecord JazzRecord picnet.data.DataManager ShinyCar lscache

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel ActiveJS ActiveRecord JazzRecord picnet.data.DataManager ShinyCar lscache Kizzy

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel ActiveJS ActiveRecord JazzRecord picnet.data.DataManager ShinyCar lscache Kizzy Artemia

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel ActiveJS ActiveRecord JazzRecord picnet.data.DataManager ShinyCar lscache Kizzy Artemia microcache.js

lawnchair persistence.js persistJS amplify.store localStorageDB realStorage YUI3 CacheOffline dojox.storage DomSQL Impel ActiveJS ActiveRecord JazzRecord picnet.data.DataManager ShinyCar lscache Kizzy Artemia microcache.js Store.js

Slides: go.ncsu.edu/c4l12casden Suma: github.com/cazzerson/suma