ASP.NET Core

ASP.NET Core

Episode Twenty Two

ASP.NET Core is the open-source cross-platform framework for building web applications and services with .NET and C#

Intro

I'm Peter and this is the RoguePlanetoid Podcast where you will find insights about Microsoft or related platforms and technology, along with so much more whether you are beginner or an experienced professional or just interested in technology. Keep Current, Keep Coding!

Welcome

Welcome to episode twenty-two of the RoguePlanetoid Podcast about ASP.NET Core. ASP.NET Core is the open-source cross-platform framework for building web applications and services with .NET and C#. Windows desktop or mobile development has been my passion since the beginning of .NET with .NET Framework but ASP.NET has been my profession for almost as long.

My first experience using ASP.NET was around 2006 when I took on a Classic ASP website that I later ported to ASP.NET Web Forms, which is an older technology from .NET Framework combining HTML, client scripts, server controls and server code to define the behaviour and look-and-feel of pages for a website. I used ASP.NET WebForms in a couple of roles before moving on to using ASP.NET MVC but still with .NET Framework. MVC or Model-View-Controller featured Models for the values to be used on a webpage that would be displayed in Views written in Razor along with Controllers written in C# to deliver the models to the views and implement any behaviour. I've more recently been in roles using ASP.NET Core itself using the most modern version of .NET to create web applications and microservices which is something I'm doing to this day. If you want to find out more about ASP.NET Core, then you can visit asp.net or check out the link in the show notes.

Blazor

ASP.NET Core allows developers to create full-stack web applications and services with .NET and C# with Blazor. Developers can host flexible and reusable Blazor components written in Razor that run in any web browser on WebAssembly, in native client applications or server-side in ASP.NET Core. When running Blazor Server applications the C# code is run on the server using ASP.NET Core and when a user interacts with a web application, events are sent to the server using a SignalR connection, which handles real-time communication between the client and server which processes events and sends any updated user interface to the client, which allows for smooth and responsive updates to the web application.

Blazor Server with ASP.NET Core also allows developers to keep all their critical business logic and code server-side so there's no code being executed in the browser like there would be with Blazor Client applications using WebAssembly, this means code can be more complex along with keeping any critical business code secret plus it is possible to take advantage of other features of ASP.NET Core such as middleware and authentication. Developers will need a web server capable of hosting an ASP.NET Core application which is not limited to just Windows but can also run on Linux, macOS and Docker along with cloud platforms such as Microsoft Azure.

Blazor enables developers to create beautiful web applications faster with HTML, CSS and C# that not only can be run on the client but also can be run on the server using ASP.NET Core to deliver great web experiences to users. If you want to hear more about Blazor then you can listen to the episode of the RoguePlanetoid Podcast on Blazor wherever you are listening to this podcast, or you can visit blazor.net to learn how to build web apps with Blazor or check out the links in the show notes.

APIs

ASP.NET Core allows developers to build secure REST APIs on any platform with C#. REST APIs or Representational State Transfer APIs are built around resources identified with URLs, they can support common HTTP methods including GET to retrieve data, POST to create data, PUT to update data and DELETE to remove data. REST APIs are stateless so that each request from client to the server contains all the information needed to process any requests, any responses are often formatted using JSON or JavaScript Object Notation which is a lightweight data interchange format.

ASP.NET Core can be used by developers to build services using REST APIs that reach a broad range of clients that include browsers, mobile devices and desktop applications. ASP.NET Core is designed for developing modern web experiences where you can use the same framework and patterns to build web pages with Blazor and Razor as the services in ASP.NET Core. APIs built using ASP.NET Core perform faster than any popular web framework such as Node.js in independent benchmarks. Developers can even integrate ASP.NET Core Web APIs into Power Apps where anyone can build professional line of business applications with low code that can leverage custom logic delivered using an ASP.NET Core Web API.

ASP.NET Core enables developers to extend functionality with dependency injection to implement services or integrate third-party functionality, along with being able to leverage built-in functionality to create secure endpoints with first class support for HTTPs, where you can generate test certificates to easily create, run and debug ASP.NET Core applications securely. ASP.NET Core also supports industry standard JSON Web Tokens or JWT pronounced JOT, combined with policy-based authorisation to define powerful access control rules using code. ASP.NET Core developers can also take advantage of support for OpenAPI functionality to generate comprehensive API documentation making it easier to test and validate your APIs.

ASP.NET Core supports controllers which can handle HTTP requests and return an appropriate response in a Model-View-Controller based web application, and Razor pages like those used in Blazor. ASP.NET Core also supports Minimal APIs which support simple serialisation to JSON without any special configuration, and you can define routes for your API endpoints along with HTTP verbs in-line with your code using attributes, plus data from request path, query string and request body can be automatically bound to any method parameters to handle any requests. You can read about Minimal APIs in the book Minimal APIs in ASP.NET 9 by Nick Proud available from January 2025 from Amazon.co.uk or check out the link in the show notes.

Features

ASP.NET Core is a modular framework where you can leverage the functionality and components you need as well as supporting a middleware pipeline, which handles all requests and responses which can be customised to give complete control over how requests are processed, so you can customise the pipeline to suit any requirements such as logging or error handling. You can also integrate with other popular front-end frameworks making it even easier to build full-stack web applications. There is a rich and vibrant community along with a rich ecosystem of libraries that can be used to create modern and flexible applications using ASP.NET Core, that enable you to focus on the functionality that you need or that is unique to your application without having to reimplement anything where you can leverage any existing functionality.

ASP.NET Core also features real-time bi-directional communication between server and client with SignalR, used by Blazor Server, where modern applications can deliver up-to-date information without needing to refresh manually to support real-time functionality. You can perform high-frequency updates from the server such as those needed by real-time gaming, and it is an open-source protocol allowing for many kinds of clients outside of .NET to be able to communicate with applications using SignalR, leveraging WebSockets when it is available but also gracefully falling back to other technologies when WebSockets isn't available, all while keeping application code the same.

Developers can also create independently deployable and highly scalable applications with microservices in ASP.NET Core, microservices are comprised of small independent modules that communicate with each other, with each microservice being able to focus on a single concept. By using microservices they are easier to develop and test as well as being able to be scaled independently as needed by parts of your application, plus they can be bundled or deployed using Docker containers.

Developers can create web applications and web services with ASP.NET Core easily by installing the .NET SDK along with Visual Studio Code on Windows, Mac or Linux to create web applications. Developers on Windows can use Visual Studio with the ASP.NET and Web development workload to create ASP.NET Core Web Apps with Razor pages, or Model-View-Controller projects along with ASP.NET Core Web API projects for creating minimal APIs. Developers can learn how to use ASP.NET Core to create web applications and services that are fast, secure, cross-platform and cloud-based with tutorials, sample code, documentation and more at learn.microsoft.com/aspnet or check out the link in the show notes.

Conclusion

ASP.NET Core is the cross-platform, open-source framework for building web applications and services with .NET and C# or create REST APIs for a broad range of range of clients that can leverage built-in functionality or take advantage of the vast array of additional functionality that can be used by applications, all while building them with security and performance in mind along with taking advantage of features such as SignalR and others to create the modern web applications developers need.

I've been working with ASP.NET and ASP.NET Core for many years and have used it to create fully featured websites enabling hundreds of customers to buy or sell items online, managing and delivering content for digital displays and screens where I combined desktop and web technologies, creating whole end-to-end websites, building microservices, and providing the APIs for web-based and other devices. ASP.NET has always been a powerful tool for creating web applications which has modernised over the years and improved with ASP.NET Core to deliver the experiences you need, whether you're a small-scale business or a large enterprise, the possibilities are endless to empower developers to create any web service, web site or API using ASP.NET Core.

Outro

Thanks for listening to the RoguePlanetoid Podcast where each episode you will find insights about Microsoft or related platforms and technology, along with so much more wherever you listen to your podcasts or at rogueplanetoid.com/podcasts for the RoguePlanetoid Podcast whether you are a beginner or an experienced professional or just interested in technology. Keep Current, Keep Coding!

RoguePlanetoid Podcast is a production of cluarantonn.com

Hosted, Written, Produced and Edited by Peter Bull

Music based on Like a Tiger by Jo Wandrini

Production Company Name by Granny Robertson