Swift 3 Object-Oriented Programming - Second Edition
eBook - ePub

Swift 3 Object-Oriented Programming - Second Edition

Gaston C. Hillar

Share book
  1. 370 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Swift 3 Object-Oriented Programming - Second Edition

Gaston C. Hillar

Book details
Book preview
Table of contents
Citations

About This Book

Implement object-oriented programming paradigms with Swift 3.0 and mix them with modern functional programming techniques to build powerful real-world applicationsAbout This Book• Leverage the most efficient object-oriented design patterns in your Swift applications• Write robust, safer, and better code using the blueprints that generate objects• Build a platform with object-oriented code using real-world elements and represent them in your appsWho This Book Is ForThis book is for iOS and macOS developers who want to get a detailed practical understanding of object-oriented programming with the latest version of Swift: 3.0.What You Will Learn• Write high-quality and easy-to-maintain reusable object-oriented code to build applications for iOS, macOS, and Linux• Work with encapsulation, abstraction, and polymorphism using Swift 3.0• Work with classes, instances, properties, and methods in Swift 3.0• Take advantage of inheritance, specialization, and the possibility to overload or override members• Implement encapsulation, abstraction, and polymorphism• Explore functional programming techniques mixed with object-oriented code in Swift 3.0• Understand the differences between Swift 3.0, previous Swift versions, and Objective-C codeIn DetailSwift has quickly become one of the most-liked languages and developers' de-facto choice when building applications that target iOS and macOS. In the new version, the Swift team wants to take its adoption to the next level by making it available for new platforms and audiences.This book introduces the object-oriented paradigm and its implementation in the Swift 3 programming language to help you understand how real-world objects can become part of fundamental reusable elements in the code. This book is developed with XCode 8.x and covers all the enhancements included in Swift 3.0. In addition, we teach you to run most of the examples with the Swift REPL available on macOS and Linux, and with a Web-based Swift sandbox developed by IBM capable of running on any web browser, including Windows and mobile devices.You will organize data in blueprints that generate instances. You'll work with examples so you understand how to encapsulate and hide data by working with properties and access control. Then, you'll get to grips with complex scenarios where you use instances that belong to more than one blueprint. You'll discover the power of contract programming and parametric polymorphism. You'll combine generic code with inheritance and multiple inheritance. Later, you'll see how to combine functional programming with object-oriented programming and find out how to refactor your existing code for easy maintenance.Style and approachThis simple guide is packed with practical examples of solutions to common problems. Each chapter includes exercises and the possibility for you to test your progress by answering a quiz

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Swift 3 Object-Oriented Programming - Second Edition an online PDF/ePUB?
Yes, you can access Swift 3 Object-Oriented Programming - Second Edition by Gaston C. Hillar in PDF and/or ePUB format, as well as other popular books in Computer Science & Object Oriented Programming. We have over one million books available in our catalogue for you to explore.

Information

Year
2017
ISBN
9781787120990

Swift 3 ObjectOriented Programming - Second Edition


Swift 3 ObjectOriented Programming - Second Edition

Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: January 2016
Second edition: February 2017
Production reference: 1210217
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78712-039-6
www.packtpub.com

Credits

Author
Gastón C. Hillar
Copy Editor
Muktikant Garimella
Reviewer
Cecil Costa
Project Coordinator
Ulhas Kambali
Commissioning Editor
Ashwin Nair
Proofreader
Safis Editing
Acquisition Editor
Reshma Raman
Indexer
Pratik Shirodkar
Content Development Editors
Divij Kotian
Vikas Tiwari
Graphics
Jason Monteiro
Technical Editor
Jijo Maliyekal
Production Coordinator
Shraddha Falebhai

About the Author

Gastón C. Hillar is Italian and has been working with computers since he was eight. He began programming with the legendary Texas TI-99/4A and Commodore 64 home computers in the early 80s. He has a bachelor's degree in computer science (graduated with honors), and an MBA (graduated with an outstanding thesis). At present, Gastón is an independent IT consultant and a freelance author who is always looking for new adventures around the world.
He has been a senior contributing editor at Dr. Dobb’s and has written more than a hundred articles on software development topics. Gastón was also a former Microsoft MVP in technical computing. He has received the prestigious Intel® Black Belt Software Developer award eight times.
He is a guest blogger at Intel® Software Network (http://software.intel.com). You can reach him at [email protected] and follow him on Twitter at http://twitter.com/gastonhillar. Gastón’s blog is http://csharpmulticore.blogspot.com.
He lives with his wife, Vanesa, and his two sons, Kevin and Brandon.

Acknowledgement

At the time of writing this book, I was fortunate to work with an excellent team at Packt Publishing, whose contributions vastly improved the presentation of this book. Reshma Raman allowed me to provide her with ideas to write an updated edition of Object-Oriented Programming with Swift 2 to cover Swift 3, and I jumped into the exciting project of teaching Object-Oriented Programming in the most promising programming language developed by Apple: Swift 3.
Vikas Tiwari helped me realize my vision for this book and provided many sensible suggestions regarding the text, format, and flow. The reader will notice his great work. Vikas took the great work Divij Kotian had done in the previous edition and helped me in this new edition. It’s been great working with Reshma and Vikas in another project and I can’t wait to work with them again. I would like to thank my technical reviewers and proofreaders for their thorough reviews and insightful comments. I was able to incorporate some of the knowledge and wisdom they have gained in their many years in the software development industry. This book was possible because they gave valuable feedback. The entire process of writing a book requires a huge amount of lonely hours. I wouldn’t be able to write an entire book without dedicating some time to play soccer against my sons, Kevin and Brandon, and my nephew, Nicolas. Of course, I never won a match; however, I did score a few goals.

About the Reviewer

Cecil Costa, also know as Eduardo Campos in Latin countries, is a Euro-Brazilian freelance developer who has been learning about computers since getting his first 286 in 1990. From then on, he kept learning about programming languages, computer architecture, and computer science theory. Learning and teaching are his passions; this is the reason why he worked as a trainer and an author. He has been giving on-site courses for companies such as Ericsson, Roche, TVE (a Spanish television channel), and lots of others. He is also the author of Swift Cookbook First Edition and Swift 2 Blueprints, both by Packt Publishing. He will soon publish an iOS 10 programming video course. Nowadays, Cecil Costa teaches through online platforms, helping people from across the world. In 2008, he founded his own company, Conglomo Limited (http://www.conglomo.es), which offers development and training programs both on-site and online. Throughout his professional career, he has created projects by himself and also worked for different companies from small to big ones, such as IBM, Qualcomm, Spanish Lottery, and Dia%. He develops a variety of computer languages (such as Swift, C++, Java, Objective-C, JavaScript, Python, and so on) in different environments (iOS, Android, Web, Mac OS X, Linux, Unity, and so on), because he thinks that good developers needs to learn all kinds of programming languages to open their mind; only after this will they really understand what development is. Nowadays, Cecil is based in the UK, where he is progressing in his professional career as an iOS developer.
I’d like to thank Rahul Nair for being a such professional and good person.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
www.PacktPub.com
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to al...

Table of contents