Q&A: Philip Japikse on Hands-On with ASP.NET Core and EF Core
'I think ASP.NET Core is the biggest game changer in the history of Web development using the Microsoft stack.'
With 30 years of development experience, Philip Japikse, an international speaker, author and passionate member of the developer community, is slated for several presentations at the upcoming Visual Studio Live! conference in Boston in June, including a full-day hands-on lab in which developers will create a fully functioning ASP.NET Core 2 and EF Core app in one session.
With his extensive knowledge of the .NET ecosystem -- he has worked with .NET since its first betas -- we recently caught up with Philip to learn more about ASP.NET Core and .NET Core.
What is the difference -- if any -- between ASP.NET Core and .NET Core?
ASP.NET Core is a development framework, while .NET Core is the platform that ASP.NET Core runs on top of. Think of the relationship between ASP.NET MVC (or ASP.NET Web API 2.2) and the full .NET Framework.
Digging into the details, what is commonly referred to as the .NET Core framework is really composed of two main parts:
- The runtime (called CoreCLR), which provides the type system, assembly loading, garbage collections, native interop, and basic framework services.
- The framework libraries (called CoreFX), which provides app composition and fundamental utilities.
In addition to the CoreCLR and CoreFX, there is also a set of SDK tools, language compilers, an application host, and a set of command-line interface (CLI) utilities.
ASP.NET Core is a workload that sits on top of the .NET Core Framework. Unlike its predecessors (ASP.NET MVC, ASP.NET Web API and so on), it's a unified platform for building:
- MVC style Web applications
- RESTful services using the WebAPI
- Pages-based UIs using Razor Pages
How big of a game changer is ASP.NET Core for .NET developers?
I think it's the biggest game changer in the history of Web development using the Microsoft stack.
While there are evolutionary changes in ASP.NET Core (such as Tag Helpers and View Components), the fact that ASP.NET Core (and .NET Core) is truly cross platform changes the game completely.
"While there are evolutionary changes in ASP.NET Core (such as Tag Helpers and View Components), the fact that ASP.NET Core (and .NET Core) is truly cross platform changes the game completely."
Philip Japikse, Developer, Coach, Author, Teacher, Microsoft MVP, MCSD, CSM and CSP
Microsoft developers are no longer restricted to running their applications on Windows Server, but can essentially run anywhere. This brings in a myriad of options for deployment targets, including popular containers (like Docker) and lower cost (than Windows) Linux distros.
This also opens up .NET as a viable option in those organizations that require development tools to run cross platform. In the past, .NET developers were shut out from those opportunities since Java was the only large-scale enterprise toolset that could "check the box" regarding running cross platform.
What is your personal favorite feature of ASP.NET Core 2?
This is hard to narrow down, as so much has changed for the better. There are massive improvements in the configuration system, simplified control of the pipeline and middleware components (like URL rewriting), and support for Docker and other container technologies to name a few. But from an application developer's perspective, I would have to narrow it down to Tag Helpers and View Components. Tag Helpers enable us to stay in the markup without adding code constructs that will add friction to HTML centric team members (like designers or accessibility experts), and View Components marry Child Actions with Partial Views for true encapsulation, promoting cleaner reuse of common components of your application.
Same for EF Core 2 -- What is your personal favorite feature?
Just like ASP.NET Core, this it a tough question. There is so much that I prefer in EF Core over EF 6 that I have been moving all of my customers over to EF Core in a blended approach. EF Core performs exponentially better than EF 6, so that has to be near the top of the list. Again, from a developers perspective, I think I will narrow it down to model level query filters, the overhaul of the migration system, and raw SQL queries composed with LINQ.
What three features of ASP.NET Core should every developer be aware of?
If you exclude the changes to middleware and pipeline configuration and focus strictly on the developer of the Models, Views and Controllers, than I would say (in no particular order):
- Integrated dependency injection
- Tag Helpers
- View Components
I want to qualify that answer, though, because there is so much added hotness in ASP.NET Core that limiting me to three choices if like having to choose my favorite child -- I love them all.
Any "gotchas" you've discovered when working with ASP.NET Core 2?
Well, the biggest "gotcha" is the fact that there isn't a migration path from ASP.NET MVC to ASP.NET Core. Unlike MVC and WebForms, where you could use them together (as in the One ASP.NET campaign that Microsoft executed not too long ago), moving from ASP.NET MVC to ASP.NET Core needs to done in a very deliberate and planned manner.
One of your session as Visual Studio Live! Boston is a full-day hands on lab where you build a ASP.NET application in a day. Can you tell us more about that application and what attendees will achieve?
Certainly! We will be building the (fake) SpyStore eCommerce application. This is using the data from the old IBuySpy sample application from .NET 1.1 days. We start by building the data access layer using Entity Framework Core 2, then build and ASP.NET Core Web application. While we can't cover every single feature of EF Core and ASP.NET Core in one day, we cover a lot of them.
What else about these two programs would you like to share with Visual Studio Magazine readers?
If you aren't upgrading your skills to .NET Core, then you are going to miss out on the next revolution for .NET developers. Likewise, if you aren't looking at your application and project portfolios and looking at where .NET Core and ASP.NET Core fit, your organization is going to miss out on the huge performance gains in the platform as well as the potential cost savings from cross platform deployments as well as containerization.
Want more? Check out Philip's sessions at Visual Studio Live! Boston as well as all the rest of the great content at the show!