Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Root Causes of Complexity in iOS apps

Avatar for Daniel Martín Daniel Martín
September 15, 2016

Root Causes of Complexity in iOS apps

Software complexity is a real problem that is causing lots of monetary losses in enterprise software systems around the world. As iOS apps are getting bigger, they may start to suffer the effects of complexity (more bugs, ineffective testing...). In this talk we are going to explore how using more restrictive models than object oriented programming can help us manage this complexity, with the trade offs of producing less natural solutions, and an impact on modularity. The main topics will be:

- The importance of understanding our programs
- Kinds of complexity in iOS apps
- Effects of state in our understanding of programs, and in testing
- How Swift help us model a functional core
- Testing our functional core using property based testing
- Redux implementations in iOS

Avatar for Daniel Martín

Daniel Martín

September 15, 2016
Tweet

More Decks by Daniel Martín

Other Decks in Technology

Transcript

  1. WHAT’S COMPLEXITY? ▸ Intrinsic complexity: Caused by the problem domain.

    ▸ Accidental complexity: Caused by our translation of solutions to problems using a particular language. Most complexity in iOS apps is of this kind
  2. THE POWER OF LENSES ▸ Updating algebraic data types can

    be cumbersome. ▸ Functional languages use the concept of lenses.
  3. HOW DO WE TEST THIS? ▸ Property based testing library

    (https://github.com/typelift/ SwiftCheck), inspired by Haskell’s QuickCheck and Scala’s ScalaCheck.
  4. WANT MORE PROPERTY BASED TESTING FOR IOS? ▸ Do this

    Kata by the people from Karumi: https:// github.com/Karumi/MaxibonKataIOS
  5. CONCLUSIONS ▸ You cannot extend a program you don’t understand.

    ▸ Mix of ortogonal concepts like inheritance and polymorphism are being solved by modern languages like Swift. ▸ Libraries like ReSwift help with complexity caused by state and encourages separation between side effects and pureness. Still a work in progress. ▸ Use the most restrictive programming model for the problem, in which the solution is natural (ie. not fighting against the framework).