Swift 3 Object Oriented Programming Second Edition

Gaston C. Hillar

  • 出版商: Packt Publishing
  • 出版日期: 2017-02-27
  • 售價: $1,810
  • 貴賓價: 9.5$1,720
  • 語言: 英文
  • 頁數: 370
  • 裝訂: Paperback
  • ISBN: 1787120392
  • ISBN-13: 9781787120396
  • 相關分類: Apple Developer
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Key Features

  • 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 apps

Book Description

Swift 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 want 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 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 organise 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.

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 code

商品描述(中文翻譯)

主要特點



  • 在您的 Swift 應用程式中運用最有效的物件導向設計模式

  • 使用生成物件的藍圖來撰寫堅固、更安全、更好的程式碼

  • 使用真實世界元素建立物件導向程式碼平台,並在您的應用程式中呈現它們

書籍描述


Swift 迅速成為最受歡迎的程式語言之一,也是開發者在開發針對 iOS 和 macOS 的應用程式時的首選。在新版本中,Swift 團隊希望通過將其應用於新平台和新受眾,將其普及度提升到新的水平。


本書介紹了物件導向範式及其在 Swift 3 程式語言中的實現,以幫助您了解如何將真實世界的物件納入程式碼的基本元素中。本書使用 XCode 8.x 開發,並涵蓋了 Swift 3.0 中包含的所有增強功能。此外,我們教您如何在 macOS 和 Linux 上運行大多數範例,以及如何使用 IBM 開發的基於 Web 的 Swift 沙箱在任何 Web 瀏覽器上運行,包括 Windows 和移動設備。


您將使用生成實例的藍圖來組織資料。通過使用屬性和存取控制來封裝和隱藏資料,您將學習如何使用範例。然後,您將掌握使用屬於多個藍圖的實例的複雜情境。您將發現契約編程和參數多型的威力。您將結合泛型程式碼與繼承和多重繼承。隨後,您將了解如何將函數式程式設計與物件導向程式設計結合,並了解如何重構現有程式碼以便於維護。

您將學到什麼



  • 撰寫高品質且易於維護的可重複使用物件導向程式碼,以建立針對 iOS、macOS 和 Linux 的應用程式

  • 使用 Swift 3.0 進行封裝、抽象和多型

  • 在 Swift 3.0 中使用類別、實例、屬性和方法

  • 利用繼承、特化以及重載或覆寫成員的可能性

  • 實現封裝、抽象和多型

  • 探索在 Swift 3.0 中將函數式程式設計技術與物件導向程式碼混合使用

  • 了解 Swift 3.0、之前的 Swift 版本和 Objective-C 程式碼之間的差異