ASP.NET Core 6 and Angular
eBook - ePub

ASP.NET Core 6 and Angular

Valerio De Sanctis

Compartir libro
  1. 780 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

ASP.NET Core 6 and Angular

Valerio De Sanctis

Detalles del libro
Vista previa del libro
Índice
Citas

Información del 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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es ASP.NET Core 6 and Angular un PDF/ePUB en línea?
Sí, puedes acceder a ASP.NET Core 6 and Angular de Valerio De Sanctis en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming Languages. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2022
ISBN
9781803233642
Edición
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...

Índice