Portrait

An update on Standards

It’s been slow going but Standards has been getting an overhaul over the past few weeks:

  • Pages involving user data go over SSL, so not only your password but tasks and stats are more secure. You’ll need to log out and back in again for it to take effect.
  • Everything should be a little more responsive in the app because there are less page refreshes. All of your information is just there.
  • It’s possible to navigate into the past to view your checks by clicking, tapping, swiping or even using the arrow keys on your keyboard. This is really handy on mobile devices where you can only see today and yesterday, so if you forgot to check something further back you can now.
I’m looking forward to adding some more features to Standards now that it’s been updated, if you haven’t checked it out yet you should sign up and let me know what you think!

And for those who are interested, the nitty-gritty:

  • HTTPS isn’t enforced but links will default to it. It’s one of the free benefits of sticking with the Heroku domain for now.
  • I’ve separated the public (unauthed) and private (authed) sides of the app. The public side still has Sinatra rendering and serving up each page and the private side has Sinatra serve up a single client-side ‘app’ page. I’d like full app/API separation but this makes it easier to manage authentication and also has the benefit of a static index page for search engines.
  • The app is running on Backbone.js with Marionette. Sinatra bootstraps the user’s data into the page when a refresh happens, but otherwise I’ve setup a second Sinatra app to give/take JSON at some API endpoints.
  • Touch events get handled with Hammer.js, a great cross-platform solution.
  • Client-side templates are Jade, these get managed and compiled into the single JS file using require-jade.
  • Everything client-side is written in CoffeeScript. (I will never write something non-trivial directly in JS again.) I’m using Require.js to manage dependencies, and I have r.js compiling everything to one file (with a Sublime Text build package) before pushing to Heroku. I’m using CodeKit to actually compile the CS (and LESS styles) though, so this process is convoluted and involves committing compiled code. I’ll be exploring a few options to solve this, like tying in r.js and less.js with the assets:precompile rake task that Heroku runs when building an app.

If you’re interested in the source, it’s up on GitHub.

  1. brandonevans posted this