Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
ASP.NET Core 8 and Angular - Sixth Edition
ASP.NET Core 8 and Angular - Sixth Edition

ASP.NET Core 8 and Angular: Full-stack web development with ASP.NET Core 8 and Angular, Sixth Edition

By Valerio De Sanctis
$43.99 $29.99
Book Feb 2024 804 pages 6th Edition
eBook
$43.99 $29.99
Print
$54.99
Subscription
$15.99 Monthly
eBook
$43.99 $29.99
Print
$54.99
Subscription
$15.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Feb 28, 2024
Length 804 pages
Edition : 6th Edition
Language : English
ISBN-13 : 9781805129936
Category :
Table of content icon View table of contents Preview book icon Preview Book

ASP.NET Core 8 and Angular - Sixth Edition

Introducing ASP.NET and Angular

Over the first two chapters of this book, we’ll build the basics of our ASP.NET and Angular journey by mixing theoretical coverage of their most relevant features with a practical approach. More specifically, in the first chapter, we’ll briefly review the recent history of ASP.NET/.NET Core and Angular frameworks, while in the second chapter, we’ll learn how to configure our local development environment so we can assemble, build, and test a sample web application boilerplate.

By the end of these chapters, you’ll have gained knowledge of the path taken by ASP.NET and Angular to improve web development in the last few years and learned how to properly set up an ASP.NET and Angular web application.

Here are the main topics that we are going to cover in this chapter:

  • Two players, one goal: How ASP.NET and Angular can be used together to build a modern, feature-rich, and highly versatile web application
  • ...

Technical requirements

These are the software packages (and relevant version numbers) used to write this book and test the source code:

  • Visual Studio 2022 Community edition 17.8.1 with the optional ASP.NET and web development workload (it can be selected from the Workloads section within the Visual Studio installer app)
  • Microsoft .NET 8 SDK 8.0.100
  • TypeScript 5.2
  • NuGet package manager 6.8.0
  • Node.js 20.10.0
  • Angular 17.0.3

We strongly suggest using the same version used within this book, or newer, but at your own risk! Jokes aside, if you prefer to use a different version, that’s perfectly fine, as long as you are aware that, in that case, you may need to make some manual changes and adjustments to the source code.

The code files for this book can be found here: https://github.com/PacktPublishing/ASP.NET-Core-8-and-Angular.

Two players, one goal

From the perspective of a fully functional web-based application, we can say that the web API interface provided with the ASP.NET framework is a programmatic set of server-side handlers used by the server to expose a number of hooks and/or endpoints to a defined request-response message system. This is typically expressed in structured markup languages (XML), language-independent data formats (JSON), or query languages for APIs (GraphQL). As we’ve already said, this is achieved by exposing application programming interfaces (APIs) through HTTP and/or HTTPS protocols via a publicly available web server such as IIS, Node.js, Apache, or NGINX.

Similarly, Angular can be described as a modern, feature-rich, client-side framework that pushes the HTML and ECMAScript’s most advanced features, along with the modern browser’s capabilities, to their full extent by binding the input and/or output parts of an HTML web page into a flexible, reusable...

The ASP.NET Core revolution

To summarize what has happened in the ASP.NET world within the last decade is not an easy task; in short, we can say that we’ve undoubtedly witnessed the most important series of changes in .NET Framework since the year it came to life. This was a revolution that changed the whole Microsoft approach to software development in almost every way. To properly understand what happened in those years, it would be useful to identify some distinctive key frames within a slow, yet constant, journey that allowed a company known (and somewhat loathed) for its proprietary software, licenses, and patents to become a driving force for open source development worldwide.

The first relevant step, at least in my humble opinion, was taken on April 3, 2014, at the annual Microsoft Build conference, which took place at the Moscone Center (West) in San Francisco. It was there, during a memorable keynote speech, that Anders Hejlsberg – father of Delphi and lead...

What’s new in Angular?

If following in the footsteps of Microsoft and the .NET Foundation in recent years has not been an easy task, things were not going to get any better when we turned our eyes to the client-side web framework known as Angular. To understand what happened there, we have to go back 10 years to when JavaScript libraries such as jQuery and MooTools were dominating the client-side scene; the first client-side frameworks, such as Dojo, Backbone.js, and Knockout.js, were struggling to gain popularity and reach wide adoption; and stuff such as React and Vue.js didn’t even exist.

Truth be told, jQuery is still dominating the scene to a huge extent, at least according to BuiltWith (https://trends.builtwith.com/javascript/javascript-library) and w3Techs (https://w3techs.com/technologies/overview/javascript_library/all). However, despite being used by 74.1% of all websites, it’s definitely an option chosen less often by web developers than...

Reasons for choosing .NET and Angular

As we have seen, both frameworks have gone through many intense years of changes. This led to a whole refoundation of their core and, right after that, a constant strain to get back on top – or at least not lose ground against most modern frameworks that came out after their now-departed golden age. These frameworks are eager to dominate the development scene: Python, Go, and Rust for the server-side part, and React, Vue.js, and Ember.js for the client-side part, not to mention the Node.js and Express ecosystem, and most of the old competitors from the 1990s and 2000s, such as Java, Ruby, and PHP, which are still alive and kicking.

That said, here’s a list of good reasons for picking ASP.NET Core in 2024:

  • Performance: The new .NET web stack is considerably fast, especially since .NET Core 3.1, with continuous improvements up to .NET 8.
  • Integration: It supports most, if not all, modern client-side frameworks,...

Summary

Before moving on, let’s do a quick recap of what we just talked about in this chapter.

We briefly described our platforms of choice – ASP.NET Core and Angular – and acknowledged their combined potential in the process of building a modern web application. We spent some valuable time recalling what’s happened in these last few years and summarizing the efforts of both development teams to reboot and improve their respective frameworks. These recaps were very useful to enumerate and understand the main reasons why we’re still using them over their ever-growing competitors.

In the next chapter, we will deal with the typical challenges of a full stack developer: define our goals, acquire the proper mindset, set up the environment, and create our first ASP.NET and Angular projects.

Suggested topics

For further information, we recommend the following topics: ASP.NET Core, .NET Core, .NET 8, Angular, Angular 17, tree-shaking, Angular Ivy, tsconfig.json, Roslyn, CoreCLR, RyuJIT, NuGet, npm, ECMAScript 6, JavaScript, TypeScript, webpack, SystemJS, RxJS, cache-control, HTTP headers, .NET middleware, Angular Universal, server-side rendering (SSR), ahead-of-time (AOT) compiler, service workers, web manifest files, and tsconfig.json.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Combine ASP.NET Core and Angular to build highly versatile web applications
  • 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 deployment

Description

If you want to learn how to use ASP.NET Core with Angular effectively, this hands-on guide is for you. Improve the way you create, debug, and deploy web applications while keeping up to date with the latest developments in .NET 8 and modern Angular, including .NET Minimal APIs and the new Angular standalone API defaults. You’ll begin by setting up SQL Server 2022 and building a data model with Entity Framework Core. You’ll progress to fetching and displaying data, handling user input with Angular reactive forms, and implementing front-end and back-end validators for maximum effect. After that, you will perform advanced debugging and explore unit testing features with xUnit for .NET, and Jasmine and Karma for Angular. You’ll use Identity API endpoints in ASP.NET Core and functional route guards in Angular to add authentication and authorization to your apps. Finally, you’ll learn how to deploy to Windows, Linux, and Azure. By the end of this 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

Explore the new Angular and ASP.NET Core template with Visual Studio 2022 Use modern interfaces and patterns such as the HTML5 pushState API, webhooks, and UI data bindings Add real-time capabilities to Angular apps with SignalR and gRPC Implement authentication and authorization using JWTs Perform DBMS structured logging using providers such as SeriLog Convert a standard web application to a progressive web application (PWA) Deploy an Angular app to Azure Static Web Apps Add GraphQL support to back-end and front-end using HotChocolate and Apollo Angular

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Feb 28, 2024
Length 804 pages
Edition : 6th Edition
Language : English
ISBN-13 : 9781805129936
Category :

Table of Contents

18 Chapters
Preface Chevron down icon Chevron up icon
Introducing ASP.NET and Angular Chevron down icon Chevron up icon
Getting Ready Chevron down icon Chevron up icon
Looking Around Chevron down icon Chevron up icon
Front-End and Back-End Interactions Chevron down icon Chevron up icon
Data Model with Entity Framework Core Chevron down icon Chevron up icon
Fetching and Displaying Data Chevron down icon Chevron up icon
Forms and Data Validation Chevron down icon Chevron up icon
Code Tweaks and Data Services Chevron down icon Chevron up icon
Back-End and Front-End Debugging Chevron down icon Chevron up icon
ASP.NET Core and Angular Unit Testing Chevron down icon Chevron up icon
Authentication and Authorization Chevron down icon Chevron up icon
Progressive Web Apps Chevron down icon Chevron up icon
Beyond REST – Web API with GraphQL Chevron down icon Chevron up icon
Real-Time Updates with SignalR Chevron down icon Chevron up icon
Windows, Linux, and Azure Deployment Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.