Now updated for Swift 5! Swift is more than just a fun language to build iOS applications with. It features a host of powerful tools that, if effectively used, can help you create even better apps with clean, crystal-clear code and awesome features. Swift in Depth is designed to help you unlock these tools and quirks and get developing next-gen apps, web services, and more!
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Technology
It's fun to create your first toy iOS or Mac app in Swift. Writing secure, reliable, professional-grade software is a different animal altogether. The Swift language includes an amazing set of high-powered features, and it supports a wide range of programming styles and techniques. You just have to roll up your sleeves and learn Swift in depth.
About the Book
Swift in Depth guides you concept by concept through the skills you need to build professional software for Apple platforms, such as iOS and Mac; also on the server with Linux. By following the numerous concrete examples, enlightening explanations, and engaging exercises, you'll finally grok powerful techniques like generics, efficient error handling, protocol-oriented programming, and advanced Swift patterns. Author Tjeerd in 't Veen reveals the high-value, difficult-to-discover Swift techniques he's learned through his own hard-won experience.
What's inside
About the Reader
Written for advanced-beginner and intermediate-level Swift programmers.
About the Author
Tjeerd in 't Veen is a senior software engineer and architect in the mobile division of a large international banking firm.
This is a tremendous book. Aimed at developers that already have some experience with Swift, the book’s promise is to help them write better code in their real-world Swift projects. In a handful of words, this means balancing the right techniques and Swift features to craft more robust code (think compile-time safety), code that better expresses intent and is thus more easily maintaned, and why not, code that’s also quite ellegant.
The book is fairly easy to read. Concepts are explored gradually, with a focus on how to reason about the various constructs of Swift. Different approaches to solving a certain problem are presented side by side, with pro’s and con’s presented for all cases.
Theoretical aspects are balanced by an abundance of code examples, more than you’d normally find in a programming book. The author has put a lot of effort into demystifying abstract concepts on the spot into the mundane (but useful) examples you’re likely to encounter in your day to day work as a programmer. There’s little place in this book for highly theoretical constructs, and focus is clearly set on exemplyfing techniques with code samples. Worth noting, these are less like “class Foo” of “func Bar()” geeky examples, and more like snippets you’d see in a real project, such as a Network Layer with monadic error handling, or useful additions you can make to Swift’s built in Sequence/Collection types.
In my case, the list of takeaways after finishing “Swift in Depth” is by no means short: How to reason about generics and protocols with associated types. When to favor compile-time generics, and when usage of run-time protocols will save you some embarrassment. Asynchronous error handling, with a touch of ellegance. Harvesting the power of enums. The benefits of conditional conformance. High-order functions (flatMap, anyone?). And how to nod politely when colleagues mention rigid class hierarchies in the days of protocol oriented design. And when it is socially acceptable to use forced unwrapping of optionals …was that in the mornings, right before going to lunch? Oh, nevermind.
There’s bits as well for those more willing to explore the really shady/difficult constructs of Swift. Think type erasure, and others.
There’s also bits of comical relief here and there … I’ll just note down my favourite, which is when the author feeds the “OMG Shoes!” text to an URL initializer.
This book includes many practical advices that you can use in your daily tasks. It is not depth as much as Advanced Swift book by Objc.io yet it has valuable pieces of in more use case based Swift usage.
As a six year experienced iOS developer, some chapters were the things that I already know and used to use in my professional life but I also found some chapters very interesting like "Modelling Data with enum, Protocol extension, Swift patterns".
I really enjoy the way Tjeerd explain things, and it does explain how he will take you from A to B which prepares you mentally to whats to come. It is a shame that his other book is not here yet in, I guess is because at this points is not technically "finished" but if I also enjoyed his book: mobile system design. Finally I will say that this is not necessarily an advanced book but is not 100% for beginners, by chapter 8 you will have a little hard time following up, for me the last 2 chapters where the really tricky ones, is not about explanation or the quality of the book is that up to a certain level you will need to practice or already have some experience in Swift to really unlock what the books is trying to deliver to you.
The book did meet the expectations. Sometimes while reading it I had the feeling that it was too easy, but some other chapters were quite interesting, no the material itself but way of solving a problem and the kind of issues that it explains. I found it a bit easy in general, but that also makes for a delightful read.
I end up with a bunch of new flash cards to lean and even a couple of ideas for making Katas. I make a note in my reader and may retake them when needed.
It is a perfect read for an intermediate developer to give a gentle push to your knowledge.