ASP.NET Core: Cloud-ready, Enterprise Web Application Development

Create fast, scalable, and high-performance applications with C# and ASP.NET Core

ASP.NET Core: Cloud-ready, Enterprise Web Application Development

This ebook is included in a Mapt subscription
Mugilan T. S. Ragupathi, Valerio De Sanctis, James Singleton

2 customer reviews
Create fast, scalable, and high-performance applications with C# and ASP.NET Core
$0.00
$68.00
$29.99p/m after trial
RRP $79.99
Subscription
eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781788296526
Paperback1083 pages

Book Description

ASP.NET Core is the new, open source, and cross-platform, web-application framework from Microsoft. ASP.NET Core MVC helps you build robust web applications using the Model-View-Controller design. This guide will help you in building applications that can be deployed on non-Windows platforms such as Linux.

Starting with an overview of the MVC pattern, you will quickly dive into the aspects that you need to know to get started with ASP.NET. You will learn about the core architecture of model, view, and control. Integrating your application with Bootstrap, validating user input, interacting with databases, and deploying your application are some of the things that you will learn to execute with this fast-paced guide. You will test your knowledge as you build a fully working sample application using the skills you’ve learned throughout the book.

Moving forward, this guide will teach you to combine the impressive capabilities of ASP.NET Core and Angular 2. Not only will you learn how Angular 2 can complement your .NET skills and toolkit, you'll also learn everything you need to build a complete, dynamic single-page application. Find out how to get your data model in place and manage an API, before styling and designing your frontend for an exceptional user experience. You will find out how to optimize your application for SEO, identify and secure vulnerabilities, and how to successfully deploy and maintain your application. From here, you will delve into the latest frameworks and software design patterns to improve your application performance.

The course offers premium, highly practical content on the recently released ASP.NET Core, and includes material from the following Packt books: Learning ASP.NET Core MVC Programming, ASP.NET Core and Angular 2, and ASP.NET Core 1.0 High Performance.

Table of Contents

Chapter 1: Introduction to ASP.NET Core
How web applications work
Client-side and server-side
HTTP methods
What is ASP.NET?
Features of ASP.NET MVC
ASP.NET 5
Summary
Chapter 2: Setting Up the Environment
Purpose of IDE
Visual Studio offerings
Installing Visual Studio Community
Installing ASP.NET 5
Project structure in ASP.NET 5 application
Summary
Chapter 3: Controllers
Role of the Controller in ASP.NET MVC applications
Introduction to routing
Creating ASP.NET 5 application
Installing the ASP.NET Core NuGet package in your application
Our first Controller
Adding Views
Adding Models
Passing data from Controller to View
Filters
Summary
Chapter 4: Views
The View engine and the Razor View engine
Layout
Generating HTML
Partial View
View components
Tag Helpers
Summary
Chapter 5: Models
Models
Model binding
The Entity Framework
Using the Entity Framework in ASP.NET MVC applications
Database migration
Summary
Chapter 6: Validation
Client-side and server-side validation
Server-side validation
Client-side validation
Implementation
Summary
Chapter 7: Routing
Convention-based routing
Attribute-based routing
Route attribute at the controller level
Passing routing values in HTTP action verbs in the Controller
Route Constraints
Summary
Chapter 8: Beautifying ASP.NET MVC Applications with Bootstrap
Knowing HTML and CSS
Bootstrap
Using Bootstrap in your ASP.NET MVC application
Installing with Bower
HTML doctype
Summary
Chapter 9: Deployment of ASP.NET Core Application
The project.json file
Microsoft Azure
Deploying the ASP.NET Core application in Azure
Deploying the ASP.NET Core web application in the Linux environment
Creating a new ASP.NET 5 project
Configuring the Nginx server
Summary
Chapter 10: Building HTTP-based Web Services Using ASP.NET Web API
HTTP basics
Dependency Injection
Summary
Chapter 11: Improving Performance of an ASP.NET Core Application
The UI layer
Reducing the number of HTTP requests
Minification of JavaScript and CSS files and their combination
The caching process
The web/application layer
Generic performance improvement tips
Summary
Chapter 12: ASP.NET Core Identity
Authentication
Authorization
Adding the relevant dependencies to the project.json file
Configuring the application to use Identity
Creating ViewModels
Creating Controllers and associated action methods
Creating Views
E-mail and SMS services
Securing an action method in a Controller
Summary
Chapter 13: Getting Ready
Two players  one goal
The field of choice – single-page application
A sample single-page application project
Preparing the workspace
First run
A faster alternative using scaffolding tools
References
Suggested topics
Summary
Chapter 14: ASP.NET Controllers and Server-Side Routes
Data flow
Our first Controller
Understanding routes
Dealing with single items
Suggested topics
Summary
Chapter 15: Angular 2 Components and Client-Side Routing
Master-detail binding
Adding additional lists
Two-way data binding
Client-side routing
Full routing test
Suggested topics
Summary
Chapter 16: The Data Model
Getting ready
Creating entities
Defining relationships
Setting up DbContext
Choosing the database engine
Creating the database
Implementing a data seed strategy
Seeding the database
Testing the data provider
Suggested topics
Summary
Chapter 17: Persisting Changes
Add, update, and delete items
Splitting the ItemDetail component
Suggested topics
Summary
Chapter 18: Applying Styles
How bad is it, doc?
Introducing LESS
Configuring LESS
DIY versus framework-based styling
Adding Bootstrap
Applying styles
Suggested topics
Summary
Chapter 19: Authentication and Authorization
Do we really need these?
Authentication
Authorization
Proprietary or third-party?
Choosing an authentication mode
Installing AspNetCore.Identity
Updating the database
Authentication methods
Implementing JSON web token authentication
Suggested topics
Summary
Chapter 20: Third-Party Authentication and External Providers
Introducing OpenID connect servers
Installing OpenIddict
External authentication providers
Conclusions
Suggested topics
Summary
Chapter 21: User Registration and Account Edit
User Registration
Edit Account
Conclusions
Suggested topics
Summary
Chapter 22: Finalization and Deployment
Switching to SQL Server
Installing SQL Server 2016 Express
Installing SQL Server Management Studio
Publishing our native web application
Configuring IIS
Firing up the engine
Suggested topics
Summary
Chapter 23: Why Performance Is a Feature
Performance as a feature
Common classes of performance problems
Understanding hardware
Tools and costs
The new .NET
Summary
Chapter 24: Measuring Performance Bottlenecks
Tools
Science
Summary
Chapter 25: Fixing Common Performance Problems
Latency
Asynchronous operations
Select N+1 problems
Pragmatic solutions with hardware
Oversized images
Summary
Chapter 26: Addressing Network Performance
Internet protocols
Compression
Caching
Summary
Chapter 27: Optimizing I/O Performance
Input/output
Solutions
Simulation and testing
Summary
Chapter 28: Understanding Code Execution and Asynchronous Operations
Getting started with the core projects
Data structures
Hashing and checksums
Serialization
SIMD CPU instructions
Parallel programming
Practices to avoid
Summary
Chapter 29: Learning Caching and Message Queuing
Why caching is hard
Message queuing
Summary
Chapter 30: The Downsides of Performance-Enhancing Tools
Managing complexity
A culture of high performance
The price of performance
Distributed debugging
Managing stale caches
Summary
Chapter 31: Monitoring Performance Regressions
Profiling and measurement
Testing
Staying alert
DevOps
Hosting
Summary
Chapter 32: The Way Ahead
Reviewing what we learned
Further reading
Library and framework support
The future
Summary

What You Will Learn

  • Get to know the concepts of ASP.NET MVC
  • Create a Controller with action methods
  • Build a view using several features of the Razor View engine
  • Construct a Model for ASP.NET Core MVC application
  • Find out how the features of ASP.NET Core and Angular 2 perfectly complement each other
  • Handle requests and actions using server-side and client-side Routing
  • Create a Data Model using Entity Framework Core
  • Learn how to use Angular 2 components and master directives
  • Improve performance at the network level and I/O level, and how to optimize the application as a whole
  • Monitor performance as part of Continuous Integration and regression testing

Authors

Table of Contents

Chapter 1: Introduction to ASP.NET Core
How web applications work
Client-side and server-side
HTTP methods
What is ASP.NET?
Features of ASP.NET MVC
ASP.NET 5
Summary
Chapter 2: Setting Up the Environment
Purpose of IDE
Visual Studio offerings
Installing Visual Studio Community
Installing ASP.NET 5
Project structure in ASP.NET 5 application
Summary
Chapter 3: Controllers
Role of the Controller in ASP.NET MVC applications
Introduction to routing
Creating ASP.NET 5 application
Installing the ASP.NET Core NuGet package in your application
Our first Controller
Adding Views
Adding Models
Passing data from Controller to View
Filters
Summary
Chapter 4: Views
The View engine and the Razor View engine
Layout
Generating HTML
Partial View
View components
Tag Helpers
Summary
Chapter 5: Models
Models
Model binding
The Entity Framework
Using the Entity Framework in ASP.NET MVC applications
Database migration
Summary
Chapter 6: Validation
Client-side and server-side validation
Server-side validation
Client-side validation
Implementation
Summary
Chapter 7: Routing
Convention-based routing
Attribute-based routing
Route attribute at the controller level
Passing routing values in HTTP action verbs in the Controller
Route Constraints
Summary
Chapter 8: Beautifying ASP.NET MVC Applications with Bootstrap
Knowing HTML and CSS
Bootstrap
Using Bootstrap in your ASP.NET MVC application
Installing with Bower
HTML doctype
Summary
Chapter 9: Deployment of ASP.NET Core Application
The project.json file
Microsoft Azure
Deploying the ASP.NET Core application in Azure
Deploying the ASP.NET Core web application in the Linux environment
Creating a new ASP.NET 5 project
Configuring the Nginx server
Summary
Chapter 10: Building HTTP-based Web Services Using ASP.NET Web API
HTTP basics
Dependency Injection
Summary
Chapter 11: Improving Performance of an ASP.NET Core Application
The UI layer
Reducing the number of HTTP requests
Minification of JavaScript and CSS files and their combination
The caching process
The web/application layer
Generic performance improvement tips
Summary
Chapter 12: ASP.NET Core Identity
Authentication
Authorization
Adding the relevant dependencies to the project.json file
Configuring the application to use Identity
Creating ViewModels
Creating Controllers and associated action methods
Creating Views
E-mail and SMS services
Securing an action method in a Controller
Summary
Chapter 13: Getting Ready
Two players  one goal
The field of choice – single-page application
A sample single-page application project
Preparing the workspace
First run
A faster alternative using scaffolding tools
References
Suggested topics
Summary
Chapter 14: ASP.NET Controllers and Server-Side Routes
Data flow
Our first Controller
Understanding routes
Dealing with single items
Suggested topics
Summary
Chapter 15: Angular 2 Components and Client-Side Routing
Master-detail binding
Adding additional lists
Two-way data binding
Client-side routing
Full routing test
Suggested topics
Summary
Chapter 16: The Data Model
Getting ready
Creating entities
Defining relationships
Setting up DbContext
Choosing the database engine
Creating the database
Implementing a data seed strategy
Seeding the database
Testing the data provider
Suggested topics
Summary
Chapter 17: Persisting Changes
Add, update, and delete items
Splitting the ItemDetail component
Suggested topics
Summary
Chapter 18: Applying Styles
How bad is it, doc?
Introducing LESS
Configuring LESS
DIY versus framework-based styling
Adding Bootstrap
Applying styles
Suggested topics
Summary
Chapter 19: Authentication and Authorization
Do we really need these?
Authentication
Authorization
Proprietary or third-party?
Choosing an authentication mode
Installing AspNetCore.Identity
Updating the database
Authentication methods
Implementing JSON web token authentication
Suggested topics
Summary
Chapter 20: Third-Party Authentication and External Providers
Introducing OpenID connect servers
Installing OpenIddict
External authentication providers
Conclusions
Suggested topics
Summary
Chapter 21: User Registration and Account Edit
User Registration
Edit Account
Conclusions
Suggested topics
Summary
Chapter 22: Finalization and Deployment
Switching to SQL Server
Installing SQL Server 2016 Express
Installing SQL Server Management Studio
Publishing our native web application
Configuring IIS
Firing up the engine
Suggested topics
Summary
Chapter 23: Why Performance Is a Feature
Performance as a feature
Common classes of performance problems
Understanding hardware
Tools and costs
The new .NET
Summary
Chapter 24: Measuring Performance Bottlenecks
Tools
Science
Summary
Chapter 25: Fixing Common Performance Problems
Latency
Asynchronous operations
Select N+1 problems
Pragmatic solutions with hardware
Oversized images
Summary
Chapter 26: Addressing Network Performance
Internet protocols
Compression
Caching
Summary
Chapter 27: Optimizing I/O Performance
Input/output
Solutions
Simulation and testing
Summary
Chapter 28: Understanding Code Execution and Asynchronous Operations
Getting started with the core projects
Data structures
Hashing and checksums
Serialization
SIMD CPU instructions
Parallel programming
Practices to avoid
Summary
Chapter 29: Learning Caching and Message Queuing
Why caching is hard
Message queuing
Summary
Chapter 30: The Downsides of Performance-Enhancing Tools
Managing complexity
A culture of high performance
The price of performance
Distributed debugging
Managing stale caches
Summary
Chapter 31: Monitoring Performance Regressions
Profiling and measurement
Testing
Staying alert
DevOps
Hosting
Summary
Chapter 32: The Way Ahead
Reviewing what we learned
Further reading
Library and framework support
The future
Summary

Book Details

ISBN 139781788296526
Paperback1083 pages
Read More
From 2 reviews

Read More Reviews