Cached App

Romulus10

A few weeks ago, I decided that I wanted to write a web application to target mobile devices in particular. I’ve written very basic web pages, JavaScript functions, and even a few PHP scripts before, but this was going to be the first really large project I attempted for the web. At first, it was going to be a simple local-network app served from a LAMP (PHP) stack. But as I began writing the app I realized that for as much time as the LAMP stack spent powered off, which was far more time than it spent running, the app would be kind of pointless. From that realization, I started to work on caching the application so it would run offline. The cache itself took far longer to work out than it should have (all of the tutorials had a lot of other tasks wrapped up alongside the cache). Once I finally made the necessary adjustments to my .htaccess file and figured out how the cache.manifest thing worked, it was fairly smooth sailing from there. Due to the fact that PHP files are serverside and you can’t actually cache them, I started writing the app itself (Akvanta) entirely in JavaScript. Surprisingly enough, the JavaScript part was not nearly as difficult as arranging everything out (using HTML5/CSS) for multiple screen sizes. Once I had a good portion of the application written in HTML5/CSS/JS I decided to go public. GitHub pages is probably the easiest way to serve web applications that I’ve seen anyone try to use. Because I was avoiding server-side execution, I didn’t even have to refactor the project. Everything that I wrote executes entirely browser-side once it’s loaded. If you’re interested in GitHub’s web hosting features (which is where this page is served from, incidentally), check out GitHub Pages. If you’re a beginning web developer, like myself, I’ll be posting more about the project and what progress I’ve made. If you’re interested in contributing to the Akvanta project in any way, the GitHub repository is located here. Feel free to make pull requests, file issues, and make suggestions on how we might improve the game. It doesn’t have graphics at the moment, and the UI isn’t exactly beautiful, but for a two-week project it’s making progress. Thanks for reading! If you have any questions regarding the process I outlined in this post, feel free to drop a comment.

Written on January 15, 2016