Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tib committed Nov 4, 2020
1 parent 3f08ab4 commit 04921fd
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ Vapor 4 code samples for the [Practical Server Side Swift book](https://gumroad.

## Chapter 1: Introduction

Chapter 1 is an introduction to the Server side Swift world, explaining the evolution of Swift as a universal programming language. We'll talk about both the strenghts and weaknesses of the language and discuss why Swift is a good choice to build backend applications. We'll explore the Swift ecosystem and the open-source movement that made it possible to create the necessary tools on Linux to turn Swift into a server side language. You'll get introduced to Vapor, the most popular web application framework that we're going to use in this book.
This chapter is an introduction to the Server side Swift world, explaining the evolution of Swift as a universal programming language. We'll talk about both the strengths and weaknesses of the language and discuss why Swift is a good choice to build backend applications. We'll explore the Swift ecosystem and the open-source movement that made it possible to create the necessary tools on Linux to turn Swift into a server side language. You'll get introduced to Vapor, the most popular web application framework that we're going to use in this book.

## Chapter 2: Hello Vapor

This chapter contains detailed instructions about how to install all the required components to build server side Swift applicaitons both on Linux and macOS. You'll meet some command line tools that can help your every day life as a backend developer and we'll create our very first Vapor project using the Swift Package Manager. We'll also set up Vapor toolbox a handy little tool that can help you to bootstrap projects based on a template. In the very last section we will briefly take a look at the architecture of a Vapor application.
This chapter contains detailed instructions about how to install all the required components to build server side Swift applications both on Linux and macOS. You'll meet some command line tools that can help your every day life as a backend developer and we'll create our very first Vapor project using the Swift Package Manager. We'll also set up Vapor toolbox a handy little tool that can help you to bootstrap projects based on a template. In the very last section we will briefly take a look at the architecture of a Vapor application.

## Chapter 3: Building a website using Leaf

In this chapter we're going to build our first website using the Leaf template engine. We are going to write some basic HTML and CSS code and learn how to connect Swift objects with the template engine using contexts. You'll learn about the syntax of Leaf files using variables, conditions, how to iterate through objects and we'll even extend a base template to provide a reusable frame for our website. We'll build a blog layout with post list and detail pages.
In this chapter we're going to build our first website using the Leaf template engine. We are going to write some basic HTML and CSS code and learn how to connect Swift objects with the template engine using contexts. You'll learn about the syntax of Leaf files using variables, conditions, how to iterate through objects and we will extend a base template to provide a reusable frame for our website. We'll build a blog layout with post list and detail pages.

## Chapter 4: Modelling a blog using Fluent
## Chapter 4: Creating a blog database

You'll learn about the Fluent ORM framework and the advantages of using such tool instead of writing raw database queries. We'll setup Fluent powered by the SQLite driver, and model our database fields using property wrappers in Swift. We are going to provide a seed for our database, get familiar with migration scripts and make some changes on the website, so it can query blog posts from the local database and render them using Leaf.

Expand All @@ -36,35 +36,35 @@ In this chapter we will apply the same principles for the category model that we

## Chapter 9: Building a generic REST API

You'll learn abut building a standard JSON based API service. In the first section we discuss how to design a REST API, then we start building CRUD endpoints using a generic protocol oriented way. We'll talk a lot about the HTTP layer, learn how to use the cURL command line utility to test the endpoints. You'll see why it is a bad practice to use database models as API objects and finally we are going to replace our own implementation with an existing library.
You'll learn abut building a standard JSON based API service. In the first section we will discuss how to design a REST API, then we will build some building CRUD endpoints in a generic, protocol oriented way. We'll talk a lot about the HTTP layer, learn how to use the cURL command line utility to test the endpoints. You'll discover why it is a bad practice to use database models as API objects and, finally, we will protect the routes using a token based auth system.

## Chapter 10: The elephant in the room
## Chapter 10: Shared libraries & API design

In this chapter we're going to put everything into a production ready shape. We'll learn how to move away from the file based SQLite database and connect to a PostgreSQL database server. We're going to get familiar with the new Vapor command API and write a basic data transfer script. We'll refactor the modules by using ViperKit and replace the asset manager with the Liquid library to store files on AWS S3. We'll also secure the API using a token based authentication layer.
In this chapter we are going to split up some of our code into a separate library. This will allow us to use the library in other applications as well. You will learn how to create a new Swift Package from scratch and use it as a local dependency. We will move some of the API layer into the newly created package and reconnect it as a dependency. We are also going to talk about Data Transfer Objects. In the very last part I'll show you how to perform a HTTP request on the server side using the built-in async HTTP client.

## Chapter 11: Test everything
## Chapter 11: System under testing

This chapter is about learning the brand new XCTVapor framework. First we'll set up the test environment, write some basic unit tests for our application and run them. Next we are going to dig a little bit deeper in the XCTVapor framework so you can see how to write more complex tests. In the last part you will meet with a super lightweight and clean testing tool. The Spec library will allow us to write declarative specifications for our test cases.

## Chapter 12: Continuous delivery
## Chapter 12: Don't repeat yourself

Setting up a good continuous deployment workflow for an application can be hard. In this chapter we are going to containerize our backend by using Docker. After the app can run in a container we are going to use GitHub Actions to run automated unit tests. Next we set up a container repository service (ECR) on AWS to push the container images of the project and we will create a fully automated delivery system to deploy our application to the cloud with the help of ECR, Fargate (ECS) and the RDS infrastructure.
In this chapter we are going to replace the content API and view related files with external Swift packages, this way we can focus more on our business logic and worry less about building reusable components. It is also a great opportunity to refactor Leaf files and take advantage of the new features, so we don't have to copy & paste template snippets again. We'll also refactor the existing modules by using ViperKit and learn how to quickly bootstrap a new one using templates and a small command line utility tool written in Swift.

## Chapter 13: Going full-stack
## Chapter 13: A modular iOS client

In this chapter we are going to split up some of our code into a separate library. This will allow us to use the library in other applications as well. You will learn how to create a new Swift Package from scratch and use it as a dependency. We will move some of the API layer into the newly created package and reconnect it as a dependency. We are also going to talk about Data Transfer Objects and the differences between microservices and a monolithic application. In the very last part I'll show you how to perform a HTTP request on the server side using the built-in async HTTP client.
This time we are going to build a small iOS application in a modular fashion using Xcode. First, we will build a communication service layer using the previously created MyProjectApi package and the brand new Combine framework as a dependency. We will also learn how to generate VIPER modules using the Swift template tool. We will display a basic list of posts using the UIKit framework with the help of a table view. We are going to programmatically create all of the user interface, including auto layout constraints and custom views.

## Chapter 14: A basic iOS client
## Chapter 14: Sign in with Apple

This time we are going to build a small iOS application in a modular fashion using Xcode. First, we will build a communication service layer using the previously created MyProjectApi package and the brand new Combine framework as a dependency. We will also learn how to generate VIPER modules using the Swift template tool. We will display a basic list of posts using the UIKit framework with the help of a table view. We are going to programmatically create all of the user interface, including auto layout constraints and custom views.
This chapter is about integrating the Sign in with Apple service into the website and the iOS client application. You'll learn about how to set up identifiers and keys using the Apple developer portal. We are going to talk about the fundamental concepts of the sign in flow. We will configure the JWT library to sign and verify JSON Web Tokens as part of the Vapor framework. We are also going to use the public JWKS validation service by Apple and extend our user module.

## Chapter 15: Sign in with Apple & JWT
## Chapter 15: Push notifications

This chapter is about integrating the Sign in with Apple service into the website. You'll learn about how to set up identifiers and keys using the Apple developer portal. We are going to talk about the fundamental concepts of the sign in flow. We will configure the JWT library to sign and verify JSON Web Tokens as part of the Vapor framework. We are also going to use the public JWKS validation service by Apple and extend our user module.
In this chapter we are going to integrate the Apple Push Notification Service (APNs) both on the client and the server side. We are going to learn how to register for remote notifications, send device tokens to the backend and request for authorization using the UserNotifications framework. We are going to create a very basic admin interface for sending push messages using the Vapor APNS package.

## Chapter 16: Push Notification service
## Chapter 16: Infrastructures

Implementing APNS both on the client and the server side.
In this chapter we're going to upgrade our infrastructure. We'll learn how to move away from the file based SQLite database and connect to a PostgreSQL database server. We'll also use a new Liquid driver to store files on AWS S3. Next we will containerize our backend server by using Docker. After that we'll setup GitHub Actions (a continuous integration service) to run automated unit tests. Finally we configure a container repository service (ECR) on AWS to push the container images of the project and we will create a fully automated delivery system to deploy our application to the cloud with the help of ECR, Fargate (ECS) and the RDS infrastructure. As you can see we have a lot to do, so let's get started.


## Do you have any questions?
Expand Down

0 comments on commit 04921fd

Please sign in to comment.