from Hacker News

Open sourcing our Android and iOS apps

by mecredis on 12/14/16, 5:24 PM with 73 comments

  • by unsoundInput on 12/14/16, 6:19 PM

    Kudos to them. Compared to the web it's rather cumbersome to poke into packaged and released mobile apps, so I really appreciate access to the source of a real world app for learning and comparison.

    The Android codebase looks very modern and well structured. I think it makes great use of many of the goodies (gradle, rxjava, retrofit, dagger, android support lib, ...) and learnings (bring your own MV*; use Fragments when you need them, stick to Activities if you can) that is state of the art in Android development. I think it's a great thing to skim through if you are interested in developing for Android or to compare it to you own app.

    I can only assume that the same is true for I iOS. I'll certainly check it out should I start developing for that platform.

  • by 120bits on 12/14/16, 8:51 PM

    I'm not a mobile app developer by profession. But I always wanted to start learning and developing real world apps. The problem I always ran into the tutorials and demos, that they are mostly limited(i.e not close to solving real world problems). I think browsing their code, will give me a good start. And I would know how it's done right! Thank You!
  • by tthbalazs on 12/14/16, 5:51 PM

    I had a chance to see Brandon from Kickstarter talk about their functional approach at the Functional Swift Conference in Budapest. I highly recommend watching it!

    https://www.youtube.com/watch?v=A0VaIKK2ijM

  • by ohstopitu on 12/14/16, 7:18 PM

    Last year when I was working on a startup's mobile app for Android, it was almost impossible to find good quality code that was open sourced.

    I am really happy that Kickstarter has released their android app as open source - would definitely be a great learning experience!

  • by dblock on 12/14/16, 6:59 PM

    For anyone reading their post, we're so humbled by Kickstarter mentioning the tiny Artsy for having inspired some of this work. If you're interested in the open-source by default conversation and need some ammo to bring this to your team, start at http://code.dblock.org/2015/02/09/becoming-open-source-by-de...
  • by melling on 12/14/16, 7:17 PM

    They use Swift Playgrounds to do a lot of development:

    "Swift Playgrounds for iterative development and styling. Most major screens in the app get a corresponding playground where we can see a wide variety of devices, languages, and data in real time."

    https://github.com/kickstarter/ios-oss/tree/master/Kickstart...

    I've recently bought into this development method too. It's not quite what Bret Victor dreamed up, but it's a big step in the right direction.

  • by ocdtrekkie on 12/14/16, 5:32 PM

    This is pretty awesome. Just because an app connects to a single website/service doesn't mean there isn't a benefit to being open! It's good to be able to trust (and verify) the software running on our devices.
  • by krschultz on 12/14/16, 8:34 PM

    This is very exciting. There simply aren't a lot of open source "full scale" Android apps. Most of what you find are quick sample apps which simply don't show the complexity inherent in most professional apps. The largest other ones I'm aware of are Github, Google I/O, and some of the AOSP apps.
  • by rezashirazian on 12/14/16, 7:28 PM

    The iOS app looks like a treasure trove, I can't wait to download it and dissect it. It'll be interesting to see how they integrated playgrounds into their development cycle.

    I just wish they had upgraded to Swift 3.0

  • by john_gaucho on 12/14/16, 7:57 PM

    This is great. I hope they also provided good documentation / commenting. This can be a fantastic learning tool for programmers at all stages.

    Kudos to kickstarter.

  • by alexashka on 12/15/16, 3:22 AM

    iOS Project does not build - Xcode 8.2... There is a guard statement with no else clause, that's the first error I got. I didn't bother looking further because... a guard without an else could never compile, so what am I looking at?

    I'm getting flashbacks from my last workplace where people merged in code that didn't compile and then went 'oh really? let me fix that real quick'...

    Code wouldn't compile in master but the codebase... everything had to be clever. We can't just have a model, a network request to fetch/update for it, a view controller and view cells. A few storyboards and of course no bloody tests - it's a phone app.

    No, we need protocols everywhere we can fit them, third party libraries - ones that haven't been out a few years (Reactive whatever), a third party library to make a basic GET request (Alamofire looking at you), a CSS styling library, a JSON to Model library, list goes on.

    What we don't need is folder structure that lets you know this is the initial VC, the two folders beneath it are the 2 possible places you can go, the sub-folders in there are the places you can go from that VC and on and on.

    Let's just dump all VCs in one folder, all cells in another. Nevermind that in 90% of the cases, that one cell is only ever used in that one tableview - no need to group those together.

    I don't know - maybe it's just me - I'd rather I download a zip, open the project, click that triangle and it runs - this thing makes me jump through hoops, and it still doesn't work... And nothing makes sense, unless you go learn reactive cocoa - based on the amount of files/code, a clear waste of time.

  • by perfmode on 12/14/16, 8:28 PM

    What's the purpose of Android's ApplicationGraph interface?

    https://github.com/kickstarter/android-oss/blob/888a37468358...

  • by shmerl on 12/14/16, 6:44 PM

    Good! I try to avoid closed applications on my mobile devices if possible.
  • by mwcampbell on 12/14/16, 7:11 PM

    I wonder if they've considered using something like React Native or Xamarin so they can share some of that functional-style code between the two platforms.
  • by afro88 on 12/14/16, 7:10 PM

    This is a really great example of how to do it right when it comes to Swift, MVVM, Reactive Cocoa, Testing, CI etc. Lovely code and architecture!
  • by SimonSelg on 12/14/16, 7:04 PM

    This is awesome! Open source production apps are always useful.
  • by EGreg on 12/15/16, 2:12 AM

    Does this mean we can clone it now or does the license prohibit that?
  • by stirner on 12/14/16, 10:14 PM

    Open sourcing a client is pretty useless when the bulk of the logic happens inside a company's server somewhere.