更新时间:2021-08-27 19:40:19
封面
Title Page
Copyright and Credits
Hands-On Full-Stack Development with Swift
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Getting Started with Server Swift
Modern app development
Swift's evolution
Open source
Server-side Swift
Benefits of server-side Swift
Getting started with Swift package manager
Building a Swift package
Publishing a Swift package
Consuming a Swift package
Installing the package's executable
How do the web servers work?
User requesting a web page
Mobile application requesting data
HTTP request and response
Building a web server in Swift
Server-side web frameworks
Vapor
Book roadmap
Summary
Creating the Native App
Features of our Shopping List app
Creating an app
Blueprinting the Shopping List Item model
Exercise
Exercise answer
Controlling the flow of our application using View Controller
Wiring up the view
Table View Controller
Adding items to the list
Editing the list
Loading and auto-saving the Shopping List
Multiple lists
Refactoring to share code
Blueprinting the Shopping List Model
The Shopping List Table View Controller
Getting Started with Vapor
What is Vapor?
Building servers using Vapor's engine
Building a basic HTTP server
Building a static file server
Building a WebSocket server
Building a Vapor application from scratch
Vapor toolbox
Installing the Vapor toolbox
Vapor toolbox commands
Creating a Vapor application using the toolbox
Vapor folder structure
Vapor config
Vapor droplet
Views
Controllers
Configuring Providers Fluent and Databases
Shopping List API Vapor app
What are Providers?
Building your first Provider
Exercise time
Adding a Provider
Getting started with databases
What is MongoDB?
How to install and run MongoDB
What are ORM and Fluent?
Fluent in action
Creating an item
Updating an item
Getting all items
Finding an item
Finding items using filter
Deleting an item
Counting items
Relations in Fluent
One to one (parent-child relation)
One to many
Many to many
Connecting with MongoDB
Configuring Fluent config
Mongo config - mongo.json
Adding MongoProvider