GithubHelp home page GithubHelp logo

maheshbabu / currency.io Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benschwarz/currency.io

3.0 2.0 0.0 1.35 MB

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

Home Page: currency.io

currency.io's Introduction

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

currency.io's People

Contributors

kolber avatar benschwarz avatar lstoll avatar

Stargazers

Mahesh Babu.R avatar  avatar  avatar

Watchers

Mahesh Babu.R avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.