• This repository has been archived on 14/Mar/2023
  • Stars
    star
    296
  • Rank 139,521 (Top 3 %)
  • Language
    JavaScript
  • Created about 14 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An offline-capable, html5 currency converter app for the iPhone

currency.io

An offline-capable, html5 currency converter app for the iPhone.
Visit http://currency.io on your iOS/Android phone to try it out.

Our goal was:

To build a useful, cohesive application for your phone using web standards.

Javascript libraries

We decided against including a library like Zepto or jQuery, so everything is built with raw javascript. With the main browser targets being Android and iOS browsers, we can use querySelectorAll and addEventListener which covers the basic features we'd usually rely on a library for. Plus it cuts down on filesize, which matters when dealing with mobile.

Images

Targeting only modern (mobile) browsers means solid base64 support. The majority of images have been base64 encoded and inlined to cut down on requests (see /public/stylesheets/images.css & /public/stylesheets/images-x2.css). We used media queries to target older devices with images.css and iPhone 4 (retina display) with images-x2.css — this saved older devices from downloading high(er) resolution images needlessly.

The app

The app is running on Sinatra. It doesn't do anything fancy, it's just there to query, parse and cache current currency rates from Yahoo. Currencies are pulled over HTTP from Yahoo's Finance services using YQL.

Other notes

We're using an image to do the drop shadows rather than box-shadow, which turns out to be horrible for performance.

The whole layout has been designed using ems, which means everything can be scaled up 150% for testing in Chrome or Safari (with a user-agent string set to 'iPhone'). Much less hassle than testing directly in the iOS Simulator.

Developing for modern browsers is so much less hassle.

  • No need for graceful degradation
  • querySelector & querySelectorAll
  • Native JSON parsing (in iOS 3.2+)
  • ApplicationCache & localStorage
  • A consistent XMLHttpRequest implementation
  • Reliable CSS3 support — including transitions & animations

More Repositories

1

gallery-css

CSS only Gallery
CSS
1,138
star
2

metaquery

A declarative responsive web design syntax. Breakpoints, defined in `<meta>`
JavaScript
324
star
3

passenger-stack

Sprinkles for Apache, Passenger, Memcached, Git, Mysql or Postgres
Ruby
315
star
4

bonsai

A tiny static web site generator
Ruby
296
star
5

sublime-bower

Install Bower packages from within Sublime
Python
228
star
6

developers.whatwg.org

Used to create the contents of developers.whatwg.org
198
star
7

amnesia

A Sinatra rack middleware that presents memcached server stats
Ruby
177
star
8

am-grid

Experiemental attribute module grid system
CSS
81
star
9

cache.js

localStorage with timed expiry
JavaScript
55
star
10

smoke

It isn't ready yet
Ruby
47
star
11

bonsai-site

The Bonsai web site source
JavaScript
29
star
12

open-uri-memcached

Ruby's OpenURI with Memcached for caching
Ruby
24
star
13

bom-weather

Weather from the Australian Bureau of Meteorology
Ruby
24
star
14

w3c-spec-styles

An alternate stylesheet for W3C specification pages
JavaScript
23
star
15

heroku-electron-buildpack

Shell
20
star
16

postie

A Sinatra based Rack middleware that provides Australian postcode information via JSON
Ruby
18
star
17

responsive-sass

The source files to a screencast
Ruby
12
star
18

choones

A jQuery plugin to provide monologue style messaging. Inspired by Growl's music video theme.
JavaScript
11
star
19

registry

For dirt simple plugin architecture
Ruby
11
star
20

bower-badges

Show that your project is available in Bower by using a bower badge!
JavaScript
11
star
21

skeet

a heroku ready screen shot application
Ruby
11
star
22

leonardo

A simple ass, half done sparkline graph using Raphael
JavaScript
9
star
23

yahoo-stock

A Yahoo! stocks scraper
Ruby
9
star
24

muxtape-rb

A ruby based gem to download muxtapes
Ruby
9
star
25

grid

A tiny grid system.
Ruby
9
star
26

gifcity

JavaScript
9
star
27

munch

A simple sinatra app to test yahoo pipes to pull down recipes from many web sites
Ruby
9
star
28

transcoder

Transcode from common web based formats into plain old Ruby
Ruby
9
star
29

chrome-request-interception

JavaScript
9
star
30

html5forAuthors

HTML5 (Edition for Web Authors)
JavaScript
8
star
31

rack-smoke

Expose Smoke sources and transcode them into JSON, XML or YAML
Ruby
7
star
32

flickr-rest

A light interface to call flickr 'restful' api methods
Ruby
7
star
33

HTML5.tmbundle

Ruby
7
star
34

flickr-wrapper

A dead project. Here for nostalgia and reference
Ruby
6
star
35

homebrew-sassc

Ruby
6
star
36

Hillegass-Macruby

Cocoa Programming for Mac OS X examples rewritten for MacRuby
Ruby
5
star
37

watch

A simple directory watcher
Ruby
4
star
38

ae

A rack middleware to allow for accessibility on any page.
4
star
39

gitnotify

Enables a post-commit hook to your repositories that sends growl notifications around your local network
Ruby
4
star
40

benschwarz-site-v2

My *new* web site
Ruby
3
star
41

railscamp-13

JavaScript
3
star
42

attr-chain

attr_chain for chainable, single method attribute (get|setters)
Ruby
2
star
43

openuri_recorder

Its like a VCR for the web that you can take on the plane with you
Ruby
2
star
44

benschwarz

2
star
45

smoke-manual

A book about smoke, the ruby dsl
Ruby
2
star
46

html5-workshop-site

The web site from which I'll release details about my HTML5 workshop
JavaScript
1
star
47

dotjs

My ~/.js extensions
JavaScript
1
star