Hands-On Full-Stack Development with Swift: Develop full-stack web and native mobile applications using Swift and Vapor
暫譯: 實作全端開發與 Swift:使用 Swift 和 Vapor 開發全端網頁及原生行動應用程式
Ankur Patel
- 出版商: Packt Publishing
- 出版日期: 2018-03-28
- 售價: $2,010
- 貴賓價: 9.5 折 $1,910
- 語言: 英文
- 頁數: 356
- 裝訂: Paperback
- ISBN: 1788625242
- ISBN-13: 9781788625241
-
相關分類:
Apple Developer
海外代購書籍(需單獨結帳)
商品描述
Build full-stack shopping list applications from scratch for web and mobile platforms using Xcode, Vapor, and Swift
Key Features
- Build, package, and deploy an end-to-end app solution for mobile and web with Swift 4
- Increase developer productivity by creating reusable client and server components
- Develop backend services for your apps and websites using Vapor framework
Book Description
Making Swift an open-source language enabled it to share code between a native app and a server. Building a scalable and secure server backend opens up new possibilities, such as building an entire application written in one language-Swift.
This book gives you a detailed walk-through of tasks such as developing a native shopping list app with Swift and creating a full-stack backend using Vapor (which serves as an API server for the mobile app). You'll also discover how to build a web server to support dynamic web pages in browsers, thereby creating a rich application experience.
You'll begin by planning and then building a native iOS app using Swift. Then, you'll get to grips with building web pages and creating web views of your native app using Vapor. To put things into perspective, you'll learn how to build an entire full-stack web application and an API server for your native mobile app, followed by learning how to deploy the app to the cloud, and add registration and authentication to it.
Once you get acquainted with creating applications, you'll build a tvOS version of the shopping list app and explore how easy is it to create an app for a different platform with maximum code shareability. Towards the end, you'll also learn how to create an entire app for different platforms in Swift, thus enhancing your productivity.
What you will learn
- Get accustomed to server-side programming as well as the Vapor framework
- Learn how to build a RESTful API
- Make network requests from your app and handle error states when a network request fails
- Deploy your app to Heroku using the CLI command
- Write a test for the Vapor backend
- Create a tvOS version of your shopping list app and explore code-sharing with an iOS platform
- Add registration and authentication so that users can have their own shopping lists
Who This Book Is For
This book is for developers who are looking to build full-stack web and native mobile applications using Swift. An understanding of HTML, CSS, and JavaScript would be beneficial when building server-rendered pages with Vapor.
Table of Contents
- Getting Started with Server Swift
- Creating the Native App
- Getting started with Vapor
- Configuring Providers, Fluent and Databases
- Building REST API using Vapor
- Consuming API in App
- Creating Web Views using Leaf
- Testing and CI
- Deploying the App
- Adding Authentication
- Building a Chat App
商品描述(中文翻譯)
**從零開始使用 Xcode、Vapor 和 Swift 建立全棧購物清單應用程式,適用於網頁和行動平台**
#### 主要特點
- 使用 Swift 4 建立、打包和部署一個端到端的行動和網頁應用解決方案
- 通過創建可重用的客戶端和伺服器組件來提高開發者的生產力
- 使用 Vapor 框架為您的應用程式和網站開發後端服務
#### 書籍描述
將 Swift 變成開源語言使其能夠在原生應用程式和伺服器之間共享代碼。建立可擴展且安全的伺服器後端開啟了新的可能性,例如用一種語言—Swift—編寫整個應用程式。
本書詳細介紹了開發原生購物清單應用程式和使用 Vapor 創建全棧後端(作為行動應用的 API 伺服器)等任務。您還將學習如何建立一個網頁伺服器,以支持瀏覽器中的動態網頁,從而創造豐富的應用體驗。
您將從規劃開始,然後使用 Swift 建立一個原生 iOS 應用程式。接著,您將掌握使用 Vapor 建立網頁和創建原生應用的網頁視圖。為了讓事情更具體,您將學習如何建立一個完整的全棧網頁應用程式和原生行動應用的 API 伺服器,然後學習如何將應用程式部署到雲端,並為其添加註冊和身份驗證功能。
一旦您熟悉了創建應用程式的過程,您將建立購物清單應用的 tvOS 版本,並探索如何以最大代碼共享性為不同平台創建應用程式的簡易性。在最後,您還將學習如何為不同平台創建整個應用程式,從而提高您的生產力。
#### 您將學到的內容
- 熟悉伺服器端編程以及 Vapor 框架
- 學習如何建立 RESTful API
- 從您的應用程式發送網路請求,並在網路請求失敗時處理錯誤狀態
- 使用 CLI 命令將您的應用程式部署到 Heroku
- 為 Vapor 後端編寫測試
- 創建購物清單應用的 tvOS 版本,並探索與 iOS 平台的代碼共享
- 添加註冊和身份驗證,以便用戶擁有自己的購物清單
#### 本書適合誰
本書適合希望使用 Swift 建立全棧網頁和原生行動應用程式的開發者。了解 HTML、CSS 和 JavaScript 對於使用 Vapor 建立伺服器渲染頁面將是有益的。
#### 目錄
1. 開始使用 Server Swift
2. 創建原生應用
3. 開始使用 Vapor
4. 配置提供者、Fluent 和數據庫
5. 使用 Vapor 建立 REST API
6. 在應用中消費 API
7. 使用 Leaf 創建網頁視圖
8. 測試和 CI
9. 部署應用
10. 添加身份驗證
11. 建立聊天應用