Hands-On Swift 5 Microservices Development

Build microservices for mobile and web applications using Swift 5 and Vapor 4

    • 4.2 • 5 Ratings
    • $20.99
    • $20.99

Publisher Description

Learn to design and deploy fully functioning microservices for your applications from scratch using Swift, Docker, and AWS

Key Features
Understand server-side Swift development concepts for building your first microservice

Build microservices using Vapor 4 and deploy them to the cloud using Docker

Learn effective techniques for enhancing maintainability and stability of your Swift applications

Book Description

The capabilities of the Swift programming language are extended to server-side development using popular frameworks such as Vapor. This enables Swift programmers to implement the microservices approach to design scalable and easy-to-maintain architecture for iOS, macOS, iPadOS, and watchOS applications.


This book is a complete guide to building microservices for iOS applications. You'll start by examining Swift and Vapor as backend technologies and compare them to their alternatives. The book then covers the concept of microservices to help you get started with developing your first microservice. Throughout this book, you'll work on a case study of writing an e-commerce backend as a microservice application. You'll understand each microservice as it is broken down into details and written out as code throughout the book. You'll also become familiar with various aspects of server-side development such as scalability, database options, and information flow for microservices that are unwrapped in the process. As you advance, you'll get to grips with microservices testing and see how it is different from testing a monolith application. Along the way, you'll explore tools such as Docker, Postman, and Amazon Web Services.


By the end of the book, you'll be able to build a ready-to-deploy application that can be used as a base for future applications.

What you will learn
Grasp server-side Swift development concepts using practical examples

Understand the microservices approach and why Swift is a great choice for building microservices

Design and structure mobile and web applications using microservices architecture

Discover the available database options and understand which one to choose

Scale and monitor your microservices

Use Postman to automate testing for your microservices API

Who this book is for

The book is for iOS, iPadOS, and macOS developers and Swift programmers who want to understand how Swift can be used for building microservices. The book assumes familiarity with Swift programming and the fundamentals of the web, including how APIs work.

GENRE
Computers & Internet
RELEASED
2020
March 2
LANGUAGE
EN
English
LENGTH
392
Pages
PUBLISHER
Packt Publishing
SELLER
Ingram DV LLC
SIZE
14.9
MB

Customer Reviews

MajorTom64 ,

A Great Way to Lean Server-Side Swift and Microservice Architectures.

Starting with a user service (including sending mail confirmations), the author develops a full micro services architecture built with the latest version of Vapor (Vapor 4). I started with only a little Swift experience and as I have progressed through the book, I have developed a good understanding of both Vapor 4 and why/how to use a microservice architecture. The author has been great about updating the code as Vapor 4 moved from Beta to release.

The book develops the back end for an online store and covers everything from handing multi-service user authentication to deploying with Docker/Kubernetes on AWS, Google Cloud Platform (GCP) (although I have not really looked at that section), and Digital Ocean (a great less expensive option for certain kinds of deployments).

I saw another review (part of what got me to write this one) and I am not sure what problems he had. It might be he was not working with the right version of Vapor (it was in its final release cycle and updating frequently). I purchased the book on the Apple Book Store (I had an iTunes gift card I wanted to use), and one of the great features of the digital versions is that they get updated as things change (very valuable for technical books).

Finally, I recommend that anyone reading this book, join the Vapor community on Discord. The authors of most of the Vapor/Server-Side Swift books are there, and have happily helped as I have been developing my personal project (a web comic and media site), even with other authors’ books.

The book starts with great explanation of why one would want to use microservices and what the downsides are as well. The author then explains how one can move from a monolithic app to a microservices architecture, by moving components one at a time, and even using it for add new functionality.

Next the author discusses server-side Swift explaining some of its benefits and why Vapor was used as the book’s platform.

The book then gives an introduction to Vapor covering its architecture and ORM (Fluent). While it is not a full Vapor 4 tutorial, it is more than enough to get started.

With that background, the author begins to layout the architecture of the application being built. Starting with a user service that includes basic address management, the author explains how to test and debug microservices.

The product management service is next, and now with two services, the book details how to communicate among one’s microservices. It talks about best practices and pitfalls to avoid. After adding the order service, it is time to cover deployment.

Starting with options for hosting and a discussion of the current state of Swift on Linux, the book works its way through what is needed to deploy and scale a Swift-based server-side application. Again, as with its material on Vapor, this is not a complete Docker, Kubernetes, AWS, GCP or Digital Ocean tutorial, but more than enough to get started and understand what else one needs to learn.

In addition to the book itself, the author has made available all the source code for the projects being built making it a great starting point for someone working on a real system. Overall, I think it is a great starting point for someone interested in exploring both server-side Swift and microservices.

Maniac20 ,

Difficult to follow

This book doesn’t make it easy to follow. There would be chapter talking about typing commands into the terminal just to tell you in the next chapter what you would be actually typing. Also some of the libraries don’t work exactly like it says in the book which makes the process of learning what things are doing a bit jarring. Had to give mid way because things were not building or making sense.

More Books Like This

2017
2016
2017
2015
2020
2014

More Books by Ralph Kuepper & Tanner Nelson

Customers Also Bought

2019
2019
2020
2019
2019
2019