Q&A

Advanced ASP.NET Core

While many development conferences feature introductory sessions on various topics, more advanced tutorials are comparatively rare.

Going beyond the many "hello world" presentations out there, expert developer and presenter Chris Klug specializes in sharing his higher-level knowledge on topics that include one of his favorites: Microsoft's ASP.NET Core framework for web development.

He's going to do just that in November at the Visual Studio Live! developer conference in Orlando, part of the big umbrella conference, Live! 360.

"Instead of covering the basics of how to get up and running, this talk will have a look at some of the more ... how to put it ... complex areas of ASP.NET Core," Klug said. "Instead of looking at how you build a basic Hello World website, it looks at things like building custom middlewares and model binders, how we can do URL rewriting and run background tasks."

Attendees will get no introduction to ASP.NET Core or "this template includes ..." discussion, but rather will quickly jump right into the deep end to expand their knowledge of some of the more advanced abilities built into the framework.

Specifically, they are promised to learn:

  • That there is more to ASP.NET Core than MVC
  • The extension points we can use to build better or simpler solutions
  • To see something out of the ordinary

We caught up with Klug to learn more about his session, which is titled "ASP.NET Core Beyond the Basics."

VisualStudioMagazine: With many "getting started" talks on ASP.NET Core already available, what inspired you to delve deeper into its more complex areas and provide this higher-level insight?
Klug: I just found that there were a lot of these introductory talks, which I do a lot of myself to be honest, but very few deep dive sessions on common technologies like ASP.NET Core. And as an experienced developer, that means that it can be a bit hard to pick up some really good new information when attending conferences. So, I thought that these people might be interested in a deeper look at the technology that they are working with.

Many developers might be acquainted with the basics, such as MVC in the ASP.NET Core framework. But you mentioned that there's more to it than just MVC. Can you shed some light on what participants might discover beyond this standard approach?
Yeah, so, most developers look at ASP.NET Core as just ASP.NET MVC. However, it is actually a framework that can do a lot of things.

"Most developers look at ASP.NET Core as just ASP.NET MVC. However, it is actually a framework that can do a lot of things."

Chris Klug, Developer, Active Solution

You can for example create background services that run parallel to your web application. You can load and execute code during start up. You can manipulate incoming requests, and create responses, using middlewares. Being able to respond to requests using an MVC controller and a view is just a part of what you can do. An important part, but still just a part.

Inside the Session

What: ASP.NET Core Beyond the Basics

When: Nov. 15, 4 p.m. - 5:15 p.m.

Who: Chris Klug, Developer, Active Solution

Why: There are plenty of introductory courses to be found, so this is for advanced-level developers eager to learn what they might not know now.

Find out more about Visual Studio Live!, taking place Nov. 12-17 in Orlando

Two topics you'll cover include building custom middlewares and model binders. Can you give us a teaser on the significance of mastering these elements and how they might impact the performance and functionality of a web application?
So, being able to plug into the request pipeline by building middlewares gives you a whole lot of power. There is so much you can accomplish by doing this, that can be hard to do in other ways. And with HttpContext being read/write in .NET Core, you can do some really interesting things.

As for the model binding, it is a bit more specific to some scenarios. But you can for example send more complex data from the client, and have it aggregated and presented as a custom model in ways that regular model binding cannot do. Something that can be really helpful in some scenarios.

With a focus on extension points and building more robust solutions, could you provide an example of a situation where utilizing an extension point in ASP.NET Core led to a significant improvement in the development process or application performance?
For this, I'll come back to the middlewares again, since I think that is the most obvious and powerful extension point. As a middleware can read and manipulate any request coming in or going back to the client, it can do so many things. It can handle custom authentication scenarios. Path re-writes. Reverse-proxying of certain paths. And so much more. An example that I use it for is the ability to reverse-proxy front-end applications during development. That means that during development I can run my ASP.NET application, and API as usual, but serve up the React of Angular front-end by proxying those calls to the Webpack server that those frameworks use during development. This means that I can sit and actively work on the front-end without having to restart the application whenever I have made a change. This makes the development cycle a lot faster for me. And in production, we package up the application and serve it from the wwwroot folder as usual. This would have been really hard to handle without middlewares (and Yarp).

What are some of the new or upcoming features or improvements in ASP.NET Core that you are most excited about, and how do they enhance your development experience or performance?
It's not really an ASP.NET thing, but I really like the way that they have made Project Orleans slot into ASP.NET Core by building it on top of IHost. And even if that isn't really an ASP.NET thing as such, it does allow us to run Project Orleans silos inside of our ASP.NET application and utilize the actor pattern model in our web applications. This is something that I think can open up a lot of really interesting capabilities.

Note: Those wishing to attend the conference can save hundreds of dollars by registering early, according to the event's pricing page. "Save up to $400 if you register by September 22!" said the organizer of the event, which is presented by the parent company of Visual Studio Magazine.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube