0% found this document useful (0 votes)
10 views

85662608

The document provides information about various ebooks available for instant download at ebooknice.com, including titles like 'Pro ASP.NET Core 6' by Adam Freeman. It lists multiple ISBNs and links to different editions and related books. The ebooks cover topics such as web application development using ASP.NET Core, and are available in formats like PDF, ePub, and MOBI for immediate access on any device.

Uploaded by

boqorcdd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

85662608

The document provides information about various ebooks available for instant download at ebooknice.com, including titles like 'Pro ASP.NET Core 6' by Adam Freeman. It lists multiple ISBNs and links to different editions and related books. The ebooks cover topics such as web application development using ASP.NET Core, and are available in formats like PDF, ePub, and MOBI for immediate access on any device.

Uploaded by

boqorcdd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 82

Instant Ebook Access, One Click Away – Begin at ebooknice.

com

(Ebook) Pro ASP.NET Core 6: Develop Cloud-Ready


Web Applications Using MVC, Blazor, and Razor
Pages by Adam Freeman ISBN 9781484279564,
9781484279571, 1484279565, 1484279573

https://ebooknice.com/product/pro-asp-net-core-6-develop-
cloud-ready-web-applications-using-mvc-blazor-and-razor-
pages-42831304

OR CLICK BUTTON

DOWLOAD EBOOK

Get Instant Ebook Downloads – Browse at https://ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) Pro ASP.NET Core 6: Develop Cloud-Ready Web Applications Using MVC, Blazor,
and Razor Pages by Adam Freeman ISBN 9781484279564, 1484279565

https://ebooknice.com/product/pro-asp-net-core-6-develop-cloud-ready-web-
applications-using-mvc-blazor-and-razor-pages-38495700

ebooknice.com

(Ebook) Pro ASP.NET Core 3: Develop Cloud-Ready Web Applications Using MVC, Blazor,
and Razor Pages — Eighth Edition by Adam Freeman ISBN 9781484254400, 1484254406

https://ebooknice.com/product/pro-asp-net-core-3-develop-cloud-ready-web-
applications-using-mvc-blazor-and-razor-pages-eighth-edition-11127922

ebooknice.com

(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason; Viles, James ISBN
9781459699816, 9781743365571, 9781925268492, 1459699815, 1743365578, 1925268497

https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374

ebooknice.com

(Ebook) Pro ASP.NET Core MVC: Develop cloud-ready web applications using Microsoft’s
latest framework, ASP.NET Core MVC — Sixth Edition by Adam Freeman ISBN
9781484203972, 9781484203989, 1484203976, 1484203984

https://ebooknice.com/product/pro-asp-net-core-mvc-develop-cloud-ready-web-
applications-using-microsofts-latest-framework-asp-net-core-mvc-sixth-
edition-5604292

ebooknice.com
(Ebook) Pro ASP.NET Core MVC 2: Develop cloud-ready web applications using
Microsoft’s latest framework, ASP.NET Core MVC 2 — Seventh Edition by Adam Freeman
ISBN 9781484231494, 9781484231500, 148423149X, 1484231503

https://ebooknice.com/product/pro-asp-net-core-mvc-2-develop-cloud-ready-web-
applications-using-microsofts-latest-framework-asp-net-core-mvc-2-seventh-
edition-6788082

ebooknice.com

(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena Alfredsson, Hans Heikne, Sanna
Bodemyr ISBN 9789127456600, 9127456609

https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312

ebooknice.com

(Ebook) SAT II Success MATH 1C and 2C 2002 (Peterson's SAT II Success) by Peterson's
ISBN 9780768906677, 0768906679

https://ebooknice.com/product/sat-ii-success-math-1c-and-2c-2002-peterson-s-sat-
ii-success-1722018

ebooknice.com

(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master the SAT Subject Test: Math
Levels 1 & 2) by Arco ISBN 9780768923049, 0768923042

https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-arco-master-
the-sat-subject-test-math-levels-1-2-2326094

ebooknice.com

(Ebook) Cambridge IGCSE and O Level History Workbook 2C - Depth Study: the United
States, 1919-41 2nd Edition by Benjamin Harrison ISBN 9781398375147, 9781398375048,
1398375144, 1398375047

https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044

ebooknice.com
Adam Freeman

Pro ASP.NET Core 6


Develop Cloud-Ready Web Applications Using MVC,
Blazor, and Razor Pages
9th ed.
Adam Freeman
London, UK

ISBN 978-1-4842-7956-4 e-ISBN 978-1-4842-7957-1


https://doi.org/10.1007/978-1-4842-7957-1

© Adam Freeman 2016, 2017, 2020, 2022

This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress


Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
Dedicated to my lovely wife, Jacqui Griffyth. (And also to Peanut.)
Any source code or other supplementary material referenced by the
author in this book is available to readers on GitHub. For more detailed
information, please visit www.apress.com/source-code.
Table of Contents
Part I
Chapter 1:​Putting ASP.​NET Core in Context
Understanding the Application Frameworks
Understanding the MVC Framework
Understanding Razor Pages
Understanding Blazor
Understanding the Utility Frameworks
Understanding the ASP.​NET Core Platform
Understanding This Book
What Software Do I Need to Follow the Examples?​
What Platform Do I Need to Follow the Examples?​
What If I Have Problems Following the Examples?​
What If I Find an Error in the Book?​
What Does This Book Cover?​
What Doesn’t This Book Cover?​
How Do I Contact the Author?​
What If I Really Enjoyed This Book?​
What If This Book Has Made Me Angry and I Want to
Complain?​
Summary
Chapter 2:​Getting Started
Choosing a Code Editor
Installing Visual Studio
Installing Visual Studio Code
Creating an ASP.​NET Core Project
Opening the Project Using Visual Studio
Opening the Project with Visual Studio Code
Running the ASP.​NET Core Application
Understanding Endpoints
Understanding Routes
Understanding HTML Rendering
Putting the Pieces Together
Summary
Chapter 3:​Your First ASP.​NET Core Application
Setting the Scene
Creating the Project
Preparing the Project
Adding a Data Model
Creating a Second Action and View
Linking Action Methods
Building the Form
Receiving Form Data
Adding the Thanks View
Displaying the Responses
Adding Validation
Styling the Content
Summary
Chapter 4:​Using the Development Tools
Creating ASP.​NET Core Projects
Creating a Project Using the Command Line
Adding Code and Content to Projects
Understanding Item Scaffolding
Building and Running Projects
Using the Hot Reload Feature
Building and Running Projects Using Visual Studio Code
Building and Running Projects Using Visual Studio
Managing Packages
Managing NuGet Packages
Managing Tool Packages
Managing Client-Side Packages
Debugging Projects
Summary
Chapter 5:​Essential C# Features
Preparing for This Chapter
Opening the Project
Enabling the MVC Framework
Creating the Application Components
Selecting the HTTP Port
Running the Example Application
Understanding Top-Level Statements
Understanding Global using Statements
Understanding Implicit using Statements
Understanding Null State Analysis
Ensuring Fields and Properties Are Assigned Values
Using Nullable Types
Checking for Null Values
Overriding Null State Analysis
Disabling Null State Analysis Warnings
Using String Interpolation
Using Object and Collection Initializers
Using an Index Initializer
Using Target-Typed New Expressions
Pattern Matching
Pattern Matching in switch Statements
Using Extension Methods
Applying Extension Methods to an Interface
Creating Filtering Extension Methods
Using Lambda Expressions
Defining Functions
Using Lambda Expression Methods and Properties
Using Type Inference and Anonymous Types
Using Anonymous Types
Using Default Implementations in Interfaces
Using Asynchronous Methods
Working with Tasks Directly
Applying the async and await Keywords
Using an Asynchronous Enumerable
Getting Names
Summary
Chapter 6:​Testing ASP.​NET Core Applications
Preparing for This Chapter
Opening the Project
Selecting the HTTP Port
Enabling the MVC Framework
Creating the Application Components
Running the Example Application
Creating a Unit Test Project
Removing the Default Test Class
Writing and Running Unit Tests
Running Tests with the Visual Studio Test Explorer
Running Tests with Visual Studio Code
Running Tests from the Command Line
Correcting the Unit Test
Isolating Components for Unit Testing
Using a Mocking Package
Creating a Mock Object
Summary
Chapter 7:​SportsStore:​A Real Application
Creating the Projects
Creating the Unit Test Project
Opening the Projects
Configuring the HTTP Port
Creating the Application Project Folders
Preparing the Application Services and the Request
Pipeline
Configuring the Razor View Engine
Creating the Controller and View
Starting the Data Model
Checking and Running the Application
Adding Data to the Application
Installing the Entity Framework Core Packages
Defining the Connection String
Creating the Database Context Class
Configuring Entity Framework Core
Creating a Repository
Creating the Database Migration
Creating Seed Data
Displaying a List of Products
Preparing the Controller
Updating the View
Running the Application
Adding Pagination
Displaying Page Links
Improving the URLs
Styling the Content
Installing the Bootstrap Package
Applying Bootstrap Styles
Creating a Partial View
Summary
Chapter 8:​SportsStore:​Navigation and Cart
Adding Navigation Controls
Filtering the Product List
Refining the URL Scheme
Building a Category Navigation Menu
Correcting the Page Count
Building the Shopping Cart
Configuring Razor Pages
Creating a Razor Page
Creating the Add To Cart Buttons
Enabling Sessions
Implementing the Cart Feature
Summary
Chapter 9:​SportsStore:​Completing the Cart
Refining the Cart Model with a Service
Creating a Storage-Aware Cart Class
Registering the Service
Simplifying the Cart Razor Page
Completing the Cart Functionality
Removing Items from the Cart
Adding the Cart Summary Widget
Submitting Orders
Creating the Model Class
Adding the Checkout Process
Creating the Controller and View
Implementing Order Processing
Completing the Order Controller
Displaying Validation Errors
Displaying a Summary Page
Summary
Chapter 10:​SportsStore:​Administration
Preparing Blazor Server
Creating the Imports File
Creating the Startup Razor Page
Creating the Routing and Layout Components
Creating the Razor Components
Checking the Blazor Setup
Managing Orders
Enhancing the Model
Displaying Orders to the Administrator
Adding Catalog Management
Expanding the Repository
Applying Validation Attributes to the Data Model
Creating the List Component
Creating the Detail Component
Creating the Editor Component
Deleting Products
Summary
Chapter 11:​SportsStore:​Security and Deployment
Creating the Identity Database
Installing the Identity Package for Entity Framework Core
Creating the Context Class
Defining the Connection String
Configuring the Application
Creating and Applying the Database Migration
Defining the Seed Data
Adding a Conventional Administration Feature
Applying a Basic Authorization Policy
Creating the Account Controller and Views
Testing the Security Policy
Preparing ASP.​NET Core for Deployment
Configuring Error Handling
Creating the Production Configuration Settings
Creating the Docker Image
Running the Containerized Application
Summary
Part II
Chapter 12:​Understanding the ASP.​NET Core Platform
Preparing for This Chapter
Running the Example Application
Understanding the ASP.​NET Core Platform
Understanding Middleware and the Request Pipeline
Understanding Services
Understanding the ASP.​NET Core Project
Understanding the Entry Point
Understanding the Project File
Creating Custom Middleware
Defining Middleware Using a Class
Understanding the Return Pipeline Path
Short-Circuiting the Request Pipeline
Creating Pipeline Branches
Creating Terminal Middleware
Configuring Middleware
Using the Options Pattern with Class-Based Middleware
Summary
Chapter 13:​Using URL Routing
Preparing for This Chapter
Understanding URL Routing
Adding the Routing Middleware and Defining an Endpoint
Simplifying the Pipeline Configuration
Understanding URL Patterns
Using Segment Variables in URL Patterns
Generating URLs from Routes
Managing URL Matching
Matching Multiple Values from a Single URL Segment
Using Default Values for Segment Variables
Using Optional Segments in a URL Pattern
Using a catchall Segment Variable
Constraining Segment Matching
Defining Fallback Routes
Advanced Routing Features
Creating Custom Constraints
Avoiding Ambiguous Route Exceptions
Accessing the Endpoint in a Middleware Component
Summary
Chapter 14:​Using Dependency Injection
Preparing for This Chapter
Creating a Middleware Component and an Endpoint
Configuring the Request Pipeline
Understanding Service Location and Tight Coupling
Understanding the Service Location Problem
Understanding the Tightly Coupled Components Problem
Using Dependency Injection
Using a Service in a Middleware Class
Using a Service in an Endpoint
Using Service Lifecycles
Creating Transient Services
Avoiding the Transient Service Reuse Pitfall
Using Scoped Services
Other Dependency Injection Features
Creating Dependency Chains
Accessing Services in the Program.​cs File
Using Service Factory Functions
Creating Services with Multiple Implementations
Using Unbound Types in Services
Summary
Chapter 15:​Using the Platform Features, Part 1
Preparing for This Chapter
Using the Configuration Service
Understanding the Environment-Specific Configuration File
Accessing Configuration Settings
Using the Configuration Data in the Program.​cs File
Using Configuration Data with the Options Pattern
Understanding the Launch Settings File
Using the Environment Service
Storing User Secrets
Using the Logging Service
Generating Logging Messages
Logging Messages with Attributes
Configuring Minimum Logging Levels
Logging HTTP Requests and Responses
Using Static Content and Client-Side Packages
Adding the Static Content Middleware
Using Client-Side Packages
Summary
Chapter 16:​Using the Platform Features, Part 2
Preparing for This Chapter
Using Cookies
Enabling Cookie Consent Checking
Managing Cookie Consent
Using Sessions
Configuring the Session Service and Middleware
Using Session Data
Working with HTTPS Connections
Enabling HTTPS Connections
Detecting HTTPS Requests
Enforcing HTTPS Requests
Enabling HTTP Strict Transport Security
Handling Exceptions and Errors
Returning an HTML Error Response
Enriching Status Code Responses
Filtering Requests Using the Host Header
Summary
Chapter 17:​Working with Data
Preparing for This Chapter
Caching Data
Caching Data Values
Using a Shared and Persistent Data Cache
Caching Responses
Using Entity Framework Core
Installing Entity Framework Core
Creating the Data Model
Configuring the Database Service
Creating and Applying the Database Migration
Seeding the Database
Using Data in an Endpoint
Summary
Part III
Chapter 18:​Creating the Example Project
Creating the Project
Adding a Data Model
Adding NuGet Packages to the Project
Creating the Data Model
Preparing the Seed Data
Configuring Entity Framework Core Services and
Middleware
Creating and Applying the Migration
Adding the CSS Framework
Configuring the Request Pipeline
Running the Example Application
Summary
Chapter 19:​Creating RESTful Web Services
Preparing for This Chapter
Understanding RESTful Web Services
Understanding Request URLs and Methods
Understanding JSON
Creating a Web Service Using the Minimal API
Creating a Web Service Using a Controller
Enabling the MVC Framework
Creating a Controller
Improving the Web Service
Using Asynchronous Actions
Preventing Over-Binding
Using Action Results
Validating Data
Applying the API Controller Attribute
Omitting Null Properties
Summary
Chapter 20:​Advanced Web Service Features
Preparing for This Chapter
Dropping the Database
Running the Example Application
Dealing with Related Data
Breaking Circular References in Related Data
Supporting the HTTP PATCH Method
Understanding JSON Patch
Installing and Configuring the JSON Patch Package
Defining the Action Method
Understanding Content Formatting
Understanding the Default Content Policy
Understanding Content Negotiation
Specifying an Action Result Format
Requesting a Format in the URL
Restricting the Formats Received by an Action Method
Documenting and Exploring Web Services
Resolving Action Conflicts
Installing and Configuring the Swashbuckle Package
Fine-Tuning the API Description
Summary
Chapter 21:​Using Controllers with Views, Part I
Preparing for This Chapter
Dropping the Database
Running the Example Application
Getting Started with Views
Configuring the Application
Creating an HTML Controller
Creating a Razor View
Selecting a View by Name
Working with Razor Views
Setting the View Model Type
Understanding the Razor Syntax
Understanding Directives
Understanding Content Expressions
Setting Element Content
Setting Attribute Values
Using Conditional Expressions
Enumerating Sequences
Using Razor Code Blocks
Summary
Chapter 22:​Using Controllers with Views, Part II
Preparing for This Chapter
Dropping the Database
Running the Example Application
Using the View Bag
Using Temp Data
Working with Layouts
Configuring Layouts Using the View Bag
Using a View Start File
Overriding the Default Layout
Using Layout Sections
Using Partial Views
Enabling Partial Views
Creating a Partial View
Applying a Partial View
Understanding Content-Encoding
Understanding HTML Encoding
Understanding JSON Encoding
Summary
Chapter 23:​Using Razor Pages
Preparing for This Chapter
Running the Example Application
Understanding Razor Pages
Configuring Razor Pages
Creating a Razor Page
Understanding Razor Pages Routing
Specifying a Routing Pattern in a Razor Page
Adding Routes for a Razor Page
Understanding the Page Model Class
Using a Code-Behind Class File
Understanding Action Results in Razor Pages
Handling Multiple HTTP Methods
Selecting a Handler Method
Understanding the Razor Page View
Creating a Layout for Razor Pages
Using Partial Views in Razor Pages
Creating Razor Pages Without Page Models
Summary
Chapter 24:​Using View Components
Preparing for This Chapter
Dropping the Database
Running the Example Application
Understanding View Components
Creating and Using a View Component
Applying a View Component
Understanding View Component Results
Returning a Partial View
Returning HTML Fragments
Getting Context Data
Providing Context from the Parent View Using Arguments
Creating Asynchronous View Components
Creating View Components Classes
Creating a Hybrid Controller Class
Summary
Chapter 25:​Using Tag Helpers
Preparing for This Chapter
Dropping the Database
Running the Example Application
Creating a Tag Helper
Defining the Tag Helper Class
Registering Tag Helpers
Using a Tag Helper
Narrowing the Scope of a Tag Helper
Widening the Scope of a Tag Helper
Advanced Tag Helper Features
Creating Shorthand Elements
Creating Elements Programmatically​
Prepending and Appending Content and Elements
Getting View Context Data
Working with Model Expressions
Coordinating Between Tag Helpers
Suppressing the Output Element
Using Tag Helper Components
Creating a Tag Helper Component
Expanding Tag Helper Component Element Selection
Summary
Chapter 26:​Using the Built-in Tag Helpers
Preparing for This Chapter
Adding an Image File
Installing a Client-Side Package
Dropping the Database
Running the Example Application
Enabling the Built-in Tag Helpers
Transforming Anchor Elements
Using Anchor Elements for Razor Pages
Using the JavaScript and CSS Tag Helpers
Managing JavaScript Files
Managing CSS Stylesheets
Working with Image Elements
Using the Data Cache
Setting Cache Expiry
Using the Hosting Environment Tag Helper
Summary
Chapter 27:​Using the Forms Tag Helpers
Preparing for This Chapter
Dropping the Database
Running the Example Application
Understanding the Form Handling Pattern
Creating a Controller to Handle Forms
Creating a Razor Page to Handle Forms
Using Tag Helpers to Improve HTML Forms
Working with Form Elements
Transforming Form Buttons
Working with input Elements
Transforming the input Element type Attribute
Formatting input Element Values
Displaying Values from Related Data in input Elements
Working with label Elements
Working with Select and Option Elements
Populating a select Element
Working with Text Areas
Using the Anti-forgery Feature
Enabling the Anti-forgery Feature in a Controller
Enabling the Anti-forgery Feature in a Razor Page
Using Anti-forgery Tokens with JavaScript Clients
Summary
Chapter 28:​Using Model Binding
Preparing for This Chapter
Dropping the Database
Running the Example Application
Understanding Model Binding
Binding Simple Data Types
Binding Simple Data Types in Razor Pages
Understanding Default Binding Values
Binding Complex Types
Binding to a Property
Binding Nested Complex Types
Selectively Binding Properties
Binding to Arrays and Collections
Binding to Arrays
Binding to Simple Collections
Binding to Dictionaries
Binding to Collections of Complex Types
Specifying a Model Binding Source
Selecting a Binding Source for a Property
Using Headers for Model Binding
Using Request Bodies as Binding Sources
Manually Model Binding
Summary
Chapter 29:​Using Model Validation
Preparing for This Chapter
Dropping the Database
Running the Example Application
Understanding the Need for Model Validation
Validating Data
Displaying Validation Messages
Understanding the Implicit Validation Checks
Performing Explicit Validation
Configuring the Default Validation Error Messages
Displaying Property-Level Validation Messages
Displaying Model-Level Messages
Explicitly Validating Data in a Razor Page
Specifying Validation Rules Using Metadata
Creating a Custom Property Validation Attribute
Creating a Custom Model Validation Attribute
Performing Client-Side Validation
Performing Remote Validation
Performing Remote Validation in Razor Pages
Summary
Chapter 30:​Using Filters
Preparing for This Chapter
Enabling HTTPS Connections
Dropping the Database
Running the Example Application
Using Filters
Using Filters in Razor Pages
Understanding Filters
Creating Custom Filters
Understanding Authorization Filters
Understanding Resource Filters
Understanding Action Filters
Understanding Page Filters
Understanding Result Filters
Understanding Exception Filters
Creating an Exception Filter
Managing the Filter Lifecycle
Creating Filter Factories
Using Dependency Injection Scopes to Manage Filter
Lifecycles
Creating Global Filters
Understanding and Changing Filter Order
Changing Filter Order
Summary
Chapter 31:​Creating Form Applications
Preparing for This Chapter
Dropping the Database
Running the Example Application
Creating an MVC Forms Application
Preparing the View Model and the View
Reading Data
Creating Data
Editing Data
Deleting Data
Creating a Razor Pages Forms Application
Creating Common Functionality
Defining Pages for the CRUD Operations
Creating New Related Data Objects
Providing the Related Data in the Same Request
Breaking Out to Create New Data
Summary
Part IV
Chapter 32:​Creating the Example Project
Creating the Project
Adding NuGet Packages to the Project
Adding a Data Model
Preparing the Seed Data
Configuring Entity Framework Core Services and
Middleware
Creating and Applying the Migration
Adding the Bootstrap CSS Framework
Configuring the Services and Middleware
Creating a Controller and View
Creating a Razor Page
Running the Example Application
Summary
Chapter 33:​Using Blazor Server, Part 1
Preparing for This Chapter
Understanding Blazor Server
Understanding the Blazor Server Advantages
Understanding the Blazor Server Disadvantages
Choosing Between Blazor Server and Angular/​React/​Vue.​js
Getting Started with Blazor
Configuring ASP.​NET Core for Blazor Server
Creating a Razor Component
Understanding the Basic Razor Component Features
Understanding Blazor Events and Data Bindings
Working with Data Bindings
Using Class Files to Define Components
Using a Code-Behind Class
Defining a Razor Component Class
Summary
Chapter 34:​Using Blazor Server, Part 2
Preparing for This Chapter
Combining Components
Configuring Components with Attributes
Creating Custom Events and Bindings
Displaying Child Content in a Component
Creating Template Components
Using Generic Type Parameters in Template Components
Cascading Parameters
Handling Errors
Handling Connection Errors
Handling Uncaught Application Errors
Using Error Boundaries
Summary
Chapter 35:​Advanced Blazor Features
Preparing for This Chapter
Using Component Routing
Preparing the Razor Page
Adding Routes to Components
Navigating Between Routed Components
Receiving Routing Data
Defining Common Content Using Layouts
Understanding the Component Lifecycle Methods
Using the Lifecycle Methods for Asynchronous Tasks
Managing Component Interaction
Using References to Child Components
Interacting with Components from Other Code
Interacting with Components Using JavaScript
Summary
Chapter 36:​Blazor Forms and Data
Preparing for This Chapter
Dropping the Database and Running the Application
Using the Blazor Form Components
Creating Custom Form Components
Validating Form Data
Handling Form Events
Using Entity Framework Core with Blazor
Understanding the Entity Framework Core Context Scope
Issue
Understanding the Repeated Query Issue
Performing Create, Read, Update, and Delete Operations
Creating the List Component
Creating the Details Component
Creating the Editor Component
Extending the Blazor Form Features
Creating a Custom Validation Constraint
Creating a Valid-Only Submit Button Component
Summary
Chapter 37:​Using Blazor Web Assembly
Preparing for This Chapter
Dropping the Database and Running the Application
Setting Up Blazor WebAssembly
Creating the Shared Project
Creating the Blazor WebAssembly Project
Preparing the ASP.​NET Core Project
Adding the Solution References
Opening the Projects
Completing the Blazor WebAssembly Configuration
Testing the Placeholder Components
Creating a Blazor WebAssembly Component
Importing the Data Model Namespace
Creating a Component
Creating a Layout
Defining CSS Styles
Completing the Blazor WebAssembly Form Application
Creating the Details Component
Creating the Editor Component
Summary
Chapter 38:​Using ASP.​NET Core Identity
Preparing for This Chapter
Preparing the Project for ASP.​NET Core Identity
Preparing the ASP.​NET Core Identity Database
Configuring the Application
Creating and Applying the Identity Database Migration
Creating User Management Tools
Preparing for User Management Tools
Enumerating User Accounts
Creating Users
Editing Users
Deleting Users
Creating Role Management Tools
Preparing for Role Management Tools
Enumerating and Deleting Roles
Creating Roles
Assigning Role Membership
Summary
Chapter 39:​Applying ASP.​NET Core Identity
Preparing for This Chapter
Authenticating Users
Creating the Login Feature
Inspecting the ASP.​NET Core Identity Cookie
Creating a Sign-Out Page
Testing the Authentication Feature
Enabling the Identity Authentication Middleware
Authorizing Access to Endpoints
Applying the Authorization Attribute
Enabling the Authorization Middleware
Creating the Access Denied Endpoint
Creating the Seed Data
Testing the Authentication Sequence
Authorizing Access to Blazor Applications
Performing Authorization in Blazor Components
Displaying Content to Authorized Users
Authenticating and Authorizing Web Services
Building a Simple JavaScript Client
Restricting Access to the Web Service
Using Cookie Authentication
Using Bearer Token Authentication
Creating Tokens
Authenticating with Tokens
Restricting Access with Tokens
Using Tokens to Request Data
Summary
About the Author
Adam Freeman
is an experienced IT professional who
has held senior positions in a range of
companies, most recently serving as
chief technology officer and chief
operating officer of a global bank. Now
retired, he spends his time writing and
long-distance running.
About the Technical Reviewer
Fabio Claudio Ferracchiati
is a senior consultant and a senior analyst/developer using Microsoft
technologies. He works for BluArancio (www.bluarancio.com). He
is a Microsoft Certified Solution Developer for .NET, a Microsoft
Certified Application Developer for .NET, a Microsoft Certified
Professional, and a prolific author and technical reviewer. Over the past
ten years, he’s written articles for Italian and international magazines
and coauthored more than ten books on a variety of computer topics.
PART
I
© The Author(s), under exclusive license to APress Media, LLC, part of Springer
Nature 2022
A. Freeman, Pro ASP.NET Core 6
https://doi.org/10.1007/978-1-4842-7957-1_1

1. Putting ASP.NET Core in Context


Adam Freeman1
(1) London, UK

ASP.NET Core is Microsoft’s web development platform. The original


ASP.NET was introduced in 2002, and it has been through several
reinventions and reincarnations to become ASP.NET Core 6, which is
the topic of this book.
ASP.NET Core consists of a platform for processing HTTP requests, a
series of principal frameworks for creating applications, and secondary
utility frameworks that provide supporting features, as illustrated by
Figure 1-1.

Figure 1-1 The structure of ASP.NET Core

UNDERSTANDING .NET CORE, .NET FRAMEWORK, AND .NET


If you have never worked for a large corporation, you might have the
impression that Microsoft is a disciplined organization with a clear
strategy and an army of programmers working together to deliver
complex products like ASP.NET Core.
In reality, Microsoft is a chaotic collection of dysfunctional tribes
that are constantly trying to undermine each other to get prestige
and promotions. Products are released during lulls in the fighting,
and successes are often entirely unexpected. This isn’t unique to
Microsoft—it is true of any large company—but it has a particular
bearing on ASP.NET Core and the naming confusion that Microsoft
has created.
Several years ago, the part of Microsoft responsible for ASP.NET
created its own version of the .NET platform, allowing ASP.NET to be
updated more often than the rest of .NET. ASP.NET Core and .NET
Core were created, allowing cross-platform development, and using a
subset of the original .NET APIs, many of which were specific to
Windows. It was a painful transition, but it meant that web
development could evolve independently of the “legacy” Windows-
only development, which would continue under the renamed .NET
Framework.
But no one wants to be in the “legacy” tribe because there is no
glory in keeping the lights on at Microsoft. .NET Core was clearly the
future and, one by one, the.NET groups at Microsoft argued that their
technology and APIs should be part of .NET Core. The .NET Core APIs
were gradually expanded, and the result was an incoherent mess,
with half-hearted attempts to differentiate .NET Core and .NET
Framework and standardize the APIs.
To clean up the mess, Microsoft has merged .NET Core and .NET
Framework into .NET, dropping the Core part of the name. “.NET” is a
name I like to think was chosen on the way out of the office on a
holiday weekend but which I suspect is the result of many months of
heated argument.
The problem with dropping Core from the name is that it cannot
be carried out consistently. The name ASP.NET Core originally
denoted the .NET Core version of ASP.NET, and going back to that
name would be even more confusing.
The result is that even Microsoft can’t decide what name to use.
You will see the term ASP.NET Core 6 in a lot of the developer
documentation—and that’s the name I use in this book—but you
will also see ASP.NET Core in .NET 6, especially in press releases and
marketing material. It is not clear which name will win out, but until
there is clarity, you should take care to determine whether you are
using .NET Framework, .NET Core, or .NET.

Understanding the Application Frameworks


When you start using ASP.NET Core, it can be confusing to find that
there are different application frameworks available. As you will learn,
these frameworks are complementary and solve different problems, or,
for some features, solve the same problems in different ways.
Understanding the relationship between these frameworks means
understanding the changing design patterns that Microsoft has
supported, as I explain in the sections that follow.

Understanding the MVC Framework


The MVC Framework was introduced in the early ASP.NET, long before
.NET Core and .NET 6 were introduced. The original ASP.NET relied on a
development model called Web Pages, which re-created the experience
of writing desktop applications but resulted in unwieldy web projects
that did not scale well. The MVC Framework was introduced alongside
Web Pages with a development model that embraced the character of
HTTP and HTML, rather than trying to hide it.
MVC stands for Model-View-Controller, which is a design pattern
that describes the shape of an application. The MVC pattern emphasizes
separation of concerns, where areas of functionality are defined
independently, which was an effective antidote to the indistinct
architectures that Web Pages led to.
Early versions of the MVC Framework were built on the ASP.NET
foundations that were originally designed for Web Pages, which led to
some awkward features and workarounds. With the move to .NET Core,
ASP.NET became ASP.NET Core, and the MVC Framework was rebuilt on
an open, extensible, and cross-platform foundation.
The MVC Framework remains an important part of ASP.NET Core,
but the way it is commonly used has changed with the rise of single-
page applications (SPAs). In an SPA, the browser makes a single HTTP
request and receives an HTML document that delivers a rich client,
typically written in a JavaScript client such as Angular or React. The
shift to SPAs means that the clean separation that the MVC Framework
was originally intended for is not as important, and the emphasis
placed on following the MVC pattern is no longer essential, even though
the MVC Framework remains useful (and is used to support SPAs
through web services, as described in Chapter 19).

PUTTING PATTERNS IN THEIR PLACE


Design patterns provoke strong reactions, as the emails I receive
from readers will testify. A substantial proportion of the messages I
receive are complaints that I have not applied a pattern correctly.
Patterns are just other people’s solutions to the problems they
encountered in other projects. If you find yourself facing the same
problem, understanding how it has been solved before can be
helpful. But that doesn’t mean you have to follow the pattern exactly,
or at all, as long as you understand the consequences. If a pattern is
intended to make projects manageable, for example, and you choose
to deviate from that pattern, then you must accept that your project
may be more difficult to manage. But a pattern followed slavishly can
be worse than no pattern at all, and no pattern is suited to every
project.
My advice is to use patterns freely, adapt them as necessary, and
ignore zealots who confuse patterns with commandments.

Understanding Razor Pages


One drawback of the MVC Framework is that it can require a lot of
preparatory work before an application can start producing content.
Despite its structural problems, one advantage of Web Pages was that
simple applications could be created in a couple of hours.
Razor Pages takes the development ethos of Web Pages and
implements it using the platform features originally developed for the
MVC Framework. Code and content are mixed to form self-contained
pages; this re-creates the speed of Web Pages development without
some of the underlying technical problems (although the issue of
scaling up complex projects can still be an issue).
Razor Pages can be used alongside the MVC Framework, which is
how I tend to use them. I write the main parts of the application using
the MVC Framework and use Razor Pages for the secondary features,
such as administration and reporting tools. You can see this approach in
Chapters 7–11, where I develop a realistic ASP.NET Core application
called SportsStore.

Understanding Blazor
The rise of JavaScript client-side frameworks can be a barrier for C#
developers, who must learn a different—and somewhat idiosyncratic—
programming language. I have come to love JavaScript, which is as fluid
and expressive as C#. But it takes time and commitment to become
proficient in a new programming language, especially one that has
fundamental differences from C#.
Blazor attempts to bridge this gap by allowing C# to be used to
write client-side applications. There are two versions of Blazor: Blazor
Server and Blazor WebAssembly. Blazor Server is a stable and
supported part of ASP.NET Core, and it works by using a persistent
HTTP connection to the ASP.NET Core server, where the application’s
C# code is executed. Blazor WebAssembly is an experimental release
that goes one step further and executes the application’s C# code in the
browser. Neither version of Blazor is suited for all situations, as I
explain in Chapter 33, but they both give a sense of direction for the
future of ASP.NET Core development.

Understanding the Utility Frameworks


Two frameworks are closely associated with ASP.NET Core but are not
used directly to generate HTML content or data. Entity Framework Core
is Microsoft’s object-relational mapping (ORM) framework, which
represents data stored in a relational database as .NET objects. Entity
Framework Core can be used in any .NET application, and it is
commonly used to access databases in ASP.NET Core applications.
ASP.NET Core Identity is Microsoft’s authentication and
authorization framework, and it is used to validate user credentials in
ASP.NET Core applications and restrict access to application features.
I describe only the basic features of both frameworks in this book,
focusing on the capabilities required by most ASP.NET Core
applications. But these are both complex frameworks that are too large
to describe in detail in what is already a large book about ASP.NET Core.

TOPICS FOR FUTURE EDITIONS


I don’t have space in this book to cover every ASP.NET Core, Entity
Framework Core, and ASP.NET Core Identity feature, so I have
focused on those aspects that most projects require. If there are
topics you think I should include in the next edition or in new deep-
dive books, then please send me your suggestions at adam@adam-
freeman.com.

Understanding the ASP.NET Core Platform


The ASP.NET Core platform contains the low-level features required to
receive and process HTTP requests and create responses. There is an
integrated HTTP server, a system of middleware components to handle
requests, and core features that the application frameworks depend on,
such as URL routing and the Razor view engine.
Most of your development time will be spent with the application
frameworks, but effective ASP.NET Core use requires an understanding
of the powerful capabilities that the platform provides, without which
the higher-level frameworks could not function. I demonstrate how the
ASP.NET Core platform works in detail in Part 2 of this book and explain
how the features it provides underpin every aspect of ASP.NET Core
development.
I have not described two notable platform features in this book:
SignalR and gRPC. SignalR is used to create low-latency communication
channels between applications. It provides the foundation for the
Blazor Server framework that I describe in Part 4 of this book, but
SignalR is rarely used directly, and there are better alternatives for
those few projects that need low-latency messaging, such as Azure
Event Grid or Azure Service Bus.
gRPC is an emerging standard for cross-platform remote procedure
calls (RPCs) over HTTP that was originally created by Google (the g in
gRPC) and offers efficiency and scalability benefits. gRPC may be the
future standard for web services, but it cannot be used in web
applications because it requires low-level control of the HTTP messages
that it sends, which browsers do not allow. (There is a browser library
that allows gRPC to be used via a proxy server, but that undermines the
benefits of using gRPC.) Until gRPC can be used in the browser, its
inclusion in ASP.NET Core is of interest only for projects that use it for
communication between back-end servers, for which many alternative
protocols exist. I may cover gRPC in future editions of this book but not
until it can be used in the browser or becomes the dominant data-
center protocol.

Understanding This Book


To get the most from this book, you should be familiar with the basics
of web development, understand how HTML and CSS work, and have a
working knowledge of C#. Don’t worry if you haven’t done any client-
side development, such as JavaScript. The emphasis in this book is on
C# and ASP.NET Core, and you will be able to pick up everything you
need to know as you progress through the chapters. In Chapter 5, I
summarize the most important C# features for ASP.NET Core
development.

What Software Do I Need to Follow the Examples?


You need a code editor (either Visual Studio or Visual Studio Code), the
.NET Core Software Development Kit, and SQL Server LocalDB. All are
available for use from Microsoft without charge, and Chapter 2 contains
instructions for installing everything you need.

What Platform Do I Need to Follow the Examples?


This book is written for Windows. I used Windows 10 Pro, but any
version of Windows supported by Visual Studio, Visual Studio Code,
Random documents with unrelated
content Scribd suggests to you:
After several hours, the skin shows a uniform yellow when cut
through its thickest part. It is then drained and the skin worked in a
solution of sodium bisulphite and mineral acid (to free sulphur dioxide).
The chromic acid is absorbed by the fiber and later reduced by sulphur
dioxide.
In the making of chrome black leather each tanner has his own
method. Contrary to the general belief, there are many different
methods of chrome tannage. No two tanneries employ just the same
process.
Tanners of chrome leather seek to produce leather suitable for the
particular demands made upon it by the peculiarities or characteristics of
the varying seasons. Summer shoes require a cool, light leather; at
other times a heavier tannage is essential, with some call for a
practically waterproof product.
All leathers, whether vegetable-or chrome-tanned, must be “fat
liquored.” That is to say, a certain amount of fatty material must be put
into the skin in order that it may be mellow, workable, and serviceable.
This is very essential in producing calf leather. Fat liquors usually contain
oil and soap, which have been boiled in water and made into a thin
liquor. The leather is put into a drum with the hot fat liquor; the drum is
set in motion, and as it revolves the leather tumbles about in the drum
and absorbs the oil and soap from the water. It is the fat liquor that
makes the leather soft and strong.
Leather used in shoes is divided into two classes: sole leather and
upper leather.
Sole leather is a heavy, solid, stiff leather and may be bent without
cracking. It is the foundation of the shoe, and therefore should be of the
best material. The hides of bulls and oxen yield the best leather for this
purpose.
The hide that is tanned for sole leather is soaked for several days in a
weak solution (which is gradually made stronger) of oak or hemlock tan
made from the bark. Oak-tanned hide is preferred and may be known by
its light color. A chemical change takes place in the fiber of the hide.
This is a high-grade tannage, and is distinguished principally by its fine
fibers and close, compact texture.
Oak sole leather, by reason of its tough character, and its close,
fibrous texture, resists water and will wear well down before cracking. It
is by many considered better than other leather for flexible-sole shoes,
requiring waterproof qualities.
Sole leather is divided into three classes according to the tanning—
oak, hemlock, and union.

Tanning Process

Showing the rotating drums. See page 24.

Oak tanning is as follows: the hides are hung in pits containing weak
or nearly spent liquors from a previous tanning, and agitated so as to
take up tannin evenly. Strong liquor would harden the surface so as to
prevent thorough penetration into the interior of the hides. After ten or
twelve days, the hides are taken out and laid away in fresh tan and
stronger liquor. This process is repeated as often as necessary for eight
to ten months. At the end of this time the hide has absorbed all of the
tannin which it will take up.
Hemlock tanning is similar to the oak tanning in process. The hemlock
tan is a red shade. Hemlock produces a very hard and inflexible leather.
It is modified by use of bleaching materials which are applied to the
leather after being tanned. It is sold in sides without being trimmed,
while the oak is sold in backs, with belly and head trimmed off.
Hemlock leather is used extensively and almost principally for men’s
and boys’ stiff-soled, heavy shoes, where no flexibility is required or
expected. Its principal desirable quality is its resistance to trituration, or
being ground to a powder, and its use in men’s and boys’ pegged,
nailed, or standard screw shoes is not in any way objectionable to the
wearer. In fact, for this class of shoes, it is probably the best leather that
can be used. But when hemlock is used in men’s and boys’ Goodyear
welt shoes, where a flexible bottom is expected and required, it
generally does not give good results. It cannot satisfactorily resist the
constant flexing to which it is subjected, and after the sole is worn half
through, the constant bending causes it to crack crosswise. On this
account it becomes like a sieve, and has no power of resistance in water,
and therefore it is not at all suited to flexible-bottomed shoes.
In “union-tanned” hides, both oak and hemlock are used and the
result is a compromise in both color and quality. This tan was first used
about fifty years ago. Twenty-five years ago the union leather tanners
began to experiment with bleaching materials to avoid the use of oak
bark, which was becoming scarce and high priced, and eventually
developed a system of tanning union leather with hemlock or kindred
tanning agents, excluding oak. The red color and the hard texture were
modified by bleaching the leather to the desired color and texture. This
produces leather which has not the fine, close tannage of genuine oak
leather and at the same time lacks the compact, hard character of
hemlock leather. Union leather produced in this manner is a sort of
mongrel or hybrid leather, being neither oak nor hemlock. On account of
its economy in cutting qualities, however, it is largely used in the
manufacture of medium-priced shoes where a certain degree of
flexibility is required in the sole. This is particularly true of women’s
shoes.
Union leather is sold largely in backs and trimmed the same as oak,
though not so closely.
Sole leather is also made nowadays by tanning the hides by the
chrome or chemical process. This leather is very durable and pliable and
is used on athletic and sporting shoes. It has a light green color and is
much lighter in weight than the oak or hemlock leather.
Many kinds of hide are used for sole leather. This country does not
produce nearly enough hides for the demand, and great quantities are
imported from abroad, although most of the imported hides come from
South America. Imported hides are divided into two general classes, dry
hides and green-salted hides.
Dry hides are of two kinds, the dry “flint,” which are dried carefully
after being taken from the animal and cured without salt. These
generally make good leather, although if sunburnt, the leather is not
strong. “Dry-salted hides” are salted and cured to a dry state. Dry hides
of both kinds are used for hemlock leather only, although all hemlock
leather is not made from dry hides.
Green-salted hides are used in making oak-tanned leather as well as
hemlock, and those used by United States tanners come largely from
domestic points; but there is a variable amount imported each year from
abroad, principally from Europe and South America. Green-salted hides
are of two general classes, those branded and those free of brands.
Cow and steer hides of the branded type are used by tanners of oak
and union leather. Those not branded are used more largely for belting
and upholstering leathers, a small part finding their way into hemlock
leather.
Sole leather remnants, strictly speaking, include such a wide variety of
items that it is difficult to cover them all. Few people, however, realize
the big range of usefulness of this class of stock. While not exactly a by-
product, remnants are often classed as such. Under the class of sole
leather remnants are included sole leather offal, such as heads, bellies,
shoulders, shanks, shins, men’s heeling, men’s half heeling, men’s and
women’s three-and four-piece heeling, etc. Stock that cannot be used in
the shoe business goes into the chemical and fertilizer trade, among
other outlets. By a special acid process of burning this stock, ammonia is
derived from it, which goes into fertilizer; and another by-product is
sulphuric acid for the chemical trade. The amount of ammonia obtained
is small, being about seven per cent of ammonia to a ton of sole leather
scrap. This is mixed with fertilizer and sold mostly in the Southern
States, and to a small extent in the West, there being a law in many of
the Western States against the use of fertilizer made from leather
products, on account of its low grade.

Sole Leather Offal

Showing bellies, shoulders, etc. Page 35.


In the disposition of offal, heads are used for taps, top lifts, and under
lifts. Shoulders are used for outsoles and inner soles, while bellies are
used for medium to heavy taps and counters. Lightweight bellies and
shanks are utilized for making box toes and counters.
Shanks are also used for taps and under lifts. This stock is solid and
substantial and well suited for these purposes. The bellies, being
flexible, are the best part of the hide obtainable for inner soles.
In cutting out soles, the manufacturer accumulates a considerable
quantity of solid or center pieces, which are used for small top lifts, also
for “Cuban” tops, thereby using up the bulk of the small heavy scrap
that ordinarily would be sold for pieced heeling. There is also a demand
for similar stock from the hardware trade, where it is used for making
mallet and tool handles, also for wagon and carriage washers. Large
quantities of men’s and women’s heeling and half heeling go to England,
where it is cut up by heel manufacturers into lifts and sectional lifts for
the English trade; there being a shortage of this class of offal there.
The shoe manufacturer, after cutting his soles and taps, is obliged to
skive them to get the particular iron he needs. This leaves what is
known as a “flesh sole shape,” also a “tap shape.” These skivings are
pasted together by another class of trade and again used for inner
soling and taps in the cheaper grades of shoes. Smaller skivings, or
waste, after sorting out the sole and tap shapes, are sold to the leather
board trade. This eventually comes back to the shoe trade in the shape
of leather board and is cut into heel lifts. The waste after cutting heel
lifts is again resold to the leather board trade and makes another round
trip to the shoe manufacturer. This illustration, as well as many others in
the leather remnant business, demonstrates the scientific principle that
nothing is ever entirely lost. In regard to pieced heel lifts, these are
made in either two, three, or four sections. This refers to what are
known as sectional heel lifts. Scrap leather is also used for shanking for
the European trade.
Soles and taps, known as rejects, that is, those thrown out by the
high-grade trade, are sold to manufacturers of cheaper lines. A shoe
manufacturer cutting his own soles and buying sole leather in sides,
after sorting out the soles suited to his own requirements, will sell what
he cannot use to remnant dealers, who in turn re-sell them to shoe
manufacturers requiring that particular class of stock. The scrap leather,
or remnant dealer, thus forms a useful link in the chain of distribution,
furnishing a market where shoe and leather manufacturers may dispose
of their surplus products to best advantage, and providing a source of
supply for buyers who wish any particular article to suit their individual
needs.
Upper or dressed leather is made from kips or large calfskins. It is
tanned and finished like all other forms of leather by variations of the
foregoing process. Thick hides are often split thin by machinery, and the
parts retained and finished separately. The parts of the leather from the
hair side are most valuable and are called “grain” leather; the inner
parts or “flesh splits” are made into a variety of different kinds of leather
by waxing, oiling, and polishing.
It is finished by scouring with brushes and then rubbed with a piece
of glass, which removes creases and wrinkles and stretches the leather.
Then it is stuffed with a mixture of oil, soap, and tallow, which is worked
into it by rolling. Various finishes are given to leather, such as seal grain,
buff, glove grain, oil grain, satin calf, russet, plain shoe, etc.
Upper leathers are blacked by rubbing with a mixture of lampblack
and oil or tallow, or with a solution of copperas and logwood.
No tanning process, no matter how good or thorough, can make firm,
serviceable, wear-resisting leather out of all portions of any hide,
because nature made some parts of every hide porous, spongy, and
lacking in fibrous strength.
Calfskins used by tanners are of several classes. American calfskins,
taken off in the United States and Canada, are usually sold green pelted.
Farmers raise only a small fraction of the calves born. Each cow must
produce a calf in order to insure a maximum flow of milk. Most of the
farmers keep cows to produce milk, hence they sell the young calves for
veal and use their skins for high-grade calf leather.
In European countries farmers fatten their calves before selling them
in order to get a higher price for the veal. The skin is not so valuable for
leather as the skin from younger calves, and it is used for lower-value
leathers.
Calfskin is not split. A heavier weight skin might be. It is shaved to a
uniform thickness.
Calf leather is divided into the following classes, depending upon the
finish of the leather:—
Boarded calf (made in both chrome and bark tannage).
Wax calf, finished on the flesh side with a waxy, hard surface.
Box calf is a proprietary name. It is boarded—rubbed with a board to
raise the grain. It is known by minute, squarelike lines.
Mat calf is a dull-finished calfskin, used more in topping.
Suede calf is finished on flesh side. Most makes of suede calf are
chromed, although there are some vegetable.
Storm calf is a heavy skin, finished for winter wear. Considerable oil is
used in finishing.
French calf is finished on flesh side.
Dry hides are obtained from Buenos Ayres, where the cattle are raised
on the plains. This city exports a large quantity of hides, dry, salted, and
cured by smoking. The hides of cows generally yield inferior grain
leather; but South American cowhides may be worked for light sole
leather.
Calves’ hides are thinner, but when well tanned, curried, and dressed,
they yield a very soft and supple leather for boots and shoes. They are
finished with wax and oil on the flesh side, and can also be finished on
the hair (grain of skin).
Calves’ skin (green salted).
Paris City calfskins. These are obtained in three grades—light,
medium, and heavy.
Light grades run from four to five, or seven to eight pounds; medium
grades run from seven to nine pounds; heavy grades run from nine to
twelve pounds.
Patent leather may be made from colt, calf, or kid skin. Coltskin is the
skin of young horses, or split skins of mature horses.
Patent colt and kid are used for the most part in the medium fine
grades, and patent side (cowhide) is used in the medium and cheaper
grades. Chrome tanned are used entirely in the manufacture of patent
leather.
Patent leather, as it appears in shoes, may be described either as
varnished leather, coltskin, or kid, and sometimes the French use
calfskin. The process is largely a secret one, although there is no longer
any patent on the principle of the same. It is made by shaving the skins
on the flesh side or hair side to a uniform thickness. Then it is de-
greased to put the skin in condition to receive the finish and protect the
same from peeling off. Successive coats of liquid black varnish are
applied, the first coats being dried and rubbed down, so as to work the
liquid thoroughly into the fibers of the leather. The last coat is applied
with a brush, and baked to from one hundred and twenty to one
hundred and forty degrees Fahrenheit for thirty-six hours and then
allowed to dry in direct sunlight for from six to ten hours, which seems
to be essential to remove the sticky feeling. Various ingredients are used
in making the different varnishes, the first coating consisting of naphtha,
wood alcohol, amyl acetate, etc. The black varnishes consist of linseed
oil and various other mixtures, heated in iron kettles. The final coating is
a naphtha preparation resembling japanning material. The hide is
stretched on a frame during the varnishing operations.
It is almost impossible to tell the difference in quality of shiny leather
by appearance, although in general the leather on which the grain
shows through the varnish will prove more serviceable than that on
which the finish is so thick as to hide the grain. Great care must be
exercised in resewing patent leather shoes that have been exposed
during the cold weather, as the cold has a tendency to freeze the finish.
Patent leather, like all varnished coatings, is liable to crack. No one can
guarantee it not to do so. The kid patent leather is more elastic and
porous than other kinds. The serious objection to the use of patent
leather for a shoe is its air-tightness. This makes it both unhygienic and
uncomfortable. The kid patent leather is the only patent leather that has
not this objection.
Kid is a term applied to shoe leather made from the skins of mature
goats. The skin of the young goat or kid is made into the thin, flexible
leather used for kid gloves, which is too delicate for general use in
shoes. The goats from which come the supply of leather used in this
country for women’s and children’s fine shoes are not the common,
domesticated kind known in this country, but are wild goats or allied
species partially domesticated, and are found in the hill regions of India,
the mountains of Europe, portions of South America, etc.
There are about sixty-eight recognized kinds of goatskins that are
imported from all over the world. The Brazilian, Buenos Ayres, Andean,
Mexican, French, Russian, Indian, and Chinese are a few of the many
kinds that are known as such. Each particular species of goat hide
possesses its own peculiarities of texture. The thickness and grain differ
according to the environment in which the animal has been raised. It is
peculiar that those raised in cold climates do not have as thick skins as
those raised in warmer climates, for the long, thick hair apparently takes
the strength.
We may wonder where all the skins come from that are made up into
glazed kid, mat kid, and suede, at the rate of several thousand dozen
every day. The great proportion of the skins are goatskins. These are
almost all imported from abroad, where the animals are slaughtered and
disposed of much the same as we dispose of beef and veal here.
Sheepskins and carbarettas, the hides of animals that are a cross
between sheep and goats, are also used.
The finer grades of kid and goatskins which are tanned in large
quantities in New England, come from the Far East.
In China there are two great ports from which skins are shipped,
Tientsin and Shanghai. Back in the interior, starting from a point about
twelve hundred miles from the sea, collectors make their rounds twice a
year.
The breeder of goats kills his flock just before the collector is due,
skins the animals on the hillside, preserves the meat for food, and with
the kidskins, which have been partly dried, wrapped in a bundle carried
upon the back, or upon a pack animal, the breeder makes his way to the
station. It may be that there are a half hundred breeders awaiting the
coming of the collector and he pays them the market price for the skins.
Whenever the collector has a sufficient supply to make it profitable to
ship, he bales the skins and then sends them over the thousand mile
journey along the river to the seaport. From Tientsin or Shanghai they
are taken by tramp steamers, which reach Eastern ports by way of the
Suez Canal, and on the trip the steamers make several ports, so that it
is from six to ten weeks before the skins reach America.
Another method of importing is to have the raw material shipped
across the Pacific and then transferred to a railroad, but the difference in
cost to the manufacturer is so great that it is unprofitable.
The China goatskins are rated as among the finest in the world and
when tanned they make the highest-grade shoe.
Then there are mocha skins, which come from Tripoli, Arabia, and
Northern Africa. In those places the method of collection is practically
the same as in China.
The two best-known grades are the Hodieda and the Benghazi. They
derive their designations from the exporting cities. Hodieda is located in
the southwestern part of Arabia on the Red Sea, while Benghazi is in
Barca, one of the provinces of Tripoli.
Other goatskins are produced in India and Russia, and millions of
skins are exported annually from Bombay, Madras, and Calcutta. These
skins are not brought direct to America, but are transshipped at
Marseilles or London.
The jobbers in Europe or India occupy rather a unique position, for
according to their practice it is almost impossible for them to suffer
financial losses in dealing with an American tanner. The latter, when he
wishes to arrange for his year’s supply of raw material, negotiates with
an agent in Boston, with whom he signs a contract for so many skins.
Then it is necessary for the tanner to either purchase with money equal
to the face value or secure by loans letters of credit from Boston
banking houses which have European connections.
Before the skins are exported, the jobber has his money from the
European banking concerns and the bills of lading are forwarded to the
Boston bankers, who turn them over to the tanners, and, when the
occasion requires, obtain from the tanners what is known as a deed of
trust.
All goatskins are tanned by the same chrome tanning process,
whether the finish is to be glazed or mat. The proportions of chemicals
vary according to the texture of the skin, and according to the grain.
The process of tanning is quicker than the tanning of heavier hides,
and all varieties of tannage are used, the chrome methods having come
into very general use. There are many kinds of finish given, such as
glazed, dull, mat, patent, etc. One quality that distinguishes goat
leather, the “kid” of shoemaking, is the fact that the fibers of the skin
are interlaced and interlocked in all directions. The finished skins as they
come from the tannery, by whatever process they may be put through,
are sorted for size and quality, a number of grades being made. Instead
of ripping straight through, like a piece of cloth, or splitting apart in
layers, as sheepskin will do when made into leather, the kid holds
together firmly in all directions.
Glazed kid is colored after it is tanned by submerging it in the color, a
very important process. The glossy surface is obtained by “striking” or
burnishing on the grain side. It is made in black and colors, particularly
tan, and is known by about as many names as there are manufacturers
of it.
Glazed kid is used in the uppers of shoes, making a fine, soft shoe
that is particularly comfortable in warm weather, and is said to prevent
cold feet in winter, owing to unrestricted circulation.
Mat kid is a soft, dull black kid, the softness being the result of
treatment with beeswax or olive oil. It is finished on the grain side the
same as glazed kid, and is used principally for shoe toppings. It is very
similar in appearance to mat calf and is often used in preference to it, as
it is of much lighter weight, and about as strong.
Suede kid is not tanned, but is subjected to a feeding process in an
egg solution, called “tawing,” to make it soft and pliable. The skin is
stretched and the color is applied by “brushing” (with a brush). The
color does not permeate the skin, but is merely on the surface. Suedes
are made from carbarettas and split sheepskins. Suedes are used very
extensively in making slippers, and come in a great variety of colors.
A castor kid is a Persian lambskin finished the same as a suede, and is
used in making very soft, fine-appearing leather—like glove leather. The
skin is of such a very light weight that it has to be “backed up” before
being made into shoes.
Fancy leathers are used extensively for toppings of shoes having
patent leather vamps. Facings are selected from fancy leathers to make
the inside of a shoe attractive and to increase its wearing quality.
Leathers of dull or glazed finish are used in typical shoe colors.
Miscellaneous kinds of kids are as follows:—

A. Kangaroo
B. Buckskin
C. Sheepskin
D. Chamois
E. Cordovan
F. Splits
a. Seal Grain
b. Buff
c. Oil Grain
d. Satin Calf
G. Enamel
H. Sides

Kangaroo is the skin of the animal of that name.


Buckskin is the skin of certain deer.
Sheepskin is the skin of the familiar domestic sheep.
Chamois is the skin of the animal of that name and by courtesy the
specially treated skins of certain domestic animals.
It is a simple matter to recognize a kid-skin among the various kinds
of upper leather, because of its very light weight and pliability.
During the winter, leather, in drying, is apt to become frozen,
especially where no well-equipped drying loft is provided. Such leather
becomes weak and limp if thawed out too rapidly. In freezing, the water
in the hides which have been hung up to dry is forced out and stretches
apart the hide fiber. The wetter the hides, therefore, the more
demoralized they will be by the frost. The treatment of rushing the
frozen leather into a warm room is inadvisable; the best method is to
allow the hides to hang as they were and to tightly close all openings to
the outside air. In case this is impossible, it is best to place the leather in
a heap, in a room where the temperature will not fall below the freezing
point, and to cover it with a cloth. In case the leather rolls up, it should
be moistened before the roll becomes greater than is customary; it will
thus become firmer throughout. Some upper leather and especially
sheepskins for lining purposes are aided by freezing, since the leather
becomes white and plump and also is of a bright color, though the
durability is somewhat lessened.
The popularity of white leather for shoes is increasing wonderfully.
There is good reason for this. The modern white shoes have a stylish
and fashionable appearance which has won the hearts of women of all
ages and conditions, and when they want a thing, there is always
alertness in supplying it. The new love for white shoes is interesting to
trace. Years ago white leather for shoes was made principally from
deerskins. But this leather, while attractive when new, would stretch
soon after being worn, and take on a yellowish tinge. Besides, the price
of such shoes was very high, and it is not surprising that they became
supplanted by the cheaper, but attractive and useful, white canvas
shoes, which became quick sellers during the season.
It is greatly to the credit of our tanners that they have been able to
perfect and put on the market a white leather for shoes which answers
all requirements satisfactorily. This leather is made from cowhides; the
white color will not fade nor turn yellow, and best of all, the leather can
be easily cleaned and made to look good as new. Another advantage is
that such leathers can be used in shoes that sell at popular prices.
There are many common, commercial grades of upper leather.
Willow calf is a fine, soft, chrome tannage of calfskin. It is sold in
three colors, light tan, ox blood, and olive-brown. The distinguishing
features of this leather are its durability and the fact that it always keeps
soft and pliable. It is adapted to the highest quality of men’s and
women’s shoes.
Box calf is a storm-calf leather of highest quality. It is a waterproof,
chrome tannage in a medium tan color, with a dull finish. This is the best
leather obtainable for rough, outdoor wear, walking shoes, hunting
boots, etc. It is also adapted to men’s and women’s very fine footwear.
There is a growing demand for this kind of shoe. In the uppers of the
best storm shoes you will always find box calf.
Royal kid is a black chrome calfskin, dull finished with a smooth,
natural grain of fine texture, soft and pliable. It is used for vamps and
whole shoes of the highest grades for men and women, and is a very
popular material for the fall and winter shoe. The desirable qualities of
fine calf leather are making the demand for it grow faster than the
supply of raw material increases.
Tan royal is a tan color, chrome calf leather, smooth finish, fine grain,
excellent cutting qualities, uniform, of medium rich tan shades. Tan calf
leather is very attractive and the tan shoe is now a staple product.
Cadet kid is a bright black, smooth-finished, chrome calfskin for men’s
and women’s fine shoes. This tannage and finish give a remarkable
cutting value. The stability of this stock is entirely unique and makes the
finished shoe stand up, keeping its much desired shape through the
different tests of manufacturing. It is said to be the best calfskin, by the
best judges, the shoe manufacturers.
Bronko patent is distinguished for its fine, coltskin-effect grain. It has
a rich and lustrous black patent finish. The results obtained from bronko
patent in its workings through the shoe factory and its wearing qualities
afterward have never been equaled. Bronko is one of the finest results
of the development of chrome patent leather.
Cadet kid side is a chrome side leather that closely imitates the
calfskin, called cadet kid. It has a bright, lustrous finish, and a
remarkably fine grain. It is surprisingly like fine calf leather in
appearance.
Cadet calf sides are similar to cadet kid sides with the exception of a
boarded finish. This is another black chrome, side leather which comes
very near to a calfskin.
Mat royal chrome side is a special finish, closely resembling calf, used
for the tops of men’s and women’s medium fine shoes.
Black hawk patent is a well-tanned, well-finished patent leather for
medium-priced women’s shoes and for tipping.
Colored box chrome side, boarded, is a substitute for willow calf.
Black box chrome side, boarded, is a substitute for box calf in medium
fine shoes.
Kangaroo kid side is a back-tanned, dull, smooth, black leather nearly
like calf, used in the tops of men’s shoes, and men’s and women’s whole
shoes.
Waterproof black is a high quality leather of great durability for men’s
and boys’ heavy shoes. Waterproof brown is similar to waterproof black,
except in color, and is a leather made for hard service.
Amhide black is a soft, dry, high-grade tannage for lightweight,
comfortable, sporting, work, and hard-wear shoes.
Amhide russet is like black amhide in everything but color.
Hercules storm chrome is a leather distinguished for its fine grain and
good appearance of medium heavy weight.
Boris is a heavy-weight, soft, waterproof leather for men’s medium
quality shoes. It is finished in three colors and black.
Zulu is a medium-priced leather, which makes a very fine wearing
heavy shoe. It is made in two colors and black.
Bison is a colored or black-finished leather, of a high grade, very
comfortable and durable.
Ottawa is of two colors and black finished, and is suitable for high
quality, heavy, rough shoes.
Sheboygan calf is a heavily stuffed, soft, waterproof leather. It is of
two colors and black.
Dongola calf is a black leather used for durable, medium-priced,
heavy, outdoor shoes.
Belt knife splits are sold in several tannages and finishes of the most
improved manufacture. These splits are sorted in all weights. Uniform
selection is maintained, and the quality in every way is of the highest
order.
Oxford calf union splits is one of the highest grades of grain-finished,
union splits. It has an extremely soft and fine appearance.
Cambridge calf union splits have a most careful and high-grade finish,
but somewhat firmer than Oxford calf.
Flesh splits are sold in two tannages. These are the highest-grade
flesh splits that it is possible to make, and they are a long distance
ahead of the ordinary flesh splits, their improved finish making them a
modern and largely used substitute for satin.
Ottawa black and russet splits include a variety of printed splits, used
for shoes in combination with grain leather and for whole shoes. They
are selected in many weights.
Flexible splits for Goodyear, gem, McKay inner soles, is leather that
offers the greatest advantages to large and small buyers. It is the
product of six different tanneries, assorted in all the usual weights.
Great care is taken in the manufacture of these splits to adapt them
perfectly to the shoe manufacturer’s needs.
Flexible bends are used by manufacturers of Goodyear welt shoes
requiring a straight Goodyear or gem inner sole. They find these bends
of great advantage on account of the small amount of waste, the
strength and desirability of stock. They are made in six tannages.
Chrome flexible splits for inner soles furnish a very strong and durable
leather for inner soles, taps, and outer soles.
Ooze gusset splits, colored, give a very low-priced leather suitable for
gussets, bellows tongues for high-cut boots, also for the quarter-linings
of Oxfords.
Ooze vamp splits, black and colored, are strong, durable, low-priced
leathers suitable for cheap work shoes where waterproof qualities are
not required.
Chrome-tanned embossed splits, colored, are made in a great variety
of patterns for cheap shoes and other work where leather is required.
They are durable and low priced.

Leather for Belting


A native steer about four years old, killed in the month of October,
affords the best example of a good hide for belting manufacture, that is,
for the transmission of power from pulley to pulley. At this age and at
this season the steer is in prime condition.
On account of the great and enormous strain put upon belting, and
the necessity for its running true upon the pulley, it should be of the
highest grade possible, combining great strength to prevent stretching,
and evenness of grain to insure long wear; therefore only hides of
selected steers are serviceable, and these in turn are rejected when they
contain any blemishes or cuts or other imperfections. After a hide is
accepted for belting purposes, it is subjected to a generous trimming,
the head, neck, legs, and belly being cut away, leaving only a small and
compact section embracing from two to two and a quarter feet on each
side of the backbone and extending about six feet along the same from
the tail forward. This is the portion of the hide where the fibers are
closely and firmly knit together, and where the vitality is the greatest,
due to the close proximity of the network of nerves radiating from each
side of the spine to all parts of the hide.
The hides of the bull and cow of every breed are inferior for belting
purposes to that of the steer. The hide of the bull is coarse and hard,
with the neck very heavy and full of wrinkles, causing a variation in the
thickness and run of the grain of the leather. The hide of the cow is thin,
does not run uniform in thickness, being heavier on the hips than at the
shoulder, and is lacking in the firmness necessary in good belting. The
sharp angles of the hip bones of a cow also tend to form pockets in the
hide.
After the hide has been trimmed, it is subject to the process of
“currying.” All membranes or particles of flesh adhering to the hide are
removed by a machine which shaves the membrane, etc., off, with
lightning rapidity. The leather is then washed and scoured by machine,
which removes all dirt still adhering to the hide. After the leather is
thoroughly cleaned and while in a damp state, it is placed upon the
table, and greases, composed of pure animal oil, are worked into the
leather on both the grain and the flesh side with brushes. This is carried
on in the cold state. It is then put into a large revolving wheel
containing water heated to a high degree, which causes the leather to
swell and pores to open. The leather is then taken out and put into
another wheel containing heavy mineral oil and heated several degrees
greater than the water, and tumbled about in the wheel until the heavy
oil fills the distended pores and fibers. After this, the leather is allowed
to dry.
The hides are allowed to remain for several months in the tan liquor
until the green hide is changed into leather.
After the hide has been changed into leather, it is stretched. To
properly stretch the leather for belting purposes, it must first be cut so
as to remove that part which shows the markings of the backbone of
the steer.
Leather is stretched by placing it in clamps, every part of the piece
getting the same pull. (The leather is put into the clamps while damp, as
damp leather will give the greatest amount of stretching.)
When the stretching process is completed and the leather has
thoroughly dried in stretching clamps, it is released. These pieces of
leather are quite dry, very firm, and not very pliable. The leather is now
moistened in order that it shall be more pliable as it passes through the
finishing processes. After the water has soaked into the leather (called
sammied), it becomes very soft. It is then subjected to a roller under
heavy pressure to take all the unevenness out of the hide. It is next
thoroughly dried, causing the fibers to shrink; then again moistened and
put through a polishing machine, which acts on the same principle as
the rolling jack.
The sides and centers are now put through a cutting machine, which
reduces the leather to strips of different sizes.
Belts are put together by cementing the parts. Belt cement is a most
powerful adhesive. It actually governs the strength of the belt, as the
belt is as strong as the weakest part of the joint.
Rawhide Products
Rawhide is used for a great many purposes. After the side of leather
has been trimmed of the portions that cannot be used, it is sold to the
lace maker. He measures the same in a machine.
The trimmings from the side of the hide may be used for a mallet
head or other tools made of leather. The most common products of the
strong section of rawhide strings are shoe strings, belting laces, and
parts of harnesses. It is also made into leather shoe strings that are
used in the logging camps.
When the hide is selected for the rawhide purposes, it is first passed
to a de-hairing machine, where all the hair is removed. It is then
fleshed; that is, all loose membrane and any flesh that may have
adhered to the hide are removed from the flesh side. The rawhide is
then placed in a special bath for the purpose of opening the pores,
before the oils and greases are added to it. After this bath, it is dried
thoroughly in a hot box and then put into wheels which mill the greases
into the hide.
The hide, which is made hard by this drying process, is put through
breakers, where it is thoroughly worked into soft and pliable form.
The hide is next passed to the setting-out machine, which finishes all
forms of leather—by condensing and strengthening the fibers. Special
oils are applied to both the grain and flesh side of the hide. It is finished
by hand and cut into laces. This hand finishing is usually done in order
to reject all parts that are not perfect.
Haired leather is tanned by acid—a quicker method. The hide is split
into sides and tanned with the belly stock on them, which is used for car
straps, cowbell straps, trunk straps, and riding bridles.

The By-products of a Leather Belting Factory


There are a great many by-products in a leather belting factory, all of
which are used. The finest strips are used for whip lashes, small pieces
are used for the French heel, and the extremely small pieces are used in
leather mats.
The by-product from the belting bull, which is about fifty per cent, is
used for shoe leather and leather straps. There is considerable leather
taken from the belting bull for certain harness work. The belly is thick
and porous though not tough, and is used for halters, cow bridles, and
other parts of harness where the strain is not great.

Round Belt Making


Round belt is made from the best belting, but while the strain on
round belting is not severe, the leather must be soft and pliable. It is
selected from regular stock of native steer hide.

Properties of Tanned Leather


Leather that has been tanned is made up of a great many little
bundles of fibers. The coarser and stronger fibers are on the inside, and
the very fine and smoothly laid fibers are on the outside. These fibers
are so intertwined and so elastic that when the leather bends these
bundles play on one another. On account of the smoothness of the
surface it may be polished, and beautiful finishes and effects obtained
on the leather.
The elasticity of leather (which is due to the elasticity of its fibers)
allows it to stretch to a great extent. The tendency to return to its
original position is very strong at the beginning, but grows weaker if the
strain is continued at any one point. Of course, in stretching the leather,
there is always a corresponding drawing in another part of the shoe,
which gives it a worn and baggy appearance.
When shoes are removed from the feet, they are oftentimes damp,
due to perspiration. The stretched or strained fibers are apt to shrink
and return to their original position. In order to avoid this, it is necessary
to place shoe-trees in them.
When the linings of shoes are exposed to friction and excretion of
perspiration from the feet of some people, they deteriorate. This is due
to the fact that the acids of perspiration (acetic, formic and butyric
acids) have become so concentrated that they act on the fibers of the
leather. These acids exert a burning effect, causing the fibers to lose
their elasticity so that they no longer play on one another, but become
fastened to each other. The result is that they become hard, and any
attempt to bend the leather tears them apart; and once the union of
fibers is destroyed it cannot be repaired.
In order to keep the fibers in such a condition (soft and flexible), they
should be lubricated often (twice a week) with a liquid followed by a
wax paste, usually called shoe dressing. When a brush or a piece of
cloth is rubbed over the surface of leather containing the shoe lubricants
(shoe polish), it produces a smooth surface called a “shine.”
Compounds which shine without friction produced by brush or cloth
should not be used, as they are simply varnishes and one coat on top of
the other destroys the leather.

Substitutes for Leather


In olden times our fathers and mothers used handmade shoes, and
wore them till they had passed their period of usefulness. At that time
the consumption did not equal the production of leather. Knowledge of
conditions in the great western countries to-day will show that many of
the big cattle-raising sections, once famed for their cattle, have been
taken up by homesteaders and are now producing grain instead of
cattle. But since the appearance of the machine-made shoe, different
styles of shoes are placed on the market at different seasons, to
correspond to the change of style of clothing, and shoes are often
discarded before they are worn out. We have not been able thus far to
utilize cast-off leather as the shoddy mill uses wool and silk, etc. The
result is that the consumption of leather is above the production,
therefore substitutes must be used.
In shoe materials there is at present an astonishing diversity and
variety. Every known leather is used from kid to cowhide, and textile
fabrics have developed rapidly, especially in the making of women’s and
children’s shoes. The satins, velvets, serges, and other fabrics that are
used in the manufacture of shoes must be firm and well woven, and are
usually supplied with a backing of firm, canvas-like fabric, to give
strength.
As to wearing quality the old saying, “There is nothing like leather,”
still holds good; but people do not buy shoes for their wearing qualities
alone in these days. Style and intrinsic beauty are considered, and have
a cash value just as in any other article of apparel.
Each fabric is made of two sets of threadlike yarn woven at right
angles to each other. They are called the warp and filling (weft). The
warp is composed of yarn running the longest way of the fabric, and
filling runs the short way of the fabric. Since the warp is the body of the
cloth, it is its strongest part and all fabric in shoes should be placed
warpwise across the foot of the wearer, so as to be able to resist the
great strain.
Various attempts have been made for legislation to prohibit the
treating of leather by chemicals or the use of substances to increase its
weight. Complaints have been made by a number of shoe manufacturers
that the excessive use of glucose (a form of sugar) in sole leather has
resulted in injuring the leather and fabrics composing the uppers of
shoes.
Representatives of large leather firms claim that the methods of
tanning sole leather have radically changed during the last few years,
and that the small quantity of glucose and epsom salts that is used to-
day in finishing sole leather is absolutely necessary to its value, and is in
no sense an adulterant or weighting material. Shoe manufacturers, on
the other hand, claim that in some cases larger amounts of glucose,
salt, etc., have been added to the soft leather from the belly of the
animal, in order to give it the desired stiffness. On account of the high
price of leather, various attempts have been made to find a substitute
for it. Most of these substitutes consist of strong cloth treated with some
drying oil like linseed, the oil having previously been mixed with other
solid substances.
A prize of five thousand francs has been awarded to a Belgian
inventor, Louis Gevaert, for his unusually superior artificial leather. The
process consists in the more or less intimate impregnation of stout cloth
with tannic albuminoid substances. Shoes made of this are said to
possess not only the resistance and elasticity of natural leather, but its
durability of wear. Moreover, they are much cheaper, costing, including
manufacture, only four francs (about eighty cents) and being sold at
about six francs per pair.
CHAPTER FOUR
THE ANATOMY OF THE FOOT

Very few people, even among those engaged in the shoe industry,
know much of the anatomy of the foot. Yet it is evident that they ought
to know something about it in order to furnish the foot with a proper
covering.
The first thing that strikes a person on looking at the human foot is its
large proportion of bone. On pressing its top surface and that of its
inner side, the amount of flesh will be found to be very small, indeed.
The same is true of the inner and outer ankle. The extreme back of the
ankle has scarcely any flesh covering. The most fleshy portions of the
foot are its outer side, the base of the heel and the ball of the big toe.
The reason for this disposition of flesh is to protect or cover those
parts of the foot that support the body by coming in contact with the
ground. They act as pads and lessen the concussion. The abundance of
flesh on the outer side of the foot is to protect or act as a shield against
danger. The inside of the foot is not exposed as much as the outside.
The foot is divided into three parts, the toes, the waist and instep,
and the heel and ankle. The largest bone of the foot is the heel bone
(called calcaneum). It is the bone that projects backward from the
principal joint and forms the main portion of the heel. When a person is
flat-footed, this bone is thrust farther backward than nature intended to
have it. The connection between it and the tarsal bones is lost.
The Bones and Joints of the Human Foot.

The Different Parts of the


Foot and Ankle. See page
86.

The top bone of the foot is the astragalus, and it forms the main joint
upon which the process of walking depends. This bone has a smooth,
circular, upper surface that connects it with the main bone of the lower
leg. It is absolutely necessary that this bone should be in perfect
harmony (relation) with the others in order to insure comfort and health.
If the arches of the foot are forced out of position, up or down or
sidewise, this joint is not permitted to do its work normally.
Rheumatism is a frequent evil of an injured joint. Hence the necessity
of absolutely normal action, unhampered by ill-fitting shoes.
The principal arch of the instep is called the cuneiform or tarsal bone.
Persons are troubled with defective insteps to quite an extent.
Misshapen joints at this point due to shoes that do not fit and
consequently disarrange and throw out of position the delicate, natural
structure, work great havoc with the comfort of the foot. Nine joints
cluster at this point.
The bones of the toes are called the metatarsal bones and phalanges.
There can be no doubt that nature intended mankind to walk in his bare
feet, and in that event the phalanges of the foot would occupy a much
more important part than is now the case as a result of modern
civilization. There are nineteen bones in the foot, and the disturbance of
one or more of these will serve to upset the entire foot by throwing out
of relationship the general unit of work devolving upon the whole
number of joints and bones. Each joint has its accompaniment of
muscles, and each lack of alignment of bones and joints provokes
discord and lack of harmony in the muscular action.
Muscles are attached to bones, and by their contraction or extension
the bones are moved. Very few movements are effected by means of a
single muscle. The muscles of the foot in nearly all cases are in
combination, and are so complex in their action that the best surgeons
find it difficult to describe them satisfactorily.
The chief characteristics of the foot are its spring and elasticity. While
the foot has wonderful powers of resistance and adaptability, it is the
shoemaker’s duty not to strain the same, but to provide for each action.
The most sensitive part or the one part that is most susceptible of
injury is the big toe. This is due to the fact that the tendency of the foot
in walking is to travel toward the toe of the boot, and in a word to press
into rather than shun danger. The shoemaker provides for this, first, by
allowing sufficient length of sole to extend beyond the termination of
the toe, and second, by the fit of the upper and the preparation of the
sole. In this way, if the toe of the shoe strikes against a hard substance,
the big toe of the foot will remain untouched.
Seventy-five per cent of the people have more or less trouble with
their feet. Some of these troubles are caused by the manufacturer
putting on the market shoes whose lines look handsome and attractive
to the eye, but are lacking in any other good features. Shoes that fit
properly should have plenty of room from the large toe joint to the end
of the toes, and also should have plenty of tread, especially at this point.
A mere glance at our bare foot will show conclusively that pointed-toe
boots are false in the theory of design. The toes of a foot when off duty
touch each other gently. When they are called on to assist us in walking
or in supporting our body, they spread out—although not to any great
extent. This, then, being the action, no sensible maker of boots and
shoes would attempt to restrain them. Box or puff-toe shoes allow the
greatest freedom.
The pointed-toe shoes, which join the vamp to the upper immediately
over the big toe joint, exceedingly high heels, and thick waist shoes are
not for the best interests of the foot.
The evils of ill-fitting shoes are corns, bunions, and calluses.
Corns are mainly due to pressure and friction. When the layers of skin
become hardened, they form a corn, which is merely a growth of dead
skin that has become hard in the center. This hardened spot acts like a
foreign body to the inflamed parts.
A hard corn is formed more by friction than pressure. It is produced
by the constant rubbing of a tight or small shoe against the projecting
parts of some prominent bony part, as the last joints on the third,
fourth, and little toe. When this action continues, it produces
inflammation. Rest—as relieving the feet of the friction—decreases this
inflammation, leaving a layer of hardened flesh. Renewed action
reproduces the same effects, leaving behind a second layer of hardened
flesh. This continued action and reaction brings on a callus, rising above
the surface of the skin. This increases from its base. An ordinary hard
corn may be removed by scraping up the callous skin around its border,
and prying out carefully with a knife. Soft corns are chiefly the result of
pressure or friction. These corns are soft and spongy elevations on the
parts of the skin subjected to pressure. Soft corns are mostly found on
the inner side of the smaller toes. Those on the surface of joints by
mechanical action will become hard.
The blood corn is excessively painful. It is the result of an ordinary
corn forcibly displacing the blood vessels surrounding it, and causing
them to rest upon its surface.
The bunion is an inflammatory swelling generally to be found on the
big toe joint. The chief cause of bunions is known to be the wearing of
boots or shoes of insufficient length. The foot, meeting with resistance
in front and behind, is robbed of its natural actions, the result being that
the big toe is forced upward, and subjected to continuous friction and
pressure. The wearing of narrow-toe boots that prevent the outward
expansion of the toe is another cause.
The comparisons of quantities are often called ratios. The ratios of the
different parts of the foot to the height are different in the infant from
that of the adult period. Between these two periods the ratios are
constantly changing.
There are two series of shoe sizes on the market; the smallest size of
shoe for infants (size No. 1) is, or was originally, four inches long; each
added full size indicates an increase in length of one third of an inch
(sizes 1 to 5). Children’s sizes run in two series, 5 to 8, and 8 to 11;
then they branch out into youths’ and misses’; both running 11½, 12,
12½, 13, 13½ and back again to 1, 1½, 2, etc., in a series of sizes that
run up into men’s and women’s. Boys’ shoes run from 2½ to 5½; men’s
from 6 to 11 in regular runs. Larger sizes usually are made upon special
orders. Some few manufacturers go to 12. Women’s sizes run from 2½
to 9. Some manufacturers do not go above size 8. The rate of sizes is
sometimes varied from by manufacturers of special lines of shoes. A
man’s No. 8 shoe would be nearly eleven inches long. These
measurements originated in England and are not now absolute.
A system of French sizes is used which consists of a cipher system of
markings to indicate the sizes as well as widths so that the real size may
not be known to the customer.
All feet are not alike in structure and shape. In infancy the foot is
broad at the toes, which press forward in the direction of their length.
The heel is small in comparison to the width of the toes, and also short
in length, due to the undeveloped bones. But during growth, the
thickness above the heel bones disappears, and the heel itself becomes
thicker and assumes the beauty of perfection at maturity. This
development is due to the growth of bones which must be well
exercised and properly cared for during this period. The various parts of
the feet and legs do not mature at the same rate—those at the upper
part of the body increase at a greater rate than the lower parts. Thighs
develop first, next the upper part of the legs, and lastly the feet.
The adult foot, when properly formed, is straight from heel to toe on
the inner side, and is wider across the joints than one inch or so farther
back. The manner of walking has a considerable bearing on the
character and development of the foot.
There are many sorts of feet, which are due to a number of causes,
such as habits, climate, occupation, locality, etc. As a general rule we
may divide the feet into four classes: Bony feet—those with very little
flesh upon them; hard feet—those that have plenty of flesh, but which
are almost as hard as a stone; fat feet—plump, with plenty of flesh, but
having little shape; spongy feet—those that seem to have no bones in
them, usually found in the female sex.
The characteristics of a foot are common with the body to which it is
connected. Some people have a strong, bony frame, with strong, firm
muscles, prominent bones and muscles, and a flesh that is hard. The
feet of this type of person are usually long, bony, and arched, with a
well-developed big toe joint. The heel measurements are large in
proportion. A soft foot is prevalent among the Scotch. The feet of a
person who is delicately shaped, with a small frame and thin, small,
tapering muscles, are usually thin and finely formed, giving evidence of
quickness. This kind of a foot in a man has a tendency to develop a flat
foot.
A person with a form inclined to plumpness, full of exercise and
activity, and a good circulation, has a well-developed foot. The heel is
round and fairly prominent, although there are no special bony
prominences. On the other hand a person with a body of general
roundness, but with tissues and muscles flabby, and a languid blood
circulation, has feet that are short, soft, and flabby.
We will allow that these four different kinds of feet all measure a 4
size and D in width. One would naturally think that the same size shoe
would fit them all, but this is not so. This size shoe will only fit one and
that is the bony foot. The hard feet require a C½ width; the fat feet
require a C width, and the sponge feet require a B width.
The same last may, and often will possess a slight variation in some
manner or other. The fitter of feet must know the stock, each pair, and
be on intimate terms with the peculiarities of each last and the inside
lines of each pair of shoes before attempting to try them upon the feet
of the customer.
Different makes of footwear are apt to be manufactured over a
slightly varying system of measurements. One line of shoes made over a
small measure may be longer or shorter or narrower or wider than some
other line. The heel measurements require careful study for each line
introduced. The peculiarities of each line must be tested by tape and
measure, and the foot fitter must have a strong knowledge along these
lines.
We should measure the foot by the stick if necessary, and make a
note of the size and width that will be likely to prove a fit. The height of
the arch must be considered, and the shape of arch curve, the shape of
the instep, and the general contour of the foot. A normal foot will show
about a half-inch arch. The average foot will carry from an inch to an
inch and a quarter heel, without putting a strain on any of the joints of
the foot. Some feet vary from this by a wide margin. A foot is a trifle
longer in walking than in repose. Allowance should be made, in using
the measuring stick, over what the foot actually draws on the stick. In
men’s shoes the allowance, should be from two to two and one half
sizes.
When a one-legged man buys a shoe, the dealer sends to the factory
a shoe to match the one left remaining. In these days of the use of
machinery in every process of their manufacture, shoes are made with
the utmost exactness and precision, and it is easily possible to mate that
remaining shoe with the greatest nicety in size, style, material, and
finish.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like