RWDevCon 2016 – Summary

On March 10 and 11 of 2016, I attended http://rwdevcon.com conference at Alexandria Virginia. This is a tutorial conference where the speakers give us starter projects and do live coding while explaining the concepts.

Below is the list of the sessions I attended and the summary of my learnings

  • Design Patterns in Swift
    1. Prefer composition over inheritance. Use other objects instead of inheriting behavior.
    2. Limit how much classes know about their dependencies. Prefer polymorphism over concrete classes
    3. Structural patterns: define how objects are composed. Eg: MVVM, MVC, FAcade
    4. Behavioral patterns:  define how objects communicate with each other : Eg: Strategy, Delegation
    5. Creational patterns: instantiate or creates objects for you
    6. When deciding to use Singleton, try for other alternatives. Make sure you are not using a singleton to pass state around.
    7. https://github.com/ochococo/Design-Patterns-In-Swift – great resource for design patterns examples in Swift
  • Advanced Debugging
    1. Cmd + K to empty the debug console
    2. Command to list all view controllers in the project that have viewDidLoad   ( image lookup –rn viewDidLoad <projectname>)
    3. In order to set breakpoints only on the  Objc version of a method syntax of breakpoints. To set breakpoint on setTitle of UIViewController b –[UIViewController setTitle:]
    4. How to attach debugger to any app and play around with the code and assembly registers
    5. https://github.com/facebook/chisel – lldb extensions used by facebook to debug iOS apps ( I am yet to look around)
    6. I will need to rewatch the video for this advanced session as I feel I havent completely grasped  a lot of the goodness presented.
  • Custom Controls
    1. If we want to create a custom controls that can be reused across app, “Add a New file” and select iOS\Source\CocoaTouch class ‘
    2. Override the init (frame: ) and init(coder aDecoder: NSCoder) to call super and prepareView() method ( where the necessary views are initialized, added to super view and constraints are defined)
    3. In iOS 9, we have NSAutoLayourAnchor. framework class introduced, that makes creating constraints a lot simpler in code
    4. Will present the changes necessary to ensure this custom view class to be used in the Interface Builder
    5. Sam Davies taught some very fancy animations that ability to manipulate them from outside custom control.
    6. 3 part Core Graphics tutorial resource for follow up: https://www.raywenderlich.com/90690/modern-core-graphics-with-swift-part-1
  • App Architecture
    1. How to create an Asynchronous NSOperation
    2. Use Dependency injection (with Swinject in the tutorial) to be able to easily swap underlying functionalities
    3. Recommended to use a “FlowController”  instead of Segues which makes changing the flow of the app simple to change in future.
    4. WWDC 2015 session 226: Advanced NSOperations
  • MVVM in practice
    1. MVVM is considered as an alternative design pattern to counter MVC ( Massive View Controller) . Here we separate out the model ( that converts data into UX – consumable  format into separate class)
    2. Explained how to create listener between model and the view controller using a generic object Box<T> ( Boxing concept where an object and its listeners are maintained in a single class and any changes in object are reported out to the listeners)
  • Xcode UI testing
    1. We can add a “iOS UI Testing Bundle” from “Add New File” Xcode menu that will create XCUI Test templates
    2. We can use XCUITesting recording behavior in order to record the actions we peform on the app
    3. We need to use XCTAssert*() methods when validating your test conditions
    4. In the app, we have “accessibility identifiers” and “accessibility labels” that we can set for every UI element. The labels are used when we turn on narrator. But the accessibility identifiers are used for the sole purpose of automation and hence set it to any value
    5. It is recommended to centralize the AccessibilityIdentifiers into a single enum
    6. WWDC 2015 Session 406
  • Core Data and Online service synchronization ( I unfortunately had to leave in between to catch an early flight – my poor decision – so I am looking forward to the video)
    1. This talk dealt with how to synchronize local data with internet backend
    2. Here instead of View controllers maintain both the local and remote service information, the recommendation is to have the local service wrap the remote service calls (similar to Opal’s personalization manager ) .
    3. The recommendation to synchronization is to get all local changes and send them to the server. Have the server return back the entire current state. The local layer then does a diff of server’s response with its current state and then decide if local data wins or server data wins
    4. It is explicitly recommended not to use a timestamp as a synchronization point between server and local, but instead use a pre-determined version number that the server will send back when sending the data
    5. Need to be careful to test the different scenarios:
      1. Conflicts
      2. Missing entities ( local or remote)
      3. Connection failure
  • Other sessions that I very much looking forward to watch the videos are:
    • Protocol Oriented Programming.
    • Advanced Autolayout
    • Beginning UIStackView
    • Beginning App Search

It has been  a very well organized, well thought out conference and speeches where we could see the speakers were experts in thier areas and very well prepared. I really enjoyed the conference and will definitely be attending the next one.

PS: If interested this is a conference post-mortem post by the main organizer https://www.raywenderlich.com/128351/rwdevcon-2016-post-mortem

I have blogged about my personal experience here http://swiftgazelle.com/2016/03/rwdevcon-2016-my-thoughts/

Screen Shot 2016-03-16 at 4.42.29 PM

RWDevCon 2016 – Summary

One thought on “RWDevCon 2016 – Summary

Leave a Reply

Your email address will not be published. Required fields are marked *