I’ve been going down a path of building software that people don’t use lately. To be honest I’ve been doing that a few more time than feels good to admit. I know that not everything I build will be used by a lot of people, heck most things I build aren’t even used by me, but enough is enough.
I feel it’s time to try and only work on things that I’m getting paid for, or people will actually use.
To that end I whipped out the DVD Pila! code and fixed some bugs and added a web socket to listen for and send events for video playback.
My first experience with web sockets was building a realtime Note taking app for a local hackathon. It was very cool using Socket.io to update a note using a web interface, Android app, and an iOS app at the same time.
My thought is to build a DVD Pila! Remote app at some point, but the first step is to integrate a web socket server into the existing Rails app.
Bringing Down the Habits
Probably won’t need to pull Habits every time, cause you might want to have certain habits only on certain devices. That can always change, but it makes things simpler starting out.
For whatever reason, ok there’s a good reason and it’s because I wasn’t careful in sending data to the server, the habit data on the server I was working with was overwritten. The feature I’m working on is to populate the Habits if the Settings for URL and Username are set and there aren’t any configured. We’ll get to that in a minute though.
In the meantime whipping up some Node + Express + Jade templates was surprisingly very fun…
Serving Up Some Habits
Since we’ve baked in the ability for the Habit App to send Habit data to a web server via HTTP POST, it only stands to reason that the next step is to develop some type of server to get the habits.
Since I’ve been learning a lot about Node.js and React Native is sort of based on Node, well it uses npm anyway, I said to myself “self, why not whip up a Node server to save the Habit data?”.
Are You Sure?
The main features of the Habit app are all in place. There are a couple of things that aren’t sitting well with me though.
One deleting a habit, reminder, etc happens instantly with no way to back out. Not so good if you accidentally touch your phone in the wrong place with the app open. To fix this we’ll set things up to use a confirmation popup before destroying any user data.