New book: Programming ASP.NET Core

We’re pleased to announce the availability of Programming ASP.NET Core (ISBN 9781509304417), by Dino Esposito.

Purchase from these online retailers:

Microsoft Press Store Amazon Barnes & Noble Independent booksellers – Shop local

Overview

The complete, pragmatic guide to building high-value solutions with ASP.NET Core

Programming ASP.NET Core is the definitive guide to practical web-based application development with Microsoft’s new ASP.NET Core framework. Microsoft MVP Dino Esposito introduces proven techniques and well-crafted example code for solving real problems with ASP.NET Core. Step by step, he guides you through using all key ASP.NET Core technologies, including MVC for HTML generation, .NET Core, EF Core, ASP.NET Identity, dependency injection, and much more. Esposito thoroughly covers ASP.NET Core’s cross-platform capabilities and what’s changed from older ASP.NET versions, but he doesn’t stop there: he offers a complete learning path for every developer who wants to build production solutions, including mobile-specific solutions.

Microsoft MVP Dino Esposito shows how to:
• Create new projects and understand their structure
• Set up and use the familiar MVC application model in ASP.NET Core
• Write controller class code to govern all stages of request processing
• Serve HTML from controllers, or directly via Razor Pages
• Master the Razor language for quickly defining the layout of HTML views
• Manage cross-cutting concerns such as global configuration data, error and exception handling, controller class design, and dependency injection
• Secure applications with user authentication and ASP.NET Core’s policy-based user authorization API
• Design for efficient data access, and choose the right option for reading and writing data
• Build ASP.NET Core Web APIs that return JSON, XML, or other data
• Use data binding to programmatically update visual components with fresh information
• Build device-friendly web views for iOS and Android
• Explore the radically new ASP.NET Core runtime environment and Dependency Injection (DI) infrastructure

Contents at a glance

PART I THE NEW ASP.NET AT A GLANCE
CHAPTER 1 Why Another ASP.NET?
CHAPTER 2 The First ASP.NET Core Project
PART II THE ASP.NET MVC APPLICATION MODEL
CHAPTER 3 Bootstrapping ASP.NET MVC
CHAPTER 4 ASP.NET MVC Controllers
CHAPTER 5 ASP.NET MVC Views
CHAPTER 6 The Razor Syntax
PART III CROSS-CUTTING CONCERNS
CHAPTER 7 Design Considerations
CHAPTER 8 Securing the Application
CHAPTER 9 Access to Application Data
PART IV FRONTEND
CHAPTER 10 Designing a Web API
CHAPTER 11 Posting Data from the Client Side
CHAPTER 12 Client-side Data Binding
CHAPTER 13 Building Device-friendly Views
PART V THE ASP.NET CORE ECOSYSTEM
CHAPTER 14 The ASP.NET Core Runtime Environment
CHAPTER 15 Deploying an ASP.NET Core Application
CHAPTER 16 Migration and Adoption Strategies

Introduction

“We need men who can dream of things that never were, and ask why not.”
—President John F. Kennedy, Speech to the Irish Parliament, June 1963

Some aspects of the ASP.NET Core story remind me of the beginning of the ASP.NET adventure more than 15 years ago. A very young Scott Guthrie—now a Microsoft VP—presented a new thing called ASP+ to a small audience of web developers in London in the fall of 1999. Those were the days of Active Server Pages, and ASP+ was trying to introduce a new syntax for moving the VBScript code back to the server and express it through a compiled language. ASP+ was a real breakthrough.

At the time of the presentation, there was no public awareness of the .NET thing yet, which would not be publicly disclosed until the following summer. The demos Scott showed, including a jaw-dropping Web Service example, were coming out of a standalone runtime environment based on a custom worker process—a console application— capable of listening on the port 80. The first demos used plain Visual Basic and C++ code against the Win32 API. In a short time, the whole ASP+ thing was quickly consumed by the new .NET Framework and eventually became ASP.NET.

ASP.NET Core, too, was first presented as a new standalone framework rewritten from scratch to take the Microsoft web stack to another level of scalability and performance. However, in doing so, the team glimpsed the enticing opportunity to make the ASP.NET Core framework available on multiple platforms. To achieve that goal, a subset of the .NET Framework had to be made available on target platforms, and this meant a new .NET Framework had to be created. And, in the end, this is just what happened.

For too long, ASP.NET Core was a moving target and the mechanics moving the target were not clear to anyone, and they weren’t always communicated timely and effectively. Twenty years ago, we (thankfully?) lacked the instant sharing attitude that social media imposes today. Also, ASP+ probably was a moving target, but nobody outside Microsoft—and the people directly involved—ever knew about that.

While the pillars of the ASP.NET and ASP.NET Core stories might be seen as being the same, runtime conditions are fairly different. The web before ASP.NET was a web in its infancy, with limited availability of scalable server-side technologies and without scalability itself being the serious issue it is today. At the same time, a great many applications were potentially ready to be rewritten for the web, and they were just awaiting a reliable platform from a reliable vendor.

Today, many frameworks exist today that could be used instead of ASP.NET Core. However, ASP.NET Core is not just frontend; ASP.NET Core is also backend, Web API, and small and compact web (containerized) monoliths to be deployed standalone or within a service fabric. ASP.NET Core also can be used on multiple hardware/software platforms.

It’s really hard to say whether ASP.NET Core is a must in the near future—or even at present—of every company and team. For sure, ASP.NET Core is the natural follow up for ASP.NET developers and the incarnation of another full-stack solution for web development on a variety of platforms.

Who should read this book

This book is not for absolute beginners, at least not in the sense of newbies without at least a superficial understanding of web development. It is tailor-made for existing ASP.NET developers especially those with an MVC background. At the same time, this book is a good fi t for expert web developers, especially those with an MVC background but who are new to ASP.NET. Even though ASP.NET Core is brand-new, it does have a lot of common points with ASP.NET MVC (and to a much less extent, Web Forms).

If you’re on the Microsoft stack, or if you are considering moving there, ASP.NET Core offers an excellent choice for the entire stack, including a tight connection with the Azure cloud.

Assumptions

This book expects that you have at least a minimal understanding of web development—preferably matured—but not necessarily, on the Microsoft stack.

This might not be for you if...

If you’re an absolute newbie to web programming who has never heard about ASP.NET and you’re subsequently looking for a step-by-step guide to ASP.NET Core, this book might not be ideal.

About the author

Dino Esposito is a digital strategist at BaxEnergy who has authored more than 20 books and 1,000 articles to date. His programming career has so far spanned 25 years. It is commonly recognized that his books and articles helped the professional growth of thousands of .NET developers and architects worldwide. Dino started back in 1992 as a C developer and witnessed the debut of .NET, the rise and fall of Silverlight and the ups and downs of various architectural patterns. He now looks ahead to Artificial Intelligence 2.0 and Blockchain and is the author of “The Sabbatical Break”, a theatrical-style work to travel the uncontaminated spaces of imagination hyperlinking software, literature, science, sport, technology, art. Get in touch at:

https://youbiquitous.net https://twitter.com/despos https://instagram.com/desposofficial https://facebook.com/desposofficial