
This video will give you an overview about the course.
Work through some examples of extending types with extensions. Discover the power of retroactive modeling.
Learn what can and can't be done with extensions
Work through an example of extending a library type
Wrap up the example with some of its uses and how you might use them in your own code
How can we achieve multiple inheritance with Swift and why will it be good for your own code?
Learn what makes a Mixin and constraints you should apply
Define some Mixins in the context of a view
Apply your new classes with a visual example
Here are a few ways in which you can make your code more readable and easier for others to parse.
Break down a typical ViewController
Work through a neat quirk of extensions and structures
Discuss on how these principles help your projects
Find out more about how you can represent your errors.
Look beyond Enums at other types than can provide more context
See how to handle asynchronous code and returning errors
See what you can do with this new way of showing errors
Learn how to capture errors before the user sees them. Also, when and how to handle them in your code.
Create a simple class that throws errors
Handle the errors provided by our new class
Discuss about when to use each case and why
Write a class and a set of tests using TDD. Learn about different tests and when to use them.
Create a test and then update a new class to make them pass
Walk through different types of tests and how to use them
Discuss why unit tests are important and the best practices and insights
How do you make you code in a way that enables you to easily write tests? Learn about dependency injection in this video.
Update the previous videos class to use a database. How do we make it testable?
Create a database protocol and learn about Mocking
Walk through what we have done and how it will help your own code in the future
Walk through a generic function with type constraints and learn when and why they are needed.
Begin with the basics of generics to get started
Extend our example with type constraints and learn why they are needed
Walk through the code and results to see how it has helped us write a better code
What are the associated types and when should you use them? Learn by example in this video.
Create a generic protocol and implement it with classes
Learn how the associated type is used within the example
Look at the results of the example and see how we achieved the output we expected
Walk through a generic implementation of a trading solution. Implement what you have learned in the previous videos and apply the where clause.
Create a generic class to represent Money. Using where clause, we add a sum function
Create a company with a trade function to use the money class to buy goods
Understand why this generic style of programming has allowed us to make an extensible example and how the where clause helped
Combine all the previous work together to create a generic networking solution that can be implemented in your own projects.
Implement with example a request class that handles all the endpoints and the content to be sent
Create a session class to be able to send your new request over the internet
Implement a concrete example and learn why this is a good way to implement your code
Run through all the bitwise operators to get a good understanding of how they can be used in your projects.
Look at Invert, And Or operators, and how you use them in examples
Explore bit shifting with examples and outputs explained
Go through a practical example of how to use bitwise operators
Create your own operators and learn how to use them yourself.
Learn about operator precedence, and how to make a simple custom operator
Learn how to locate your operator in the precedence of other operators
Extend and Apple type with your own custom operator to enhance your code
Learn how to create and use Option sets within your code, and why they would be useful.
Take the help of example to create your own option set, learn how to group and interact with them too
Apply operations and reason with the option sets we created earlier
Walk through an example of how to print out your sets using print
In this video, we learn how to use the in-out parameter and apply it within an example.
Learn about an in-out parameter and when to use it
Follow along and implement an example using in-out
Review how in-out works and see the results of the example code
In this video, we learn about closures and how to use them, as well as handling a common error.
Step through with a collection of closures defining various parameters
Walk through a more complicated use of closures and reason with the results
Learn about the real-world pitfalls with closures and retain cycles
In this video, we learn about variadic parameters and how they fit into your code.
See some common uses for the variadic parameter, used by Apple
Create our own function using variadic parameters
Inspect the results and learn how to apply this to your own code
Create a new Generic Dictionary type that gives you access to its values using subscripts.
Learn what a subscript is, and when to use it
Create a generic dictionary type that utilizes subscripts
Compare our new dictionary with Apples version and review the results
Walk through GCD with sync and async calls, learn when to use them and why.
Look at sync and async examples and reason about the results
Explore concurrent execution of your code on threads
Recap on what has been achieved in the video and how it applies to your code.
Learn about the global queues and their different priority levels.
Look into each of the QoS meanings
Explore some interesting functions on the global queues
Look at the Dispatch Group and how you can use it to improve your code
What is a Semaphore and lock? Learn what they are and how to use them.
Walk through a semaphore example using Apples Dispatch Semaphore
Create a thread safe array using a lock
Walk through our findings and what the benefits are to our own code
Refactor a standard ViewController to use a modern MVC pattern.
Walk through each aspect of MVC and see why it’s there, and how you can achieve it within your own work
Apply the techniques from past videos to make the code more workable
Go through what we have achieved in this refactor, and why it’s a good way to go when designing your own code
Refactor a standard ViewController to use a modern MVVM pattern.
Look into a fully implemented MVVM architecture and learn how to bind between classes
Compare this architecture to MVC, what are the similarities and benefits
Discuss on how you could take the approach further
Refactor a standard ViewController to use a modern VIPER pattern.
Understand block diagram of the VIPER
Look at the demo on the VIPER
Swift is a secure, fast, and interactive programming language. It combines powerful type inference and pattern matching with a modern, lightweight syntax, allowing complex ideas to be expressed in a clear and concise manner. You can start using the new Swift compiler and migrate at your own pace, taking advantage of its new features
This course will provide you with an in-depth knowledge of some of the most sophisticated elements of Swift development, including protocol extensions, error-handling, design patterns, and concurrency, and guide you on how to use and apply them in your own projects. You'll see how even the most challenging design patterns and programming techniques can be used to write cleaner code and build more performant iOS and OS X applications.
By the end of this course, you'll have got the hang of effective design patterns and techniques, which means you'll soon be writing better iOS and OS X applications with a new level of composure and control.
About the Author
Jonathan Wilson is a full-time iOS software developer based in Belfast, Northern Ireland. He acquired his love of code in university, where he also competed in international programming competitions. After leaving with a First Class Masters in CS, he worked in Fortune 500 companies and startups.
He currently works for a New York company with an application that has a large codebase using modern design patterns. In his spare time, he makes his own apps to explore new techniques and programming styles.