<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version

Web APIs with Rust and ActixWeb

Duration

3 days

Description

Many programmers think of Rust as only a systems programming language, but it can be so much more. Rust is a great language for building web server-based REST API applications. There are several popular REST API frameworks for Rust, this course covers the ActixWeb framework. In this course, you'll learn how to build REST APIs with Rust and ActixWeb. You'll learn how to create routes, handlers, and extractors. Also, you'll learn how to connect to a database and perform CRUD operations. By the end of this course, you'll be able to create your own REST APIs with Rust and ActixWeb.

Objectives

  • Understand the Principles of Building a REST API
  • Explore how to Create Web APIs with Rust and Actix
  • Connect a REST API to a Database (PostgreSQL or SQL Server)
  • Learn how to Configure Routes
  • Explore Extractors, Handlers, and Middleware
  • Learn how to Publish and Host a REST API

Prerequisites

  • This course assumes prior experience with Rust. Experience with the SQL language and PostgreSQL or SQL Server is a plus.

Training Materials

All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples. Students practice the topics covered through challenging hands-on lab exercises.

Software Requirements

Students will need a free, personal GitHub account to access the courseware. Students will need permission to install Rust and Visual Studio Code on their computers. Also, students will need permission to install Rust Crates and Visual Studio Extensions. Students will need a local instance of Postgresql or SQL Server installed on their computer (using Docker is acceptable). Finally, students will need CURL and/or Postman installed on their computer. If students are unable to configure a local development environment on their machines, a cloud-based environment can be provided.

Outline

  • Introduction
  • REST Overview
    • What is REST?
    • What is a REST API?
    • What is a REST Client?
    • HTTP Methods and Resource Operations
    • URLs, Query Strings, and Path Parameters
    • HTTP Status Codes
    • HTTP Headers and Body
    • CURL and Postman
  • Web APIs with Actix
    • What is a Web API?
    • What is Actix?
    • How does it compare to Express, Flask, and ASP.NET MVC?
    • Create an Actix Project
    • Run and Debug Actix Applications with VS Code
  • Routing
    • What is Routing?
    • Map HTTP Routes to Rust Functions
    • Route Parameters
    • Wire up Routes in an ActixWeb Application
  • Extractors
    • What is an Extractor?
    • Path Extractor
    • Query String Extractor
    • JSON Extractor
    • URL-Encoded Form Extractor
    • Other Extractors
    • Custom Extractors
  • Request Handlers
    • What is a Request Handler?
    • Stages of Handling a Request
    • Responder Trait
    • Respond with a Custom Type
    • Streaming Response Body
    • Different Response Types
  • Middleware
    • What is Middleware?
    • Request/Response Pipeline
    • Logging
    • User Sessions
    • Error Handling
    • Custom Middleware
  • Static Files
  • Database Programming
    • What is a Database?
    • Connect to a Database
    • Query data from the database
    • Modify data in the database
  • Testing
    • Integration Testing
    • Stream Response Testing
    • Unit Testing Extractors
    • Unit Testing Middleware
    • Unit Testing Responders
  • Deployment
  • Build a Release Version
  • Public the Release Version
  • Hosting Considerations
  • Dockerize the Application
  • Conclusion
<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version