Cover
Title Page
Copyright
About the Author
About the Technical Editor
Credits
Acknowledgments
Contents
Foreword
Introduction
Why Web Development Requires Polyglot Developers
The Right Tool for the Job
Cross Pollination
Growing Your Comfort Zone
Who This Book is for
What This Book Covers
How This Book is Structured
What you Need to use This Book
Conventions
Source Code
Errata
Chapter 1: What’s New in ASP.NET Core MVC
Getting the Names Right
ASP.NET Core
.NET Core
Visual Studio Code
Visual Studio 2017
Versions Covered in this Book
A Brief History of the Microsoft .NET Web Stack
ASP.NET Web Forms
ASP.NET MVC
ASP.NET Web API
OWIN and Katana
The Emergence of ASP.NET Core and .NET Core
.NET Core
Getting Started with .NET Core
The dotnet Command Line
Introducing ASP.NET Core
Overview of the New ASP.NET Core Web Application Project
Owin
OWIN Layers
OWIN Communication Interface
A Better Look at Middleware
Anatomy of an ASP.NET Core Application
Host Builder Console Application
ASP.NET Core Startup Class
New Fundamental Features of ASP.NET Core
Environments
Dependency Injection
What Is Dependency Injection?
Using Dependency Injection in ASP.NET Core
Logging
Logger Instantiation
Writing Log Messages
Additional Logging Configuration
Configuration
Setting Up the Configuration Sources
Reading Values from Configuration
Using Strongly-Typed Configuration
An Overview of Some ASP.NET Core Middleware
Diagnostics
Serving Static Files
Application Frameworks
ASP.NET Core MVC
Using the MVC Framework inside ASP.NET Core
Using Dependency Injection in Controllers
View Components
Tag Helpers
Using Tag Helpers from ASP.NET Core
Writing Custom Tag Helpers
View Components as Tag Helpers
Web API
Summary
Chapter 2: The Front-End Developer Toolset
Additional Languages You Have to Know
Node.js
JSON
Sass and Less
The Future of JavaScript
TypeScript
JavaScript Frameworks
Angular
Knockout
React
jQuery
CSS Frameworks
Bootstrap
Primer CSS
Material Design Lite
Semantic UI
Package Managers
NuGet
Bower
NPM
The Folder Structure
Task Runners
Summary
Chapter 3: Angular in a Nutshell
Angular Concepts
The Language of Angular
Setting Up an Angular Project
Using an Online Editor
Starting from the Quickstart Seed
Using the Angular-CLI Tool
The Structure of an Angular App
Application Entry Point
Root Module
Root Component
Main HTML Page
Data Binding
Interpolation
One-Way Binding
Event binding
Two-Way Binding
Directives
Services and Dependecy Injection
Multiple Components
Input and Output Properties
Talking to the Back End
Using the Http Module
Consuming the RxJS Observable
Subscribing to the Observable
Using the async Pipe
Using Promises
Using Angular with ASP.NET MVC
Combining Angular and ASP.NET Core Projects
Keeping Angular and ASP.NET Core as Two Separate projects
Combining Angular and ASP.NET Core into One Project Using the Angular CLI
Using JavaScriptServices
Deciding Which Integration Method to Use
Visual Studio 2017 Support for Angular
Code Snippets
IntelliSense in TypeScript Files
IntelliSense in HTML Files
Summary
Chapter 4: Bootstrap in a Nutshell
Introduction to Bootstrap
Installing Bootstrap
The Main Features
Bootstrap Styles
Grid System
Typography
Tables
Forms
Buttons
Components
Glyphicons
Dropdown
Input Groups
Navigation
Navigation Bar
Pagination
Breadcrumbs
Tabs and Pills
Other Components
JavaScript
Tabbed Content
Activating Tab Navigation with JavaScript
Activating Tab Navigation with Data Attributes
Modal Dialog
Tooltips and Popovers
Customizing Bootstrap with Less
Customizing via the Website
Customizing with LESS
Bootstrap Support in Visual Studio 2017 and ASP.NET Core
Bootstrap Snippet Pack
Glyphfriend
Tag Helpers for ASP.NET Core
Summary
Chapter 5: Managing Dependencies with NuGet and Bower
General Concepts
NuGet
Getting Packages via NuGet
Using the Package Manager GUI
Using the Package Manager Console
Manually Editing the .csproj Project File
What Happens Once You Install a Package
Publishing Your Own Packages
Adding Metadata for the Package
Creating the Package
Publishing to the Nuget.org Gallery
NPM (Node.js Package Manager)
Installing NPM
NPM Usage
Using the NPM Command Line
Using NPM within Visual Studio
Where Packages Are Installed
Bower
Installing Bower
Getting Packages with Bower
Using the Bower Command Line
Using the Bower Package Manager GUI in Visual Studio
Editing the bower.json File
Where Packages Are Installed
Creating Your Own Packages
Summary
Chapter 6: Building Your Application with Gulp and webpack
What Front-End Build Systems Are For
A Deeper Look at Gulp
Getting Started with Gulp
The Gulpfile.js File
gulp.task()
gulp.watch()
gulp.src()
gulp.dest()
A Typical Gulp Build File
More Gulp Recipes
Naming Output Files from a Package Name
Generating Source maps
Checking JavaScript Using JSHint
Executing Tasks When Files Change
Managing Bower Dependencies
Replacing References Directly in the HTML Files
Introduction to webpack
webpack’s Main Concepts
Using webpack
Bundling JavaScript
Bundling Stylesheets
Minifying and Adding Sourcemaps
More Things webpack Can Do
Visual Studio 2017 and Build Systems
The Bundler and Minifier Extension
The Task Runner Explorer
IntelliSense for Gulp
Summary
Chapter 7: Deploying ASP.NET Core
The New Hosting Model of ASP.NET Core
Installing on Internet Information Services On Premise
Making Sure All Is Well
Installing AspNetCoreModule
Publishing Applications via the Command Line
Creating the Website
Publishing the Applications via Visual Studio
Deploying on Azure
Deploying to Azure from Visual Studio with Web Deploy
Continuous Deployment to Azure with Git
Configuring the Azure Web App
Configuring the Local Repository
Deploying to Docker Containers
Installing the Docker Support
Publishing a Docker Image
Summary
Chapter 8: Developing Outside of Windows
Installing .NET Core on macOS
Building the First ASP.NET Core App on macOS
Using dotnet Command-Line Interface
Using Yeoman
Visual Studio Code
Setting It Up
Development Features in Visual Studio Code
IntelliSense
Refactoring
Errors and Suggestions
Debugging
Version Control
Tasks
Other Features
OmniSharp
Other IDEs
Using Command-line Tools
Summary
Chapter 9: Putting It All Together
Building a Triathlon Race Results Web Site
Building the Back-Office Site
Setting Up Entity Framework
The Object Model
The EF Core Context
Migrations
Building CRUD Screens
The Controller
The View
Building the Registration Page
Showing Real-Time Results
Creating the Angular Client-Side Application
Building the Web APIs
Connecting with IoT Devices
Deploying
Summary
Index
EULA