Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ASP.NET Core 5 and React

You're reading from   ASP.NET Core 5 and React Full-stack web development using .NET 5, React 17, and TypeScript 4

Arrow left icon
Product type Paperback
Published in Jan 2021
Publisher Packt
ISBN-13 9781800206168
Length 568 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Carl Rippon Carl Rippon
Author Profile Icon Carl Rippon
Carl Rippon
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Section 1: Getting Started
2. Chapter 1: Understanding the ASP.NET 5 React Template FREE CHAPTER 3. Chapter 2: Creating Decoupled React and ASP.NET 5 Apps 4. Section 2: Building a Frontend with React and TypeScript
5. Chapter 3: Getting Started with React and TypeScript 6. Chapter 4: Styling React Components with Emotion 7. Chapter 5: Routing with React Router 8. Chapter 6: Working with Forms 9. Chapter 7: Managing State with Redux 10. Section 3: Building an ASP.NET Backend
11. Chapter 8: Interacting with the Database with Dapper 12. Chapter 9: Creating REST API Endpoints 13. Chapter 10: Improving Performance and Scalability 14. Chapter 11: Securing the Backend 15. Chapter 12: Interacting with RESTful APIs 16. Section 4: Moving into Production
17. Chapter 13: Adding Automated Tests 18. Chapter 14: Configuring and Deploying to Azure 19. Chapter 15: Implementing CI and CD with Azure DevOps 20. Other Books You May Enjoy

What this book covers

Section 1: Getting Started

Chapter 1, Understanding the ASP.NET 5 React Template, covers the standard SPA template that Visual Studio offers for ASP.NET Core and React apps. It covers the programmatic entry points for both the frontend and backend and how they work together in the Visual Studio solution.

Chapter 2, Creating Decoupled React and ASP.NET 5 Apps, steps through how we can create an up-to-date ASP.NET Core and React solution. The chapter includes the use of TypeScript, which is hugely beneficial when creating large and complex frontends.

Section 2: Building a Frontend with React and TypeScript

Chapter 3, Getting Started with React and TypeScript, covers the fundamentals of React, such as JSX, props, state, and events. The chapter also covers how to create strongly typed components with TypeScript.

Chapter 4, Styling React Components with Emotion, covers different approaches to styling React components. The chapter covers styling using plain CSS and then CSS modules before covering CSS-in-JS.

Chapter 5, Routing with React Router, introduces a library that enables apps with multiple pages to be efficiently created. It covers how to declare all the routes in an app and how these map to React components, including routes with parameters. The chapter also covers how to load the components from a route on demand in order to optimize performance.

Chapter 6, Working with Forms, covers how to build forms in React. The chapter covers how to build a form in plain React before leveraging a popular third-party library to make the process of building forms more efficient.

Chapter 7, Managing State with Redux, steps through how this popular library can help manage state across an app. A strongly typed Redux store is built along with actions and reducers with the help of TypeScript.

Section 3: Building an ASP.NET Backend

Chapter 8, Interacting with the Database with Dapper, introduces a library that enables us to interact with SQL Server databases in a performant manner. Both reading and writing to a database are covered, including mapping SQL parameters from a C# class and mapping results to C# classes.

Chapter 9, Creating REST API Endpoints, covers how to create a REST API that interacts with a data repository. Along the way, dependency injection, model binding, and model validation are covered.

Chapter 10, Improving Performance and Scalability, covers several ways of improving the performance and scalability of the backend, including reducing database round trips, making APIs asynchronous, and data caching. Along the way, several tools are used to measure the impact of improvements.

Chapter 11, Securing the Backend, leverages ASP.NET identity along with JSON web tokens in order to add authentication to an ASP.NET Core backend. The chapter also covers the protection of REST API endpoints with the use of standard and custom authorization policies.

Chapter 12, Interacting with RESTful APIs, covers how a React frontend can talk to an ASP.NET Core backend using the JavaScript fetch function. The chapter also covers how a React frontend can gain access to protected REST API endpoints with a JSON web token.

Section 4: Moving into Production

Chapter 13, Adding Automated Tests, covers how to create unit tests and integration tests on the ASP.NET Core backend using xUnit. The chapter also covers how to create tests on pure JavaScript functions as well as React components using Jest.

Chapter 14, Configuring and Deploying to Azure, introduces Azure and then steps through deploying both the backend and frontend to separate Azure app services. The chapter also covers the deployment of a SQL Server database to SQL Azure.

Chapter 15, Implementing CI and CD with Azure DevOps, introduces Azure DevOps before stepping through creating a build pipeline that automatically triggers when code is pushed to a source code repository. The chapter then steps through setting up a release pipeline that deploys the artifacts from the build into Azure.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime