Jump to ratings and reviews
Rate this book

Hands-On Full-Stack Development with Swift: Develop full-stack web and native mobile applications using Swift and Vapor

Rate this book
Build full-stack shopping list applications from scratch for web and mobile platforms using Xcode, Vapor, and Swift

Key FeaturesBuild, package, and deploy an end-to-end app solution for mobile and web with Swift 4Increase developer productivity by creating reusable client and server componentsDevelop backend services for your apps and websites using Vapor frameworkBook DescriptionMaking 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 learnGet accustomed to server-side programming as well as the Vapor frameworkLearn how to build a RESTful APIMake network requests from your app and handle error states when a network request failsDeploy your app to Heroku using the CLI commandWrite a test for the Vapor backendCreate a tvOS version of your shopping list app and explore code-sharing with an iOS platformAdd registration and authentication so that users can have their own shopping listsWho this book is forThis 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 ContentsGetting Started with Server SwiftCreating the Native AppGetting started with VaporConfiguring Providers, Fluent and DatabasesBuilding REST API using VaporConsuming API in AppCreating Web Views using LeafTesting and CIDeploying the AppAdding AuthenticationBuilding a Chat App

358 pages, Kindle Edition

First published March 1, 2018

2 people are currently reading
5 people want to read

About the author

Ankur Patel

5 books3 followers
Ankur Patel is a web and mobile application developer specializing in iOS with a passion for making innovative consumer applications. Ankur is a generalist who has worked with a variety of programming languages, such as Objective-C, Ruby, Javascript, Swift, Java, and C. He has held multiple roles in firms both big and small, including IBM, Oracle, Goldman Sachs, Bloomberg, Shutterstock, and MyTime. He is also the author of the book "Learning Swift - Building an iOS Game", which teaches the readers how to build an iOS game and publish it to the App Store.

In his free time he is contributing to open source and an author of a popular open source Swift library called Dollar which is a functional tool-belt for Swift developers. He has also written several blog posts for IBM and written a developer journey on how to use IBM's Watson cloud services to build interesting and AI driven apps/services.

He also likes to tinker around with Raspberry Pi to automate things in his life. His passion for building things has led him to help out Maplewood Township in New Jersey by volunteering to build cheap low powered heat measuring devices for the public schools. These devices help the public schools monitor temperature in real time and view historical data so that they can be more energy efficient and reduce their carbon footprint. He has been invited by Sustainable Jersey, a non profit organization, to speak at several events including their annual summit to demonstrate success story of community members helping out their township to be more sustainable. He has also been invited to the League of Municipality so that other townships can follow a similar model to be more sustainable with the use of technology.

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1 (50%)
4 stars
1 (50%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 of 1 review
1 review
April 9, 2018
I liked this book because it covered the topic of building a complete software solution from idea to a multi platform product using Swift. Concepts like Swift Package Manager and how to build a server in pure swift are covered in the book in easy to follow language. Also the book does a good job of starting out with a simple app that progressively gets more complex by making the app communicate with the backend built using Vapor in pure Swift. The book also covers how to test and deploy your backend so by the end of the book you have a multi platform product that you can almost publish to the App store and access from the browser as a webapp or use as an API.

One drawback of the book is that it uses Vapor 2 but since Vapor 3 is not officially released yet I did not mind as it does a good job covering several topics such as view rendering, routing, ORM, database migrations, middlewares, REST API, etc which give you a solid background on how to build a complete backend for your iOS and tvOS apps. HTML, JS, CSS are also covered briefly to build a webapp that uses the same API built for the native apps.

I would recommend this book to anyone who has some knowledge on building iOS app and would like to get their feet wet building a full stack backend server for their apps using Swift. Topics such as sharing dev tools to sharing code are covered in the book so if you are new to server side swift and tvOS development this book is a great intro as well.

I gave this a 5 star because several topics in Swift are covered in detail including some of the new features in Swift 4 such as Codable to make it easy to convert JSON response from API into class objects in the app and vice versa. The step by step instructions make it easy to follow and the author explains what is happening at each step of the way. There are no other books I know that cover all of these topics comprehensively for Swift as this one.
Displaying 1 of 1 review

Can't find what you're looking for?

Get help and learn more about the design.