Back from 8 days spent in India for work purposes and it’s that time of the week again:
- Some new vocabulary for me this week, with the term SRP: Single responsibility principle. This is the concept as per which every module or class should have a single responsibility. Throughout the different tutorials, programs and classes I took about iOS development, this concept was usually taken into consideration but none of the teacher or writer explicitly referred to it – and I think that’s unfortunate. This should be one of the very first topic of any programming language class or program.
- Digging into the SRP concept explained above, I found this GitHub repository listing Object Oriented Design principles. In addition to SRP, it explains the following principles:
- the Open Closed principle (extending a class behavior)
- the Liskov Substitution principle (subclasses must interchangeable with their base class)
- the Interface Segregation principle (avoid interfaces that clients do not need to use)
- the Dependency Inversion principle (decoupling modules)
All of these concepts form the SOLID acronym which represents the five basic principles of object-oriented programming an design.
- Method swizzling or the ability to modify methods at runtime in order to inject stubs or mocks objects. Part of my learnings on test-driven development, I came across this blog post from Jon Reid on QualityCoding.org. If the name was somewhat scary at first, the concept is fairly simple and even better news: many frameworks are available to help do the job!
- Swift 3.1 is here and Cosmin Pupaza took the time to write an amazing article about its feature on Raywenderlinch.com. Here is just a quick summary of the language updates as highlighted in the blog post linked previously:
- Failable numeric conversion initializer
- New
Sequence(protocol) functions:prefix(while:)anddrop(while:) - Concrete type constraints (previously only protocols could be constraints)
- Nested generics (and how nested class can inherit T from its outter class)
- Availability by Swift version (although I’m not quite sure about how useful this feature would be)
- Convert non escaping closures to escaping ones
This release also includes updates on the Swift Package Manager, but I have not dug into this topic yet.
- App size can be a pretty important factor in terms of downloads success, as Apple does not allow the download over cellular networks for apps above 100MB (nothing new but I’m catching up). Such download can only be initiated over WiFi, which could therefore results in a loss of potential users. See the example of Peter Reinhardt who saw a 66% drop of installs after the app gain some weight and went over the 100MB limit.

