Logo dotSwift Open Nav
Swiftlang logo

Swift Training

Getting the Most from Swift Types


[FR] Si votre entreprise est domiciliée en France, vous pouvez vous enregistrer ici via la formation professionnelle.


We have partnered with Oxiane to provide this intermediate training on Tuesday January 30, delivered by our MC Daniel Steinberg.

Teacher:

Daniel Steinberg

Daniel Steinberg

Author, co-host of the Tiny Challenges podcast

Content:

In this fast-moving one day workshop we’ll work at getting the most form combining paradigms from Functional Programming, Protocol Oriented Programming, and Object-Oriented Programming.


Our focus will be on types and communication.


In the first half we create a family of types for Currency and use Phantom Types, Nested Types, Protocols, Protocol Extensions, and Generics to ensure they work properly with each other. We also introduce elements that allow you to write literate code that is easy to read and use safely. We end this section with custom operators you will adopt and use in your everyday Swift development.


In the second half we focus on how Swift changes the way you architect your apps. We move from MVC to MVVM in two settings and see how working with value types changes some of your standard practices. In the first example, we partition behavior into discrete parts and limit their knowledge and dependencies. We focus on reducing the surface area of the API we work with. In the second part we build a generic model and use it in a simple Table View application where the data source is not the Table view controller.

Student requirements:

It is assumed that you are an experienced programmer who has spent time with Swift. You will need a Mac running the latest version of Xcode 9.

Map, Filter, Reduce and Flat Map


[FR] Si votre entreprise est domiciliée en France, vous pouvez vous enregistrer ici via la formation professionnelle.


We have partnered with Oxiane to provide this hardcore training on Wednesday January 31, delivered by our MC Daniel Steinberg.

Teacher:

Daniel Steinberg

Daniel Steinberg

Author, co-host of the Tiny Challenges podcast

Content:

This workshop will take you from a casual developer who uses map() now and then in your code to someone who can create and use Functors and Monads at will.


In the first half of the workshop we start with higher order functions and look at use the map, filter, reduce, and flatmap that are part of the Swift Standard Library.


In the second half we look at the shape of map and flat map and write our own versions to reduce the code needed to work with types that we create. We will end the day by creating a State type that we can use to obtain a result and the transformed State. You’ll find that this technique applies to much of the code you write and it makes your code more testable.

Student requirements:

This course assumes you are an experienced programmer who is confident with Swift. You will need a Mac running the latest version of Xcode 9.