• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. Firefox OS apps
  5. Reference apps
  6. Face Value

Face Value

In This Article
  1. Web API Usage
  2. Folder Structure
  3. Third-party Libraries

Face Value is a currency conversion app that does things differently: instead of converting arbitrary amounts it shows you the actual denominations in the country you're visiting. It lets you think in your home currency even with a foreign currency in your pocket.

View on the Firefox Marketplace.
Read the full developer walkthrough.

Difficulty: Medium

Code Breakdown:

  • 2% HTML
  • 16% CSS
  • 82% JavaScript
View Source Download

Web API Usage

localStorage
Remembers user preferences and saves exchange rates for offline use.
appcache
Face Value does not require a network connection to run.

Folder Structure

  - test/ (casperjs integration tests)
  - www/ (client-side code/styles)
  - www/index.html (base HTML file)
  - www/js/templates/ (EJS/HTML templates)

The CordovaLib, assets, cordova, face-value.xcodeproj, and face-value folders contain Cordova files used to create a packaged iOS web app that can be submitted to the iOS App Store.

Third-party Libraries

backbone.js
By using backbone's data bindings, Face Value ensures that changes to the backend (such as exchange rate updates) are automatically reflected on the frontend.
zepto.js
The lightweight jQuery-like library simplifies common tasks such as DOM manipulation.

 

 

 

 

Document Tags and Contributors

Tags: 
  • appcache
  • Apps
  • localStorage
 Contributors to this page: chrisdavidmills, cvan, George8211, georgialyle
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:57:09 AM