ASP.NET Core 6 and Angular
eBook - ePub

ASP.NET Core 6 and Angular

Valerio De Sanctis

Condividi libro
  1. 780 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

ASP.NET Core 6 and Angular

Valerio De Sanctis

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Design, build and deploy robust web applications using ASP.NET 6, Angular 13, and Entity Framework CoreKey Features• The most up-to-date book that covers cutting-edge features released in ASP.NET Core 6 and Angular 13• Create a production-ready Single-Page Application (SPA) or Progressive Web Application (PWA)• Adopt a full-stack approach to handle data management, API documentation, Web APIs, end-to-end testing, security, and deploymentBook DescriptionEvery full-stack ninja needs the tools to operate on front-end and back-end application development. This web app development book takes a hands-on, project-based approach to provide you with all the tools and techniques that web developers need to create, debug, and deploy efficient web applications using ASP.NET Core and Angular.The fifth edition has been updated to cover advanced topics such as Minimal APIs, Web APIs with GraphQL, real-time updates with SignalR, and new features in.NET 6 and Angular 13.You begin by building a data model with Entity Framework Core, alongside utilizing the Entity Core Fluent API and EntityTypeConfiguration class. You'll learn how to fetch and display data and handle user input with Angular reactive forms and front-end and back-end validators for maximum effect.Later, you will perform advanced debugging and explore the unit testing features provided by xUnit.net (.NET 6) and Jasmine, as well as Karma for Angular. After adding authentication and authorization to your apps, you will explore progressive web applications, learning about their technical requirements, testing processes, and how to convert a standard web application to a PWA.By the end of this web development book, you will understand how to tie together the front-end and back-end to build and deploy secure and robust web applications.What you will learn• Use the new Visual Studio Standalone TypeScript Angular template• Implement and consume a Web API interface with ASP.NET Core• Set up an SQL database server using a local instance or a cloud datastore• Perform C# and TypeScript debugging using Visual Studio 2022• Create TDD and BDD unit tests using xUnit, Jasmine, and Karma• Perform DBMS structured logging using providers such as SeriLog• Deploy web apps to Azure App Service using IIS, Kestrel, and NGINX• Learn to develop fast and flexible Web APIs using GraphQL• Add real-time capabilities to Angular apps with ASP.NET Core SignalRWho this book is forThis book is for experienced ASP.NET developers who already possess some familiarity with ASP.NET Core and Angular and are looking to learn how to use them effectively together.The fully documented code samples (also available on GitHub) and the step-by-step implementation tutorials make this book easy to follow.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
ASP.NET Core 6 and Angular è disponibile online in formato PDF/ePub?
Sì, puoi accedere a ASP.NET Core 6 and Angular di Valerio De Sanctis in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming Languages. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2022
ISBN
9781803233642
Edizione
5

6

Fetching and Displaying Data

In the previous chapter, we created a new WorldCities solution containing a WorldCities project (our Angular app) and a WorldCitiesAPI project (our ASP.NET Web API) and made a considerable effort to empower the latter with a DBMS-based data provider, built upon Entity Framework Core using the Code-First approach. Now that we have data persistence, we’re ready to entrust our users with the ability to interact with our application; this means that we can switch to the Angular app and implement some much-needed stuff, such as the following:
  • Fetching data: Querying the data provider from the client side using HTTP requests and getting structured results back from the server side
  • Displaying data: Populating typical client-side components such as tables and lists, and thereby ensuring a good user experience for the end user
  • Adding countries to the loop: For the sake of simplicity, we’ll learn how to implement the fetch and display tasks by focusing on the City entity: in the last part of the chapter, we’ll use the knowledge gained to apply the same techniques to the Country entity as well
In this chapter, we’ll cover the fetch and display topics by adding several client-server interactions handled by standard HTTP request/response chains; it goes without saying that Angular will play a major role here, together with a couple of useful packages that will help us reach our goal.

Technical requirements

In this chapter, we’re going to need all the technical requirements listed in the previous chapters, plus the following external library:
  • System.Linq.Dynamic.Core (.NET Core NuGet package) for the WorldCitiesAPI ASP.NET app
As always, it’s advisable to avoid installing them straight away; we’re going to bring them in during this chapter to better contextualize their purpose within our project.
The code files for this chapter can be found at https://github.com/PacktPublishing/ASP.NET-Core-6-and-Angular/tree/master/Chapter_06/.

Fetching data

As we already know from Chapter 2, Getting Ready, reading data from the database is mostly a matter of having the Angular app (the front-end) send HTTP requests to the ASP.NET app (the back-end) and fetching the corresponding HTTP responses accordingly; these data transfers will be mostly implemented using JavaScript Object Notation (JSON), a lightweight data-interchange format that is natively supported by both frameworks.
In this section, we’ll mostly talk about HTTP requests and responses, see how we can fetch data from the ASP.NET app, and lay out some raw UI examples using Angular components that will be further refined throughout the next sections.
A...

Indice dei contenuti