Skip to content

Latest commit

 

History

History
84 lines (65 loc) · 2.31 KB

README.md

File metadata and controls

84 lines (65 loc) · 2.31 KB

Swift Beginner Workshop –– try!Swift Bangalore 2017

Objective

The workshop is designed for software developers with prior experience in languages such as Java, Objective-C, and Javascript. The outcome of this workshop is to help the participants familiarize with the unique features and syntax of the Swift Programming Langauge by learning its rather unique approaches to solve design problems such as protocol-oriented, value-oriented, and functional programming. The participants are expected to be ready for the main event on Nov 17th. To make the workshop interactive and engaging, throughout the session, each topic contains a real-life applicable quiz/problem which the participants solve on their own. Shortly after, we will go through the problem together. It will be conducted by Bob & me. The following topics just reflect my half of the entire workshop. You can find the other half i.e. Bob's topics here.

Topics

1. Optional

- what is an Optional
- different ways to represent an Optional (?)
- Optional is an Enum
- different ways to unwrap an Optional
- what is Optional-Chaining
- what is NilCoalescing operator (??)
- implicitly unwrapped optional
- map/flatmap (out of scope)

2. Tuple

- what is a Tuple
- how is it different from a struct/class

3. Type Casting

- what is Type Casting
- use of `as`
- what is down/up-casting
- it work with relationships -> class & protocol
- difference between `as!` & `as?`
- use of `is`

4. Genrics

- what is Generics
- advantages of Generics
- Optional, Array, Dictionary are based on Generics
- what is `Any`
- how we can improve from `Any` -> `T`
- constrained generic parameters

5. Protocol - I

- what is a Protocol
- different ways of conformance
- adding properties -> `get` & `get-set`
- adding functions
- POP -> advantages over OOP

6. Protocol - II

- generics in Protocol
- Self
- Self v/s self
- associatedtype
- generic constraints
- where clause

7. Enum + Protocol + Generics

- Optional type in Swift
- Result<Value>

8. Error Handling

- swift `Error` protocol
- try!? catch