- [Instructor] Before we get into the course, let me first tell you about this sample application that I'll be building and how it's going to look when we're done. Go try it yourself. Go to explorecalifornia.org. This is the current site live on the internet. It's a fictional site called Explore California. You'll find the full static HTML and CSS content for this site in your courseware. If I click around a bit, you can get a feel for the site and how it's laid out. Throughout this course I'll be converting this static HTML site into a dynamic application using ASP.NET Core MVC.
However, the part that I'll be focusing on will be the blog section of the site; a section that is currently not implemented at all on the live site. Here's what the application will look like when we're all done. The blog section starts with a landing page that shows the latest couple of posts, which I can page through and click on each one to navigate to its own page. When you view each post on its own page, there's an additional section at the bottom that pulls in comments for that post via an AJAX callback to the server.
The other thing to note about this page and the entire site are the nice, clean URLs. Rather than saying something like posts/post/123, which is the default behavior that ASP.NET Core MVC offers, the path to the post is /blog/the year and the month, then the title of the post. Not only is this more readable and user-friendly, it's also a significant help in boosting search engine rankings, since the URL of the page is one of the most important factors in search engine optimization.
And finally, we need a way to create new posts. We're not going to allow just any anonymous user to post content on the site, of course. Folks who want to post content will need to log in first using the Login button at the top of the page. This site also contains a link to allow users to register for an account. Even though I will show you how to use identity services to implement all of that in this course, I'll skip that part for right now and just log in with an account that I've already created before recording.
Once I'm logged in, I can author new blog posts and see them show up on the main blog page. And that's it. A fully functioning blog application. Now, you may be thinking that a blog site is nowhere near as complex as the applications you'll be building with ASP.NET Core MVC, but, in fact, it's just complex enough to show all of the building blocks of any ASP.NET Core MVC application that you'll build. To be more specific, using just this simple application, I'll be able to teach you how to create a new ASP.NET Core web applications project and add the ASP.NET Core MVC framework to that project.
I'll show you how to secure the site by allowing users to register and log in with their own accounts. I'll show you how to save and retrieve data to and from a database. I'll do all this by applying industry standard patterns and practices such as dependency injection and the MVC pattern to create loosely coupled applications that separate application logic from view logic. I'll also render dynamic views and modular UI components, expose data as a JSON Web API, fully customize all of the site's URLs, and even implement AJAX techniques such as partial rendering.
With such a long list of use cases, hopefully you'll agree that this simple blog actually makes a great choice as a sample application because I won't have to waste your time explaining complex application logic just to demonstrate the same framework APIs that I'll be showing in this course.
- Building blocks of ASP.NET Core applications
- Creating a new project
- Responding to HTTP requests
- Serving static files
- Understanding the MVC pattern
- Handling requests with controllers
- Rendering HTML with Razor
- Rendering data, view markup, and view logic
- Creating HTML forms
- Validating form data
- Reading and writing from a database with Entity Framework
- Improving the user experience
- Exposing data with a web API
- Securing your ASP.NET application