Course: Developing ASP.NET Core Web Application
In this course, professional web developers will learn to develop advanced ASP.NET Core MVC applications using .NET tools and technologies.
The focus will be on coding activities that improve the performance and scalability of the website application.
ASP.NET Core - Advanced Web Development - Programming with .NET Core - Visual Studio and ASP.NET - Intensive Web Development Course - Scalable and Secure Applications
Addressed to
This course is intended for professional web developers using Microsoft Visual Studio in an individual or team development environment, small to large. Candidates for this course are interested in developing advanced web applications and want to manage rendered HTML comprehensively. They want to create websites that separate the user interface, data access, and application logic. Server-side development will use the C# language and is an excellent follow-up course to our C# Programming course (M55339A). Client-side development will use JavaScript, CSS, and HTML5.
Training objectives
- Understand the Microsoft web technology stack and choose which technology to use when building an application.
- Design a web application that meets a set of business and functional requirements.
- Build a website using ASP.NET Core Razor Pages.
- Using middleware and dependency injection in ASP.NET Core MVC applications.
- Use controllers in an MVC application to manage user interaction, models, and views.
- Create web applications that use ASP.NET Core routing to provide a logical navigation hierarchy.
- Create views to display and edit data in an MVC application.
- Build MVC models that implement business logic within methods, properties, and events.
- Access a database from an ASP.NET Core application using Entity Framework Core.
- Design and create a consistent look and feel for a web application.
- Use JavaScript code to implement client-side logic to improve the responsiveness of an ASP.NET web application.
- Use a development toolchain to manage client-side packages.
- Create unit tests and use debugging tools for a web application in Visual Studio.
- Use authentication and authorization libraries to manage identity and allow users to access content securely.
- Design secure web applications that are protected against common attacks.
- Improve web application performance by implementing caching.
- Allow two-way asynchronous communication between client and server using SignalR.
- Add Web APIs to an application to support inter-application communication.
Course Content: Developing ASP.NET Core Web Applications
Module 1: Exploring ASP.NET Core
Microsoft ASP.NET Core web technologies can help you build and host dynamic, powerful, and extensible web applications. ASP.NET Core is an open-source, cross-platform framework built on .NET that enables you to build web applications. You can develop and run ASP.NET Core web applications on Windows, macOS, Linux, or any other platform that supports it. ASP.NET Core supports an agile, test-driven development cycle. It also lets you use the latest HTML standards and front-end frameworks like Angular, React, and more.
Lessons
Introducing Microsoft web technologies
- Introduction to Razor Pages in ASP.NET Core
- Introducing ASP.NET Core MVC
After completing this module, students will be able to:
- Understand the variety of technologies available in the Microsoft web stack.
- Describe the different programming models available to developers in ASP.NET.
- Describe the role of ASP.NET Core in the web technology stack and how to use ASP.NET Core to build web applications.
Module 2: Designing ASP.NET Core Web Applications
Microsoft ASP.NET Core is a programming model that you can use to build powerful and complex web applications. However, all complex development projects, and large projects in particular, can be challenging and intricate to fully understand. Without a complete understanding of a project's objectives, an effective solution to a customer's problem cannot be developed. You need to know how to identify a set of business needs and then make technological decisions and plan the web application to meet those needs. The planning phase reassures stakeholders that you understand their requirements and communicates the web application's functionality, user interface, structure, and data storage to developers.
Lessons
- Development methodologies
- Planning in the Project Design Phase
- Choosing between Razor Pages and MVC
- Design of models, controllers and views.
After completing this module, students will be able to:
- Plan the overall architecture of an ASP.NET Core MVC web application and consider aspects such as state management.
- Plan the models, controllers, and views needed to implement a given set of functional requirements.
Module 3: Using Razor Pages and Middleware
ASP.NET Core is a framework that allows us to build many types of applications. In this module, we'll first look at ASP.NET Razor Pages in more detail, as a quick way to build a web application that doesn't require the complexity of the MVC model. We'll then look at middleware, which has particular significance in the context of the ASP.NET Core request pipeline and potentially allows you to handle multiple separate requests in a completely different way and receive separate responses. You'll learn how to leverage the ASP.NET Core framework to handle requests and responses through existing and custom middleware, and how to configure services for use in middleware and in other parts of the application, such as controllers. We'll also look at Services: classes that expose functionality that you can then use in different parts of the application. This is achieved without having to manually track scope in each individual location or instantiate dependencies, by using Dependency Injection. Dependency injection is a technique used by ASP.NET Core that allows us to add dependencies to our code without having to worry about instantiating objects, keeping them in memory, or passing the necessary dependencies.
Lessons
- Using razor pages
- Configure the middleware
- Configure services
After completing this module, students will be able to:
- Create a simple web application using Razor Pages.
- Use existing middleware to configure an ASP.NET Core application.
- Understand the basic principles behind dependency injection and how it's used in ASP.NET Core.
Module 4: Driver Development
ASP.NET Core MVC is a framework for building web applications using the Model-View-Controller (MVC) architectural pattern. The Controller is essentially responsible for processing a web request by interacting with the Model and then passing the results to the View. The Model represents the business layer and can include data objects, application logic, and business rules. The View uses the data it receives from the Controller to produce the HTML or other output that is sent back to the browser. In this module, we will focus on developing Controllers, specialized classes that are fundamental to MVC applications. Understanding how Controllers work is crucial to being able to create the appropriate Model objects, manipulate them, and pass them to the appropriate Views. Controllers have several methods called "actions." When an MVC application receives a request, it determines which Controller and Action should handle the request. It determines this using Uniform Resource Locator (URL) routing; another very important concept necessary for developing MVC applications. We will also look at how to maximize code reuse in Controllers by writing action filters.
Lessons
- Writing controllers and actions
- Configure routes
- Writing action filters
After completing this module, students will be able to:
- Add a controller to a web application that responds to user actions specified in the project design.
- Add routes to the ASP.NET Core routing engine and ensure URLs are easy to use in an MVC web application.
- Write code in action filters that execute before or after a controller action.
Module 5: Developing Views
Views are one of the three main components of the Model-View-Controller (MVC) programming model. You define the user interface for your web application by creating views; a combination of HTML markup and C# code that runs on a web server. To create a view, you need to know how to write HTML markup and C# code and use the various helper classes built into MVC. You also need to know how to create partial views and view components, which represent sections of HTML that can be reused throughout your web application. We'll also take a closer look at Razor markup syntax for embedding .NET-based code in web pages.
Lessons
- Creating Views with Razor Syntax
- Using HTML Help and Tag Help
- Reusing code in views
After completing this module, students will be able to:
- Create an MVC view and add Razor markup to it to display data to users.
- Use HTML helpers and tag helpers in a view.
- Reuse Razor markup in multiple locations throughout an application.
Module 6: Model Development
Most web applications interact with various types of data or objects. An e-commerce application, for example, manages products, shopping carts, customers, and orders. A social networking application can help manage users, status updates, comments, photos, and videos. A blog is used to manage blog posts, comments, categories, and tags. When you write a Model-View-Controller (MVC) web application, you create an MVC model to model your web application's data. Within this model, you create a model class for each object type. The model class describes the properties of each object type and can include business logic that aligns with business processes. Therefore, the model is a fundamental component in an MVC application. We will also look at validating user input.
Lessons
- Creating MVC models
- Working with forms
- Validate user input
After completing this module, students will be able to:
- Add a model to an MVC application and write code in it to implement business logic.
- Use data annotations for visualization and editing.
- Validate user input with data annotations.
Module 7: Using Entity Framework Core in ASP.NET Core
Web applications often require a data store for dynamic information, for example, to create a web application that changes continuously in response to user input, administrative actions, and post events. The data store is typically a database, but other types of data stores are also used. In Model-View-Controller (MVC) applications, you can create a model that implements data access logic and business logic. Alternatively, you can separate business logic from data access logic by using a repository class that a controller can use to read from or write to an underlying data store. When you write an ASP.NET application, you can use Entity Framework Core (EF Core) and Language Integrated Query (LINQ) technologies, which make data access code very quick to write and easy to understand. In this module, you will see how to create a database-driven website in ASP.NET Core using Entity Framework.
Lessons
- Introduction to the Entity Framework core
- Working with Entity Framework Core
- Using Entity Framework Core Database Providers
After completing this module, students will be able to:
- Connect an application to a database to access and store data.
- Explain EF Core.
- Working with Entity Framework Core.
Module 8: Using Layouts, CSS, and JavaScript in ASP.NET Core
When building web applications, you must apply a consistent look and feel to the application. Typically, this would include consistent header and footer sections and navigation controls across all views. Microsoft ASP.NET Core uses special templates called layouts to achieve this, along with Cascading Style Sheets (CSS) to enhance the appearance and usability of your web application. You can also create interactive HTML elements using JavaScript to provide client-side code in your web application, along with client-side JavaScript libraries.
Lessons
- Use designs
- Using CSS
- Using JavaScript
After completing this module, students will be able to:
- Apply a consistent design to ASP.NET Core MVC applications.
- Add JavaScript code to your web application.
- Use CSS style sheets.
Module 9: Client-Side Development
When building an application, it is important to know how to develop both client-side and server-side code for the application. In this module, you will learn client-side tools that will allow you to create complex web applications at any scale, including using the Bootstrap CSS framework to style your web application. You will learn how to use Sass, a CSS preprocessor that adds code-like features such as variables, nested rules, and functions, which improve the maintainability of complex CSS stylesheets. You will learn responsive design principles that will allow you to adapt your web application based on the capabilities of the web browser or device using CSS media queries and how to use a responsive grid system. Next, you will learn how to configure the Gulp task runner and use it to compile Sass files during build and perform bundling and minification of CSS and JavaScript files, and how to set up a watcher task to automatically compile Sass files as you write your code. Finally, we'll introduce the Blazor framework for building interactive client-side web UIs with .NET.
Lessons
- Responsive web design
- Using front-end development tools
- Looking at ASP.NET Core Blazor
After completing this module, students will be able to:
- Use Bootstrap and SASS in a Microsoft ASP.NET Core application.
- Use front-end development tools.
- Ensure a web application displays correctly on devices with different screen sizes.
- Understanding ASP.NET Core Blazor applications.
Module 10: Testing and Troubleshooting
The software development process inevitably results in coding errors or bugs that cause exceptions, unexpected behavior, or incorrect results. To improve the quality of your web application and provide a good user experience, you must identify errors from any source and eliminate them. In traditional software development, testers perform the bulk of testing at the end of a development project. However, in recent years, it has become widely accepted that testing throughout the project lifecycle improves code quality and greatly reduces the number of bugs in production software. You must understand how to run tests on individual components to ensure they work as expected before assembling them into a complete web application. It is also important that you know how to handle exceptions when they occur and handle them correctly to provide appropriate feedback to the user, without leaking information about the application structure. Finally, by using application-wide logging, you can monitor user activities that could lead to unexpected problems and troubleshoot production issues by tracing flows through the application.
Lessons
- Testing Core ASP.NET Applications
- Implementing an exception handling strategy
- Registering ASP.NET Core Applications
After completing this module, students will be able to:
- Run unit tests to verify your code and locate potential errors.
- Create a Microsoft ASP.NET Core application that provides robust exception handling.
- In the application registration for your solutions.
Module 11: Security Management
Web applications are typically delivered through a web browser, over the public internet, to a large number of users. This means that security should always be a priority when building these applications because, in addition to legitimate users, the application will be exposed to malicious third parties. Users can have anonymous access or they can have a registered identity, and you must decide which users can perform which actions. Authentication is the act of establishing a user's identity, while authorization is the process by which an already authenticated user is granted access to specific actions or resources. By using authorization, you can prevent users from accessing sensitive material or information and resources intended for another user, or prevent them from performing certain actions. The costs of security breaches can be very high, leading to data loss, legal action, and reputational damage. Therefore, in the final section, we'll look at some specific malicious attacks, such as cross-site scripting and SQL injection, and how to defend against them.
Lessons
- Authentication in ASP.NET Core
- Authorization in ASP.NET Core
- Defending against common attacks
After completing this module, students will be able to:
- Add basic authentication to your app.
- Configure Microsoft ASP.NET Core identity.
- Add basic authorization to your app.
- Understand how security exploits work and how to best defend against them.
Module 12: Performance and Communication
Modern web applications must be able to quickly respond to a large number of user requests in a short period of time. Caching allows you to store common requests, avoiding the need to perform the same logic repeatedly. This provides the user with a fast response time and reduces the system resources used to carry out the action logic. By utilizing various forms of state management, you can build stateful applications on top of stateless web protocols, providing responses tailored to individual user contexts within the same application. Finally, SignalR is an easy-to-use two-way communications API that is an abstraction of several different web communications protocols. This allows you to create server-side logic to send content to browser-based web applications in real time.
Lessons
- Implementing a caching strategy
- Managing State
- Supporting two-way communication
After completing this module, students will be able to:
- Implement caching in a Microsoft ASP.NET Core application.
- Use state management technologies to improve the customer experience by providing a consistent user experience.
- Implement two-way communication using SignalR, allowing the server to notify the client when important events occur.
Module 13: Implementing Web APIs
Most web applications require integration with external systems. Representational State Transfer (REST) services help reduce application overhead and limit the amount of data transmitted between client and server systems using open standards. You need to know how to expose a web API that implements REST services in your ASP.NET application. You also need to know how to call a web API using both server-side and client-side code to consume external REST-style web APIs.
Lessons
- Introducing Web APIs
- Developing a web API
- Calling a Web API
After completing this module, students will be able to:
- Create services using ASP.NET Core Web API.
- Call a web API from server-side code.
- Call a web API from client-side code.
Prerequisites
This course is aimed at professional web developers, so it is recommended to have:
- Previous experience in web development with Microsoft technologies.
- Working knowledge of C#, since server-side development is done using this language.
- Familiarity with HTML5, CSS, and JavaScript for client-side development.
- Experience using Microsoft Visual Studio in individual or team environments.
- Ideal as a continuation of course 55339A - Programming in C#.
Language
- Course: English
- Labs: English