ASP.NET Core 6 and Angular
eBook - ePub

ASP.NET Core 6 and Angular

Valerio De Sanctis

Buch teilen
  1. 780 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfĂŒgbar
eBook - ePub

ASP.NET Core 6 and Angular

Valerio De Sanctis

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

HĂ€ufig gestellte Fragen

Wie kann ich mein Abo kĂŒndigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kĂŒndigen“ – ganz einfach. Nachdem du gekĂŒndigt hast, bleibt deine Mitgliedschaft fĂŒr den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich BĂŒcher herunterladen?
Derzeit stehen all unsere auf MobilgerĂ€te reagierenden ePub-BĂŒcher zum Download ĂŒber die App zur VerfĂŒgung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die ĂŒbrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den AboplÀnen?
Mit beiden AboplÀnen erhÀltst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst fĂŒr LehrbĂŒcher, bei dem du fĂŒr weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhĂ€ltst. Mit ĂŒber 1 Million BĂŒchern zu ĂŒber 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
UnterstĂŒtzt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nÀchsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist ASP.NET Core 6 and Angular als Online-PDF/ePub verfĂŒgbar?
Ja, du hast Zugang zu ASP.NET Core 6 and Angular von Valerio De Sanctis im PDF- und/oder ePub-Format sowie zu anderen beliebten BĂŒchern aus Computer Science & Programming Languages. Aus unserem Katalog stehen dir ĂŒber 1 Million BĂŒcher zur VerfĂŒgung.

Information

Jahr
2022
ISBN
9781803233642

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...

Inhaltsverzeichnis