An “App Architecture” Kata

At the last Side Project Saturday CocoaHeads event I ran a special little exercise. Here was how I described it.

I’d like to run a little event, (maybe after lunch?) for anyone who wants to participate. Should take like 45-60m.

You will be presented with a mobile app idea. It’ll be fairly basic and we’ll list all of the behaviors we need and some we’d like in the future. You will then pair up with someone and pencil out how this could be architected. Each group will then present their app architecture and answer questions, accept feedback from the rest of the group.

From Wikipedia: A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition. The term was probably first coined by Dave Thomas, co-author of the book The Pragmatic Programmer, in a bow to the Japanese concept of kata in the martial arts.

App architecture is one of those things I’m always trying to improve so I thought it would be cool to see how other people would solve similar problems.

We had six people participate. We started with a brief explanation of the app we were going to sketch out an architecture for. Then, we broke up into pairs of two. After about 40 minutes we came back and showed the group what we came up with.

Kata App Wireframe

The one group ended up documenting behaviors per screen. They did a great job of documenting the little things that developers might look over as assumed behavior (which add up fast). It was pointed out that it’s also a great idea to document the things you will not be doing since there tends to be lots of great ideas during brainstorms but when you are planning a sprint of a version target you need to be clear about what’s in and what’s out.

The other two groups (including my own) were more visual, using tools like OmniGraffle to draw representation of models, controllers and services. There was some common separation of responsibilities with slight differences: the one group making an “APIStore” that combined the state and networking and another (mine) that favored separate “Network” and “Session” managers.

Some of the more high-end abstractions I introduced included a FormController that could take a Form model (that had say a collection of FormFields) which described the form at a model level and then through a FormController might be able to render the form on screen through a TableView for a generic representation or maybe through specific outlets to a custom layout. It could also handle things like input validation. True, this is overkill for our one simple login form but assuming this app might grow to contain edit person forms at some point it might not be too bad of an idea (and plus the whole purpose of this event is to discuss interesting ideas).

I also took the time to introduce a pattern thats been out for a while but is a recent addition to my personal toolkit, that being ViewModel. You can read more about MVVM on objc.io. In short it’s a great way to centralize the code you use to transform model objects for user interface purposes and keep that logic out of the model.

In conclusion, everyone who participated seemed to enjoy the exercise and I would encourage you to replicate it amongst your own peers. It’s still up for debate if “Side Project Saturday” is the best venue for such things as many who come have their own stuff to work.

CocoaConf Boston 2014 Recap

After getting a solid recommendation from Curtis, who attended the Washington DC variant, this weekend I headed north to CocoaConf Boston. It was my first CocoaConf and so I went into the weekend with a lot of blurred expectations.

Spoilers: I say first with intention. TLDR; I had a really great time. The talks and speaker quality were really high and with luck I’ll be able to attend again during a future “tour”.

One of my expectations was size. I thought the attendee count was going to be a bit larger. It felt like ~130 but I’m not sure what the official number was. Not that a small count is bad for me but I’m used to educational events hosting more. I suspect part of this is that CocoaConf is hosting lots more venues now (three arguably “east coast cities” during this fall tour alone). This may make some events smaller but overall a win for the community so as to have more access for those who can’t travel far.

One thing that continues to make me proud is the people of our community. The attendees, the speakers and the event staff of CocoaConf are all incredibly friendly, approachable and inspiring. Meeting new people and catching up with old friends is a big reason why I like attending conferences and CocoaConf does a great job at supplying the “campfire” atmosphere to make that happen.

Daniel Jalkut's "Quit Your Job" keynote

As for my favorite talks I’ll mention a few:

Daniel Jalkut’s “Quit Your Job” keynote and Rob Rhyne’s “Make Them Care” session were both very inspirational. I leave Boston really hungry to jump into some side projects of mine and get back into the product game outside of my client stuff at work.

For technical wisdom I have to give it up for the full day “Swift Kickstart” workshop Daniel Steinberg ran as well as the Swift and Objective-C: Best Friends Forever session by Jonathan Blocksom. CocoaConf Boston is now cemented as the place and time where I really started to appreciate what Apple is trying to accomplish with Swift. This isn’t to say we aren’t in for a bumpy ride but at least now I have a good frame of mind as to the “why” behind it all.

Finally, it was great to meet the people that run CocoaConf. Rather than some large corporation, CocoaConf is actually a family affair. Dave Kline and his family run most of the operation and they seemed very dedicated to making sure everyone had a good time. For all their hard work I say thank you and hope to see you all again soon.

Designing & Planning Your iOS App Workshop Recap

Workshops are a new effort from the Philly CocoaHeads group. Basic idea is: one workshop every other month, the workshop is a one day 5-6 hour event, that covers a single topic. Our first one was on Intermediate Objective-C and our second one, which was held last Saturday, covered Designing & Planning Your iOS App.

Kotaro Teaching

Overall the workshop went well. Kotaro Fujita was our main presenter and did a great job of alternating lecture and hands on exercise. At the end, attendees presented what they had worked on and how their app ideas were evolving. The crowd was great with lots of great feedback too. Some of my notes:

  • When brainstorming features consider using index cards or mind mapping software. I like MindNode Pro and Trello.

  • Spend LOTS of time wire framing, sketching, etc. Be mindful to separate your design time from your production coding time. It’s easy to fall into trap where you are coding things that will not work and this is very expensive. Way better to validate your designs with prototyping first.

  • Document what problem each screen is suppose to solve. Also document the emotions you expect the user to have. For example, on first launch what is your user asking themselves, how can you help educate them? Are you using verbiage they understand? How fast can you deliver your first WOW moment?

  • Get users involved as soon as possible. Preferably before you start to code. Should have some level of idea validation before starting.

  • Once you release a build, make customer support your highest priority. Answer every email/tweet within the hour. Let them call you. Doing this is a huge part of getting people to trust you and then later recommending you and your product.

Related Resources

In the spirit of the talk I wanted to share some other related resources.

So there are two great online courses going on right now regarding starting a startup people might be interested in:

Some of it is a little heavy on the VC-funding but otherwise lots of great things to think about.

Another video I find really helpful to watch and re-watch whenever thinking about which projects I want to work on: How great leaders inspire action by Simon Sinek. His explanation of “Why/How/What” is very inspiring for me.

For some design fundamentals consider reading Design for non Designers by Robin Williams and Don’t Make Me Think by Steve Krug

Finally I’ll mention the the Lean Startup Book which I reviewed back in 2013. It still is a favorite book of mine with some awesome ideas on working fast and based on validations and learning.