Design Patterns in Swift 5: Learn how to implement the Gang of Four Design Patterns using Swift 5. Improve your coding skills.

Nyisztor, Monika, Nyisztor, Karoly

  • 出版商: Independently Published
  • 出版日期: 2019-03-26
  • 售價: $1,180
  • 貴賓價: 9.5$1,121
  • 語言: 英文
  • 頁數: 350
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1091686513
  • ISBN-13: 9781091686519
  • 相關分類: Apple DeveloperDesign Pattern
  • 立即出貨 (庫存=1)

買這商品的人也買了...

相關主題

商品描述

Software developers need to solve various problems. Many times, these problems are the same or similar to the ones they've already encountered in other projects.

Wouldn't it be great to apply the solution you've found instead of reinventing the wheel over and over again?

That's precisely the reason why software design patterns exist. A design pattern is a standardized way to address a recurring problem. Relying on a proven strategy will not only save you time, but you can rest assured that it's indeed the right choice.

Design patterns are the result of a long evolution process. It all started with a book published in 1994 - yes, it's that old - called "Design Patterns - Elements of Reusable Object-Oriented Software." That's a quite tedious title, so we usually refer to it as "the book by the gang of four." The gang consists of four renowned software engineers: Erich Gamma, Ralph Johnson, Richard Helm, and John Vlissides. They identified the most significant common issues that occurred in multiple projects and developed best practices to solve them.

The best part: these solutions are (programming) language-agnostic. You can use the design patterns with any object-oriented programming language.

Many modern programming languages and frameworks have integrated the GoF patterns. You don't have to write additional code to support say the Iterator or the Observer.

Swift is no exception: it provides many advanced language features and constructs such as type extensions, lazy initialization, and predefined protocols that let us adopt and integrate the design patterns into our projects easily.

This book covers all these topics and teaches best practices you can apply in your upcoming projects.

We'll talk about the benefits of understanding and applying the design patterns, the value they provide, and also about their limitations.

Then, we delve into the creational design patterns:

  • the Singleton,
  • the Prototype,
  • the Factory Method,
  • the Builder,
  • and the Abstract Factory design pattern

We're going to take a closer look at the structural design patterns. We discuss:

  • the Adapter,
  • the Decorator,
  • the Fa ade,
  • the Flyweight,
  • and the Proxy pattern

In the final part of this book, we discuss the behavioral design patterns:

  • the Chain of Responsibility,
  • the Iterator,
  • the Observer,
  • and we finish with the State design pattern

For each design pattern, we discuss the following:

  • When to use the specific design pattern?
  • How can it be implemented using Swift 5?
  • What are the challenges and pitfalls of using the given pattern?

Throughout the book, I provide coding examples that can be applied in real-world situations.

K roly Nyisztor is a veteran software engineer and instructor.

He has worked with large companies such as Apple, Siemens, and SAP. K roly has designed and built several enterprise frameworks, and he holds twelve patents related to inventions in the field of mobile computing.

After 18 years, he left the corporate world to start his own business.

Since 2016, he's fully committed to teaching. As an instructor, he aims to share his 20+ years of software development expertise. K roly teaches:

  • Software Architecture,
  • Object-Oriented Programming and Design
  • Swift and iOS Programming,
  • and other, programming-related topics

You can find K roly Nyisztor's courses and books on all major platforms including Amazon, Lynda, LinkedIn Learning, Pluralsight, Udemy, and iTunes.

商品描述(中文翻譯)

軟體開發人員需要解決各種問題。很多時候,這些問題與他們在其他專案中遇到的問題相同或相似。如果能應用已找到的解決方案,而不是一遍又一遍地重新發明輪子,那不是很好嗎?

這正是軟體設計模式存在的原因。設計模式是解決重複問題的標準化方式。依賴於經過驗證的策略不僅可以節省時間,還可以確保選擇是正確的。

設計模式是長期演化過程的結果。一切始於1994年出版的一本書 - 是的,它已經那麼老了 - 名為《設計模式 - 可重用物件導向軟體的元素》。這是一個相當冗長的標題,所以我們通常稱之為「四人幫的書」。這個團隊由四位著名的軟體工程師組成:Erich Gamma、Ralph Johnson、Richard Helm和John Vlissides。他們確定了多個專案中出現的最重要的共同問題,並開發了解決方案的最佳實踐。

最好的部分是:這些解決方案與(程式)語言無關。你可以在任何面向對象的程式語言中使用設計模式。

許多現代程式語言和框架已經整合了GoF模式。你不需要編寫額外的程式碼來支援迭代器或觀察者。

Swift也不例外:它提供了許多先進的語言功能和結構,例如型別擴展、延遲初始化和預定義的協議,讓我們能夠輕鬆地採用和整合設計模式到我們的專案中。

本書涵蓋了所有這些主題,並教授了你可以應用於即將進行的專案中的最佳實踐。

我們將討論了解和應用設計模式的好處,它們提供的價值,以及它們的限制。

然後,我們深入探討了創建型設計模式:單例模式、原型模式、工廠方法模式、建造者模式和抽象工廠模式。

我們將仔細研究結構型設計模式。我們討論了適配器模式、裝飾器模式、外觀模式、享元模式和代理模式。

在本書的最後部分,我們討論了行為型設計模式:責任鏈模式、迭代器模式、觀察者模式,並以狀態模式作為結尾。

對於每個設計模式,我們討論以下內容:

- 何時使用特定的設計模式?
- 如何使用Swift 5實現它?
- 使用該模式的挑戰和陷阱是什麼?

在整本書中,我提供了可以應用於實際情況的編碼示例。

Károly Nyisztor是一位資深軟體工程師和講師。

他曾與蘋果、西門子和SAP等大公司合作。Károly設計並建立了多個企業框架,並擁有與移動計算領域的發明相關的12項專利。

18年後,他離開了企業界,開始自己的事業。

自2016年以來,他全身心致力於教學。作為一名講師,他的目標是分享他20多年的軟體開發專業知識。Károly教授以下課程:

- 軟體架構
- 面向對象的程式設計和設計
- Swift和iOS程式設計
- 其他與程式設計相關的主題

你可以在包括亞馬遜、Lynda、LinkedIn Learning、Pluralsight、Udemy和iTunes在內的所有主要平台上找到Károly Nyisztor的課程和書籍。