Skip to content

Prototype offline web application with Sinatra and Sammy.js

Notifications You must be signed in to change notification settings

baconpat/html5_offline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML5 Offline Prototoype

This is a simple prototype written to learn about some of the technologies used to build an HTML5 offline web application. It uses:

  • Sinatra
  • Sammy
  • HTML5 Storage (localStorage)
  • HTML5 Cache Manifest
  • Google Gears for IE8

The app itself is a little Shopping List. The point was not to build something useful, but rather to experiment with these technologies.

I wrote about some of the things learned while writing this in a blog post.

Usage

If you want to run the application to see it in action you need to have Bundler installed. Then you can bundle install or rake gems which does the same thing. Once the gems are installed rake run will start the app on port 4567.

Load http://localhost:4567 in your browser (most recent version of any browser should work). Once the browser has cached all of the files (very quick on localhost) you can kill the web server and refresh the page and the application should still function.

Organization

app.rb

Sinatra web application. Defines a couple of routes and creates a JSON text file to be used as a database.

js/app.js

Javascript file includes client side templates written in Jaml (a javascript haml-link DSL), and Sammy application to handle the "single page" client side interactions.

About

Prototype offline web application with Sinatra and Sammy.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published