1 option
Hands-on full-stack development with Swift : develop full-stack web and native mobile applications using Swift and Vapor / Ankur Patel.
- Format:
- Author/Creator:
- Language:
- English
- Subjects (All):
- Physical Description:
- 1 online resource (350 pages) : illustrations
- Edition:
- 1st ed.
- Place of Publication:
- Birmingham ; Mumbai : Packt Publishing, 2018.
- Summary:
- Swift, with server-side coding, has become the future of native app development not only on iOS but for watchOS and tvOS. This book will show you how to create a native shopping list app along with a Full-Stack backend using Vapor. Vapor will serve as an API server for the mobile app and also as a web server to serve dynamic web pages to the.
- Contents:
-
- Cover
- Title Page
- Copyright and Credits
- Dedication
- Packt Upsell
- Contributors
- Table of Contents
- Preface
- Chapter 1: 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
- Chapter 2: 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
- Chapter 3: 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 Chapter 4: 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
- Chapter 5: Building a REST API using Vapor
- Routing in Vapor
- HTTP methods
- Routers
- Nested routing
- Dynamic routing
- Wildcard routing
- Routing parameters
- Vapor Models
- The Shopping List Model
- Preparation protocol
- JSONConvertible protocol
- ResponseRepresentable protocol
- Updateable protocol
- Item Model
- Controllers in Vapor
- RESTful Controller
- Shopping List controller
- REST API in action
- Creating the Shopping List
- Getting the Shopping List
- Updating the Shopping List
- Deleting the Shopping List
- Creating items
- Chapter 6: Consuming API in App
- Xcode Workspace
- Making network requests
- Network configuration
- Request helper
- Fetching data from the server
- Debugging the app and server side by side
- Adding a Shopping List
- Deleting a Shopping List
- Adding a Shopping List Item
- Checking and unchecking an item
- Chapter 7: Creating Web Views and Middleware
- View rendering in Vapor app
- What is Leaf?
- Adding Leaf Provider
- Serving JSON and HTML formats
- Creating a middleware
- Creating a BaseResourceController
- Adding JavaScript
- Creating a new Shopping List
- Adding an Item
- Deleting an Item
- Checking and unchecking an Item
- Chapter 8: Testing and CI.
- Testing the Vapor application
- Setting up the test environment
- Running tests
- Testing RESTful routes
- Fetching all Shopping Lists
- Creating a Shopping List
- Automated testing pipeline
- Enabling Travis build check on Pull request
- Chapter 9: Deploying the App
- Where can we deploy a Vapor App?
- Deploying to Heroku
- Priming the app for deployment
- Configuring and deploying Vapor to Heroku
- Adding the MongoDB Heroku addon
- Setting up Continuous Deployment
- Chapter 10: Adding Authentication
- Creating a User model
- Best practices for storing password
- Getting started with the User model
- User has many Shopping Lists
- Adding Registration and Login
- Showing user specific Shopping Lists
- Adding token-based authentication for app
- Testing the token-based authentication
- Adding authentication flow to iOS app
- Bringing it all together in the Storyboard
- Chapter 11: Building a tvOS App
- Shopping List app on tvOS
- Sharing code between iOS and tvOS
- Making code work with both iOS and tvOS apps
- Configuring the tvOS storyboard
- Other Books You May Enjoy
- Index.
- Notes:
- Description based on print version record.
- ISBN:
-
- 9781788626279
- 1788626273
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.