Cakewalk

It’s nice to be useful. I was glad to be able to help out my wife and her partner make a new iPhone app called Cakewalk.

I really like the counter-culture situation of it. Technology has become a way to distract the kids or something you can hand them when you are out of other things to do. Krista and Marijane had the idea to use technology to go the other way by giving parents an app that was for them, not the kids. And the goal of the app is to stop using the app and start real playtime with the kids.

Put simply, Cakewalk comes in handy when the kids really want to play with you, but you’re having a hard time coming up with something to do. It is full of quick ideas for simple fun. And every activity is something you can do right now—no research, no prep, and no trips to the store.

So get it now on the App Store here. See below for the tech notes on how it was built.

Cakewalk Idea

Cakewalk Text

Idea Filtering

Tech Notes

I made a Rails server as well as the iPhone client.

The real work in the project has been Marijane and Krista writing the content and taking beautiful pictures, so the first order of business was allow that to be stored in a useful way. Rails is awesome at CRUD applications, so I made an admin panel of sorts where they could enter the content and attach photos. I tried to practice what I preach and made an admin engine using Bootstrap to make it not terrible to look at.

Then, I made an api engine to serve json for the app to use. The main functionality of the app is listing ideas with various filters which was still fairly straightforward from the data they entered.

Then came the hard part (for me at least). I had not developed an iPhone app since right after Apple first released the SDK and much has changed. This was a great opportunity to see what has been going on. It turns out that a lot has been going on.

  • People make and share libraries now and CocoaPods is a good thing.
  • AFNetworking and ViewDeck saved me a ton of time.
  • Core Data worked pretty well for my use case.
  • You can take up the whole screen, but it can get pretty weird.
  • I couldn’t resist doing the parallax stuff.
  • I still didn’t use Interface Builder and preferred laying it out with code.
  • The ARC compiler sure simplified the situation a lot.
  • Blocks syntax really cleans things up.
  • The 2x images for retina display are somewhat annoying but the tooling is much better.
  • Gesture Recognizers may have been there before but I didn’t know about them. That’s much easier.

The whole app is basically a UIPageViewController to infinitely swipe through idea after idea. On each page is a background image with a parallax effect. The content for the idea is in a UIScrollView. I spent way too much time on the interaction between the two components. The background changes and tilts as you scroll up. It’s so fun to do the little UI touches.

On the side of the ideas, you can filter what you want to see. This uses ViewDeck to slide open a controller that has a UITableView of options. Selecting any given option toggles the filters, which affects the list of ideas.

Everything is fairly straightforward. The most interesting parts of this project for me were around performance. For example, my first inclination was to use the APIs to load the list of ideas. Then fetch the idea data when the user swiped to the next one. Where I ended up was completely the opposite. The user rarely interacts directly with the server at all. All of the filtering and loading of the next idea happen locally on the phone immediately using Core Data. The communication with the server happens in a background thread and any different results are injected into the list. This produces a much more fluid user experience.

The other performance issue was figuring out how to run this project at a very low cost even if a million parents decided this was the next big thing. I stumbled upon Cloudflare as one of the main solutions. By structuring the API requests well, I’ve been able to have Cloudflare fully cache the results for a reasonable amount of time. This prevents most requests from even having to hit my server. I did the same thing with web pages like the homepage. If you go to that page, it will stop at Cloudflare. This is very powerful because they can handle a huge amount of users without a problem.

So try out the app. It’s free and has made me a better parent. If there’s anything you want to hear more about, let me know.

Comments

Copyright © 2017 Brian Leonard