Git Product home page Git Product logo

kudi's Introduction

Currency Converter App

ALC/GOOGLE/UDACITY Mobile Web Specialist Track Project

Try it out!

Convert your Kudi(Money)

This project consumes the free.currencyconverterapi.com, the main point of the project was to create an application that used modern day developer tools to solve an age-long problem.

Problems

Internet is sometimes slow; you are online and yet offline, which Jake Archibald calls lie-f; What is the point of fetching the same static page from the server over and over again.

Solution

Here comes service workers:

I know you are thinking, what is a service worker ?

A service worker is a background script that your browser runs separate from the web page, that doesn't need the user or web pages' interaction.

Notables

The service worker doesn't access the DOM directly.

It communnicates with the page it's installed on by responding to messages sent via it's postMessage interface and the messages in turn can then result in DOM manipulation if needed.

It's a programmable network proxy, allowing for control over network requests to page.

Service workers allows us to use the CacheAPI and the IndexDB in our browser.

The CacheAPI helps us store static assets, those assets that are usually there to stay, css, non-changing data, and even html.

The IndexDB is used for storing much larger data, requests to API's, like in my case the ratings.

With these tools, I was able to build out the currency-converter to work offline and use data from previous requests, or static data stored in the CacheAPI and IndexDB delivered with the help of the service worker.

Challenges

Setting up service worker in a React application that uses webpack for bundling and babel for transpiling, there was very little info for this use case as most people used create-react-app.

Highlights

Finding Workbox, a tool that I used to serve the service-worker file and bring in all the urls I needed to cache.

By Blessing Edugie Ebowe

2018

kudi's People

Contributors

refinedblessing avatar

Stargazers

 avatar  avatar

Forkers

bless4

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.