100% found this document useful (3 votes)
1K views

Building Modern Web Applications with ASP NET Core Blazor Learn how to use Blazor to create powerful responsive and engaging web applications Brian Ding 2024 scribd download

responsive

Uploaded by

buchyadibafv
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
100% found this document useful (3 votes)
1K views

Building Modern Web Applications with ASP NET Core Blazor Learn how to use Blazor to create powerful responsive and engaging web applications Brian Ding 2024 scribd download

responsive

Uploaded by

buchyadibafv
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/ 40

Experience Seamless Full Ebook Downloads for Every Genre at ebookmeta.

com

Building Modern Web Applications with ASP NET Core


Blazor Learn how to use Blazor to create powerful
responsive and engaging web applications Brian
Ding
https://ebookmeta.com/product/building-modern-web-
applications-with-asp-net-core-blazor-learn-how-to-use-
blazor-to-create-powerful-responsive-and-engaging-web-
applications-brian-ding/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Microsoft Blazor: Building Web Applications in .NET -


Second Edition Peter Himschoot

https://ebookmeta.com/product/microsoft-blazor-building-web-
applications-in-net-second-edition-peter-himschoot/

ebookmeta.com

Architect Modern Web Applications with ASP NET Core and


Azure Steve "Ardalis" Smith

https://ebookmeta.com/product/architect-modern-web-applications-with-
asp-net-core-and-azure-steve-ardalis-smith/

ebookmeta.com

Architect Modern Web Applications with ASP NET Core and


Azure Steve "Ardalis" Smith

https://ebookmeta.com/product/architect-modern-web-applications-with-
asp-net-core-and-azure-steve-ardalis-smith-2/

ebookmeta.com

Handbook of Hormones: Comparative Endocrinology for Basic


and Clinical Research, 2nd Edition Hironori Ando

https://ebookmeta.com/product/handbook-of-hormones-comparative-
endocrinology-for-basic-and-clinical-research-2nd-edition-hironori-
ando/
ebookmeta.com
The ADA Practical Guide to Dental Implants 1st Edition
Luigi O. Massa

https://ebookmeta.com/product/the-ada-practical-guide-to-dental-
implants-1st-edition-luigi-o-massa/

ebookmeta.com

Children and Childhood in the Ottoman Empire From the 15th


to the 20th Century 1st Edition Gülay Yilmaz Editor Fruma
Zachs Editor
https://ebookmeta.com/product/children-and-childhood-in-the-ottoman-
empire-from-the-15th-to-the-20th-century-1st-edition-gulay-yilmaz-
editor-fruma-zachs-editor/
ebookmeta.com

1 Crime Wave Maggie PI Cozy Mystery 01 Rose Pressey

https://ebookmeta.com/product/1-crime-wave-maggie-pi-cozy-
mystery-01-rose-pressey/

ebookmeta.com

Lignin Conversion Catalysis Chaofeng Zhang

https://ebookmeta.com/product/lignin-conversion-catalysis-chaofeng-
zhang/

ebookmeta.com

Zero Escape Maximum Exposure 3 1st Edition Kendall Talbot

https://ebookmeta.com/product/zero-escape-maximum-exposure-3-1st-
edition-kendall-talbot/

ebookmeta.com
Development Environment and Migration Lessons for
Sustainability 1st Edition S Irudaya Rajan Editor
Debabrata Baral Editor
https://ebookmeta.com/product/development-environment-and-migration-
lessons-for-sustainability-1st-edition-s-irudaya-rajan-editor-
debabrata-baral-editor/
ebookmeta.com
Building Modern
Web Applications
with
ASP.NET Core Blazor
Learn how to use Blazor to create powerful,
responsive, and engaging web applications

Brian Ding

www.bpbonline.com
Copyright © 2023 BPB Online

All rights reserved. No part of this book may be reproduced, stored in a


retrieval system, or transmitted in any form or by any means, without the
prior written permission of the publisher, except in the case of brief
quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the
accuracy of the information presented. However, the information
contained in this book is sold without warranty, either express or implied.
Neither the author, nor BPB Online or its dealers and distributors, will be
held liable for any damages caused or alleged to have been caused directly
or indirectly by this book.

BPB Online has endeavored to provide trademark information about all of


the companies and products mentioned in this book by the appropriate use
of capitals. However, BPB Online cannot guarantee the accuracy of this
information.

First published: 2023

Published by BPB Online

WeWork

119 Marylebone Road

London NW1 5PU


UK | UAE | INDIA | SINGAPORE

ISBN 978-93-55518-798

www.bpbonline.com
Dedicated to

My beloved parents:
Zhong Ding
Yi Hu
&
My wife, Haoran Diao
About the Author

Brian Ding has over 8 years of experience in TypeScript and .NET


development, specializing in areas such as WinForm, WPF, ASP.NET, and
ASP.NET Core. Currently employed at BMW Archermind Information
Technology Co Ltd, he holds the position of tech leader, where he focuses
on creating engaging digital driving experiences for BMW customers.
Throughout his career, Brian has worked in diverse domains including
Software Development, DevOps, Automation tools, and Cloud
Technologies. His passion lies in coding and developing scalable solutions
that are easy to maintain and adaptable.
About the Reviewer

Trilok Sharma is a seasoned technical architect with 14 years of expertise


in designing, developing, and implementing enterprise-level solutions on
the Microsoft technology stack. Throughout his career, Trilok Sharma has
demonstrated mastery in Microsoft technologies, including Blazor Server,
Blazor Web Assembly (WASM), .Net 7.0, Net Core, C#, Angular, React,
SQL Server, Azure, and AWS. He has a strong command over object-
oriented programming principles and has leveraged their knowledge to
architect scalable and efficient applications.

With their strong technical understanding, attention to detail, and


commitment to quality, Trilok Sharma continues to make valuable
contributions as a technical reviewer in the Microsoft technology space.

Trilok holds a Bachelor's in Computer Science and MBA in Project +IT


Management.
Acknowledgement

This book would not exist without the help of many people, mostly
including the continuous support from my parents and my wife's
encouragement for writing the book. They've taken most of the housework
so that I can focus on writing the book — I could have never completed
this book without their support.

My gratitude also goes to the team at BPB Publications for being


supportive enough to provide me with quite a long time to finish the book.
This is my first book ever, and I would like to thank them for their
professionalism, guidance, and patience along the way.
Preface

This book covers many different aspects of developing Blazor


applications, a modern way to build rich UI web applications. And this
book introduces how to leverage .NET and its eco-systems to build a
modern enterprise application. This book will introduce WebAssembly
and how it enables web applications to be written in any programming
language. It also compares different Blazor hosting models and the
strategy to select a model that suits that business requirements.

This book takes a demonstrative approach for Blazor learners. Every


chapter comes with a lot of code examples and Blazor source code
analysis. It covers basic Blazor directives and components and how these
concepts can be combined together to build a more complex customized
component. This book also explains some advanced techniques to control
component rendering and improve performance.

This book is divided into 13 It will start with the introduction of


WebAssembly and cover the basic concepts in Blazor Framework and
some advanced techniques you may find handy when developing
production-ready applications, as well as explaining source code
structures and designing patterns and styles. So, readers can learn from the
bottom how a Blazor application is running. The details are listed below.

Chapter 1: WebAssembly will introduce what WebAssembly is and the


roadmap of WebAssembly. The chapter will explain why WebAssembly is
proposed while JavaScript is powerful enough. A hello world
demonstration is given by compiling C/C++ source code into
WebAssembly. Calling WebAssembly functions from JavaScript code will
also be discussed. WASM binary format will be discussed along with the
introduction to different sections in the binary code. It will introduce the
popular languages that can produce WebAssembly modules, and
ASP.NET Core Blazor is one of those platforms that can be leveraged to
build web applications beyond WebAssembly.

Chapter 2: Choose Your Hosting will discuss WebSocket and compare the
difference between WebSocket and HTTP. Will introduce SignalR, a .NET
library that implements WebSocket and can fallback to long polling for
compatibility. This chapter will introduce the basic structure of a Blazor
application and compare three different Blazor hosting models, Blazor
Server, Blazor WebAssembly, and Blazor Hybrid.

Chapter 3: Implementing Razor and Other will cover basic components.


Blazor applications are made of components, and they share many useful
features, including directives, binding, cascading, and event handling. It
will explain the lifecycle of a typical component by introducing those
virtual lifecycle methods that can be overridden. It will introduce layout, a
special component type that can be useful in building an application with
multiple functional spaces. Will introduce some popular third-party
libraries that we can use to build enterprise applications.

Chapter 4: Advanced Techniques for Blazor Component will cover the


components source code and learn more advanced components features.
You will learn how to reference other components in code, how to
preserve components, how to use components with a template, and how to
define a CSS style dedicated to a specific component using CSS isolation.
Chapter 5: File Uploading in will cover the common file transfer protocols
and compare the differences between them. Will learn the component used
to upload files in Blazor Framework. This will explain the source code
and detail usage with code examples.

Chapter 6: Serving and Securing Files in will explain one of the most
important mechanisms in ASP.NET Core, middlewares. Middles work as
pipelines handling the requests from clients. We will cover serving static
files and dynamic files in Blazor framework, and a few basic security
rules you will apply to protect servers from attacks.

Chapter 7: Collecting User Input with will cover web forms which are
generally used when data input is required from application users. Will
explain the default data validation implemented in the source code and
how to customize validation rules and error prompts. Will cover some key
events and concepts in Blazor forms, including submission, context, and
state.

Chapter 8: Navigating Over will cover page navigations in a Blazor


application. An enterprise level application usually needs multiple pages
to fulfil a complete business requirement. It will also explain the key
routing components in Blazor framework with source code and introduce
different types of routing with parameters. And we will cover the
navigation events and how to navigate in an asynchronous approach.

Chapter 9: .NET and JavaScript will cover serialization and


deserialization with JSON, a common way to communicate between web
services, and that applies to the interop between .NET and JavaScript as
well. Will explain how to load customized JavaScript code in a simple
approach and in a more dynamic approach. Will cover calling JavaScript
from .NET and the vice versa, with code examples. Will introduce some
advanced topics related to .NET/JavaScript interop in Blazor, including
cache, element reference and type safety.

Chapter 10: Connecting to the World with will cover the most famous
HTTP protocol, and the separation of front-end and back-end services.
HTTP protocol is mostly used between the front-end and back-end. Will
cover the limits and risks come with the CORS when applications are
connected using HTTP protocol. Will explain built-in types HttpClient
and HttpClientFactory that will be used when communicating with the
outside world with the source code. Will cover RPC and gRPC, an
implementation of RPC from the Google with code examples.

Chapter 11: Data Persistence with EF will cover data persistence with
EntityFramework Core and compare 2 key concepts, stateless and stateful.
EntityFramework Core is popularly used in .NET Core project to store
data in a selected database. Will explain the design ideas behind
EntityFramework Core and analyze its source code to learn the patterns
supporting different databases. Will cover key concepts in
EntityFramework Core including entity, context, query, and migration
with detailed examples.

Chapter 12: Protecting Your Application with will cover authentication


and authorization in Blazor applications. Will explain the authentication
mechanism in Blazor and learn the source code of
AuthenticationStateProvider, which can be used to implement a
customized authentication. Will cover different authorization approaches,
including role-based and policy-based authorizations, with code examples.
Chapter 13: Deploying with Docker and will cover Blazor application
deployments. One of the modern ways to deploy your applications is
using Docker techniques and Kubernetes. Readers will learn how to
containerize Blazor applications and deploy it with Azure Kubernetes
Services and Azure Container Registry.
Code Bundle and Coloured Images

Please follow the link to download the

Code Bundle and the Coloured Images of the book:

https://rebrand.ly/i1gakbz

The code bundle for the book is also hosted on GitHub at In case there’s
an update to the code, it will be updated on the existing GitHub repository.

We have code bundles from our rich catalogue of books and videos
available at Check them out!

Errata

We take immense pride in our work at BPB Publications and follow best
practices to ensure the accuracy of our content to provide with an
indulging reading experience to our subscribers. Our readers are our
mirrors, and we use their inputs to reflect and improve upon human errors,
if any, that may have occurred during the publishing processes involved.
To let us maintain the quality and help us reach out to any readers who
might be having difficulties due to any unforeseen errors, please write to
us at :

[email protected]
Another Random Scribd Document
with Unrelated Content
Nitrogenous Foodstuffs or Proteins
The proteins form heat and energy when the supply of sugars,
starches, and fat are exhausted, but proteins, alone form muscle,
bone and sinew. They are, in this sense, the most important of foods,
—they are, also, the most costly.
The foods most rich in proteins are meat and eggs. These have
undergone chemical changes from the vegetable kingdom being built
up into more complex compounds in the animal kingdom.
Meat and eggs are the tissue builders. In this connection it may be
well to state that blood is tissue; thus meat and eggs build the blood,
as well as muscle and sinew.
Nitrogenous foods, or proteins, are so called because of the large
proportion of nitrogen which they contain. All nitrogenous foods
contain considerable carbon—mostly in the form of fat in the meat
elements—but the carbonaceous foods contain so little of the
proteins that they do not appreciably enter into the nutrition,—the
carbon and nitrogen in the carbo-nitrogenous foods are more equally
divided.
The nitrogenous or protein elements in the body constitute about
one-fifth of its weight. They make the framework, forming the basis
of blood, lymph, muscle, sinew, bone, skin, cartilage, and other
tissues.
Worn out body tissues is constantly being torn down and
eliminated and the protein in the foods must daily furnish material for
repair, as well as for building new tissue in the growing child.
A young animal’s first need is for growth, not having learned to
exercise sufficiently to use much energy, and the first food given is
an animal product—milk to babes and other mammals, while the
young of other animals are first fed upon eggs.
The nitrogenous foods are required in smaller bulk than
vegetables and fruits; they are more concentrated and contain less
waste. According to recent experiments, the average adult requires
from two to four ounces a day of nitrogenous foods, to repair the
waste, according to the proportion of nitrogen contained. Happily,
where more is consumed, the system has the power, up to a certain
limit (depending upon the physical condition and the daily activity), to
eliminate an excess. It is needless to say that if the daily waste is not
re-supplied, the digestion and bodily nutrition suffer. The system
must have the two to four ounces to supply the nitrogen daily
excreted, or the tissues themselves will be consumed.
The proteins, of which meat is the principal one, are classified as
Albuminoids:—albumin (white of eggs), casein (curd of milk),
myosin (the basis of lean meat and gluten of wheat),
Gelatinoids, (connective tissue of meat),
Extractives (appetizing and flavoring elements).
DIGESTION
Any discussion in regard to the digestibility of foods must be
general, because food which agrees with one may disagree with
another, and a food which disagrees with one at a particular time
may entirely agree with him at some other time; therefore, before
one passes upon the adaptability of a food to the individual, it should
be known that this food agrees or disagrees with him under varying
conditions.
The digestibility of food depends largely upon the physical
condition of the individual, because the amount of digestive juices
poured into the alimentary canal is influenced by this condition,
particularly by the condition of the nerves. If sufficient juices, in
proper proportions, are not poured into the digestive tract, the
foodstuffs are not made soluble for absorption into the blood.
Digestion is practically synonymous with solution,—all solid foods
must be reduced to a liquid state, through digestive juices and water,
before they can pass through the walls of the stomach and
intestines.
Each individual should learn to like the foods containing the
nutrient elements which experience and blood tests have shown to
be lacking in his case. The question of likes and of dislikes in regard
to foods, is largely habit, and one can learn to like almost any food
one wishes.
Where one forms the habit of discriminating too much in the food,
or discarding this food or that, because at some time it has
disagreed, due to the particular condition at the time, the mind
approaches the table as a more or less pessimistic censor and the
saliva and the gastric juices are retarded in their flow.
When one is exercising freely, so that the muscular and mucous
coats of the digestive system are strong, the body will handle foods
which, during sedentary habits, it would not digest. There are kinds
of foods, however, which, to certain individuals, according to the
chemical composition of the body, act as actual poisons, e. g.,
strawberries, cheese, or coffee.
It may be well to here trace, briefly, the progress of the food
through the digestive tract and the action of the juices and the
ferments upon it.[3]

The food in the mouth is mixed with saliva,


Salivary which dissolves the starches, converting them into
Digestion sugar. The starches are the only foods whose
chemical digestion is begun in the mouth. They are
first broken up into dextrin and then into the more simple sugar,
known as animal starch, or maltose. Hereafter, in speaking of sugar,
after it has been absorbed into the blood, the reader will bear in mind
that the term refers not only to digested sugar, consumed as such,
but also to digested starches (maltose), as shown on page 63.
It is important that sufficient saliva be mixed with the food, through
mastication, that it may enter the stomach and there continue the
chemical process of digestion of starch. If starches are not
thoroughly masticated, sufficient saliva will not enter the stomach to
convert the starch into sugar; the food will pass into the small
intestine, which must then do more than its normal work of digestion.
The saliva consists of about ninety-nine and one-half per cent
water and one-half per cent solids. The solids consist of ptyalin,
sodium chlorid, sodium carbonate (baking soda), mucus, and
epithelium. Ptyalin, the most important of these, is an active
digestive agent; the mucus lubricates the masticated food; the
sodium carbonate insures the alkalinity of the food; the salt is
present in all secretions; and the water dissolves the food that the
juices may more readily reach and act upon each particle.
The saliva flows into the mouth, more or less, at all times, but
more copiously during mastication. Its evident purpose, when food is
not present, is to keep the lining of the mouth moist.
The flow of saliva is controlled, to a great degree, by nerves which
have their centers in the medulla oblongata. The sight of food,
pleasingly served, or even the thought of food which one likes, will
increase the salivary flow. This is one instance of the control of
thought materially affecting digestion, and the importance of forming
the habit of cultivating a taste for all kinds of food, is apparent. The
stronger the relish for the food, and the more thoroughly it is
masticated, and mixed with the saliva, the more perfect will be the
first step in digestion. This first step of thorough mastication is all
important, not only because the chemical action upon the starch
molecules is facilitated by the thorough softening and mixing with the
saliva, but thorough mastication also tends to prevent overeating.
Water encourages the flow of saliva and for this reason should be
drunk copiously before meals, particularly where digestion is weak. It
may also be taken at rest periods during the meal. (See page 44).

As the food enters the stomach, the gastric juice


Stomach pours out from the mucous lining, very much as
Digestion the saliva pours into the mouth. It consists of
ninety-nine and one-half per cent water and one-
half per cent solids, as does the saliva. The solids of the gastric juice
are composed of pepsin, rennin, hydrochloric acid, and mucus. The
mucus serves to lubricate the food as in the saliva. It also prevents
the digestion of the mucous lining of the stomach itself.
The hydrochloric acid and the pepsin cause the principal chemical
changes in the food while in the stomach, acting alone upon the
proteins. The only digestion of starches in the stomach is that
continued by the saliva. The salivary digestion proceeds until the
gastric juice is secreted in sufficient quantity to cause a marked
acidity of the stomach contents, when the starches are passed into
the intestines.
Gastric juice begins to flow into the stomach soon after eating, but
it is not secreted in sufficient quantity to supersede salivary digestion
for from twenty to forty-five minutes.
The result of gastric digestion of proteins is their conversion, first,
into albumin, then into proteosis and, lastly, into peptone, which is
protein in a more simple, soluble, and diffusible form. In the form of
peptone, the proteins are in condition to be absorbed.
If the food has been properly cooked and masticated the gastric
digestion will be completed in one and one-half to three hours. If not
properly cooked and masticated, the stomach digestion may
continue one to two hours longer. It should, however, be completed
in three hours.
The most readily digested animal foods remain less time in the
stomach. Meat, as a rule, is easily digested, because the action of
the digestive juices of the animal has converted the starches and
sugars. The white meat of chicken, being soft, is digested in a
shorter time than the red or the dark meat.
Fluids leave the stomach more rapidly than solids. Seven ounces
of water leave the stomach in one and one-half hours, seven ounces
of boiled milk in about two hours.
The flow of gastric juice, as the flow of saliva, is governed by the
nerves;—the sight, taste, and smell of food, and the attitude of mind
toward it, to a certain extent, regulates its flow.
After the food has extensively accumulated, during the progress of
a meal, the stomach begins a series of wave-like movements called
peristaltic waves.[4] These waves work downward through the length
of the stomach towards its lower opening, known as the pyloric
orifice. As the food is moved down the stomach by these motions, it
is thoroughly mixed with the gastric juice.
During the early stages of digestion, the sphincter muscles of the
pylorus keep the lower end of the stomach closed, but, as digestion
progresses, the pylorus gradually relaxes to let the digested, soluble
portion of the food pass into the intestine. If the food still remains in a
solid form, by reason of being improperly cooked or poorly
masticated, as it touches the pylorus, these sphincter muscles,
almost as if they were endowed with reasoning faculties, close,
forcing the undigested mass back to be further acted upon by the
gastric juice,—the solid mass is not allowed to pass until dissolved.
If the individual continues to abuse the stomach and to cause it to
work overtime, it becomes exhausted and demands rest; it refuses to
discharge the gastric juice in proper proportion; the peristaltic
movements are weak; and food is not promptly or forcefully moved
along the stomach and mixed with the gastric juice. This demand for
a rest is termed Indigestion.
To sum up,—digested sugar is dextrose; digested starch is first
dextrin, then maltose (animal, sugar); digested protein is peptone;
and, digested fat is saponified fat.

The food passes from the stomach, through the


Intestinal pylorus into the small intestine. The first twelve
Digestion inches of the small intestine is known as the
duodenum. In the duodenum it is acted upon by
the pancreatic juice from the pancreas, the bile from the liver, and
the intestinal juices. These juices act upon proteins, fats, and
carbohydrates. The bile acts upon the fats, while the pancreatic and
intestinal juices act chiefly upon the carbohydrates.
As the food enters the intestine, it is changed, by the sodium
carbonate, from the acid condition produced in the stomach, to
alkaline reaction.
The bile exercises an important influence upon digestion, any
disturbance in the flow of this greenish-brown secretion being very
quickly shown both in stomach and intestinal digestion. It
emulsonizes and saponifies the fats, it aids in their absorption, and it
lubricates the intestinal mass, facilitating its passage through the
entire length of the intestines. Thus, it is a very potent agent in
regulating the bowel movements. A diminution in the flow of bile
quickly expresses itself in constipation.
Fats are almost entirely digested in the small intestine. The
presence of fat stimulates the flow of pancreatic juice, which, in turn,
stimulates the flow of bile from the liver. For this reason, if the liver is
sluggish, fatty foods are desirable. Olive oil is prescribed for gall
stones to stimulate the action of the bile ducts.
Before the fat molecules can be absorbed, they must first be
broken up into glycerin and fatty acids and further changed to a fine
emulsion, which gives the contents of the small intestine a milky
appearance. After they are broken up into these fatty acids and thus
brought to the finest state of emulsion, they are readily saponified,
being then soluble in water and in a state to be absorbed by the
walls of the intestines. The fats are absorbed almost entirely in the
small intestine,—mostly in the duodenum.
As a rule, the starches, or dextrin, will not be fully digested by the
saliva and those which have failed of salivary digestion are acted
upon by amylase (one of the solids of the intestinal juice) and
changed to maltose, while the trypsin from the pancreas, together
with the intestinal juice, acts upon any protein which has failed to be
fully digested in the stomach, changing it into peptone. In the form or
peptone it is absorbed through the “sucking” villi of the intestinal
walls.
The food is forced along the intestinal tract by peristaltic or
muscular relaxation and contraction waves, as in the stomach. As it
is so forced, the nutrient elements, after being put into condition for
absorption, are taken up through the villi of the intestinal walls by the
portal veins and the lacteals of the sub-mucous lining. (See page
78).
It is now believed that a larger proportion of food is digested and
absorbed than was heretofore realized, and that the excretions from
the intestines are, in many cases, made up almost entirely of refuse,
and of the catabolic waste of the system. In an ordinary, mixed diet,
it is stated that about ninety-two per cent of the proteins, ninety-five
per cent of the fats, and ninety-seven per cent of the carbohydrates
are retained by the body.
In digestion, it is of the utmost importance that the
muscular, mucous, and the sub-mucous coats, and the
secreting glands of the stomach and intestines be kept
thoroughly strong and active, that the digestive juices may
be freely poured out, the nutriment be freely absorbed,
and the food be moved along the digestive tract. The
strength of any organ is gained through the nutriment in
the blood; therefore, daily exercise, which calls the blood
freely to these organs, is imperative.
The greater part of the food is absorbed through
Absorption of the intestines, yet some proteins, which have been
Food fully digested by the gastric juice, and certain fats,
particularly the fats in milk, which are in a natural
state of emulsion, may be absorbed through the walls of the
stomach. However, the absorption through the stomach is small
compared to that through the intestines.
The small intestine is particularly fitted for absorption. Every inch
or so along its course the mucous lining is thrown up into folds, as if
to catch the food as it passes toward the large intestine, and to hold
it there until the villi have the opportunity to absorb it. These
transverse folds of the intestinal walls are called valvulæ
conniventes. The villi are fingerlike projections of the mucous lining
of the intestines, which stand out upon the lining somewhat as the
nap on plush. They have been called “sucking” villi, because during
the movements of the intestines they seem to suck in the liquid food.
As soon as the foodstuffs,—proteins, carbohydrates, and fats, are
put in a dissoluble state ready for absorption, they are very promptly
absorbed by the villi. If, for any reason, they remain unabsorbed,
they are liable to ferment by the action of the trypsin, or to be
attacked by the bacteria always present in the intestines.
The peptones, sugars, and saponified fats are rapidly absorbed,
while the undigested portion, together with the unabsorbed water,
the bile, mucus and bacterial products, are passed through the ileo-
cecal valve into the large intestine.
That the large intestine is also adapted to the absorption of fats is
shown by clinical experiments with patients who cannot retain food in
the stomach, the food in such cases being given through rectal
injections.
In the large intestine, the mass passes up the ascending colon,
across the transverse colon, and down the descending colon, losing,
by absorption, foodstuffs not absorbed in the stomach and small
intestine.
While water and salt are absorbed both in the stomach and in the
small intestine, the evident purpose in leaving the larger part of the
water to be absorbed in the large intestine is that it may assist the
intestinal contents in passing along. The water also stimulates the
peristaltic movement.
As the food is absorbed through the walls of the alimentary canal,
it is picked up by the rootlets of the mesenteric veins[5] and by the
lymph channels,—the latter, through the abdominal cavity, are called
lacteals. Nearly all of the fats are absorbed through the lacteals. The
whitish color given to the contents of the lacteals, by the saponified
fats, gives rise to the term lacteal, meaning “whitish.”
Nearly all of the proteins and sugars pass through the mesenteric
veins and the portal veins into the liver. Here the sugars are at once
attacked by the liver cells and built up into glycogen as described on
page 81 and the proteins are passed through the liver into the
arterial blood stream. A small portion of the proteins, however, do not
go to the liver, but are passed directly into the lymphatics and thus
into the blood stream, where they are again carried to the liver.
To sum up,—the larger part of the absorption of sugars, starches,
proteins, and fats is through the small intestine, though some are
absorbed in the stomach and a very little through the large intestine;
while some water and salts are absorbed in the stomach and small
intestine, these are largely absorbed in the large intestine.
FOOTNOTES:
[3] A knowledge of the mucous lining of the stomach and
intestines, and of the tributary glands, such as the liver and
pancreas, is important to a thorough understanding of digestion,
and the reader is referred to “The Vital Organs: Their Use and
Abuse” of this series. This takes up the study of the secretion of
digestive juices, the conditions favoring normal secretions, etc.
[4] See “The Vital Organs; Their Use and Abuse” by Susanna
Cocroft.
[5] For illustration see the frontispiece of “The Circulation,
Lungs, Heart,” of this series.
The Work of Various Organs Affecting
Digestion
The purpose of this chapter is to show the work of other organs
than the digestive organs in converting the digested food to use in
the body, in tearing down waste, and in eliminating waste and an
excess of material above the body needs.

The liver is commonly called the chemical work-


Work of the shop of the body. The proteins and sugars are
Liver carried through the blood (portal veins) to the liver
directly they are absorbed from the alimentary
canal. As the food materials filter through the blood capillaries,
between the liver cells, several substances are absorbed, particularly
sugar, which is here changed into animal starch called glycogen. It is
held in the liver for a few hours in the form of glycogen and then
redigested by the action of an amylolitic ferment and again gradually
given out into the blood in the form of sugar; hence sugar is subject
first to the anabolic change of being built up into glycogen, and then
to the catabolic change of oxidation and breaking down.
While the conversion of the sugar is one chief office of the liver, it
also acts upon the proteins,—not as they are first passed through
the liver in the blood, but as they are returned to the liver from the
muscle tissue, partly oxidized and broken up into simpler products.
The liver cells absorb and further oxidize and combine them into
nitrogenous waste, which the kidneys throw off in urea.
The liver and the spleen also break up the pigment or coloring
matter of the red blood corpuscles. As they become worn out, they
are retired in the liver and the spleen from the circulation. The iron is
retained by the liver cells and the remainder is thrown off from the
liver, in the bile.
The liver is often called the watch dog of the body, because it is on
guard for all poisons which pass through it in the blood. The large
part of these toxic substances are absorbed through the alimentary
canal with other foodstuffs. Many of them are the result of the
fermentation of foods which are not digested as promptly as they
should be, on account of an insufficient secretion of digestive juices,
or a failure to secrete them in normal proportions, or due to inactivity
of the stomach and intestines.
It surely is a wise provision of nature to supply a guard to oxidize,
or break down these poisons and make them harmless, so that they
do not pass to all parts of the body as poisons, thus affecting the
nerves and the blood stream, and, through these, the entire system.
The necessity of correct habits of deep breathing will be readily
seen, because oxygen is required to break down the poisons as well
as to oxidize the waste of the system.
One example of the action of the liver in rendering substances
harmless, is its oxidation of alcohol. From one to three ounces of
alcohol a day are oxidized and made harmless in the liver, varying
according to the individual and to the condition, at different times, in
the same person. If the limit of one to three ounces is exceeded, the
excess is not oxidized and intoxication results. These evidences of
intoxication are in the nature of narcosis; alcohol is now regarded as
a narcotic along with ether and chloroform.
It was formerly held by physiologists that alcohol was a food,
because its oxidation liberates body heat and it was assumed that
this liberation of heat, was the same as that freed by the combustion
of fats, starches, and sugar uniting with oxygen. More recent
knowledge, however, has unquestionably determined that heat,
resulting from oxidation of alcohol, does not keep up body
temperature; the pores of the skin are opened and there is a greater
loss of heat through the skin. This really makes the system less able
to resist cold. Large doses of alcohol actually cause a fall in body
temperature and every force of the body is decreased in efficiency,
while if alcohol were an actual food the efficiency would be
increased. We are forced to the conclusion, therefore, that alcohol is
a pseudo-food as it is a pseudo-stimulant.

The muscles play an important part in the use of


Work of the foods. Most of the heat is generated in them, by
Muscles the sugar and fats coming in contact with the
oxygen in the blood. This heat is liberated during
every moment of the twenty-four hours, asleep or awake. Of course,
more is liberated during exercise, since the movement of the
muscles sets all tissues into activity and the blood circulates more
strongly, bringing a greater supply of oxygen to them. It is always
well during active exercise to stop frequently and fully inflate the
lungs. The effort should always be made to breathe fully and deeply
—otherwise the pressure of the liberated carbon dioxid will cause a
pressure throughout the blood stream, particularly about the heart
and in the head. This pressure is relieved when the excess of
carbonic acid gas liberated has been thrown off by the lungs. Nature
makes the effort to throw off the excess of carbonic acid gas by
forcing one to breathe more rapidly while running or taking unusual
exercise.
The oxidation changes are simply a combustion of sugars and
fats, liberating latent heat as they are brought into contact with the
oxygen. Exercise and a regulation of the amount of carbohydrates
and fats consumed in the foods is the natural, scientific method for
the reduction of an excess of fat.
A certain amount of protein is constantly oxidized in the muscles,
also, being broken down into carbon dioxid, water and a number of
nitrogenous mid-products. The carbonic acid gas and water are
thrown off by the lungs and the partially oxidized, nitrogenous waste
is carried to the liver, where it is further oxidized and prepared for
excretion, through the kidneys, lungs, skin and intestines.
When sugar is carried to the muscles in larger quantities than can
be utilized by them, it is often built up into animal starch and stored
in the form of glycogen, similar to its chemical change and storage in
the liver.
This storage of glycogen in the muscles and in the liver is a wise
provision of Nature. It is a reserve to be called upon whenever the
expenditure of heat and energy exceeds the amount supplied in any
day’s rations.

The nerves oxidize food materials, but not to any


Work of the great extent, excepting during nervous activity.
Nerves During periods of rest, food materials are stored in
the nerve cells in grandular form. They represent
concentrated nerve foods and are the result of anabolic processes.
During nervous activity they are oxidized and carried away through
the blood and the lymph. This oxidation of the food, stored in the
nerves, creates nervous energy and heat.
The energy liberated by the nerves resembles electrical energy.
Where one subjects himself continuously to an excess of nervous
activity, all reserve food material, stored in the nerve cells, is used
and the result is a trying nerve tension. Such individuals need plenty
of easily digested food.

The lungs absorb oxygen and eliminate carbon


Work of the dioxid. They occasionally throw off a very little
Lungs organic material.
The carbon dioxid is carried to the lungs from the tissues through
the venous stream and diffused through the capillary walls of the
lungs. The oxygen is absorbed into the capillaries through the thin air
sacs in the walls of the lungs.
The kidneys do not absorb as do the lungs,
Work of the neither do they perform any anabolic work as does
Kidneys the liver, nor catabolic work as the muscles, nerves
and the liver. They simply throw off waste matter.
The blood passes through them in a transverse branch from the
abdominal aorta. In its circuit urea, uric acid, urates, sulphuric acid,
sulphates and sodium phosphates pass from the blood with the
water and are thrown from the system; hence the kidneys are
purifying organs, as are the lungs. The blood returning from the
kidneys through the veins is pure, just as the blood in the pulmonary
vein is pure, while that in the arteries to the kidneys and the lungs is
impure.
The above substances cannot be thrown off from the lungs. They
are the products of oxidation of proteins, partly of the living tissues
and partly those broken down direct as they are supplied in the
foods, in excess of the needs of the system.
Interference in the action of the kidneys results in a hoarding of
these substances in the blood, and may produce an intoxicated
condition known as uremic poisoning.
Water in abundance and diuretic fruits and vegetables, which
increase the activity of the kidneys, should be taken where uremia is
indicated. (Foods which cause a free flow of urine are called diuretic
foods.)
The sweat glands also throw off an excess of
Work of the Skin water and salts. The kidneys and the skin are
interdependent; if the kidneys are inactive the skin
throws off a larger quantity and if the skin is inactive, or if for any
reason the pores of the skin are closed, the kidneys are more active.
This is evidenced by the sudden immersion of the body in cold
water; the pores of the skin being closed the kidneys immediately
act.
During the summer, or at any time when the skin throws off more
water than usual, the kidneys are less active and the urine, being
more concentrated, is darker.
The skin also throws off carbon dioxid and, to a slight extent, it
absorbs oxygen.

The intestines, in their work of elimination, pass


Work of the off all undigested matter. They also carry off bile
Intestines pigment, bile salts, mucus, amino acids, and other
decomposition of proteins,—also a little
unabsorbed fats and bacterial decomposition taking place in the
intestines. Coarse articles of food containing fibres which do not
digest, such as the bran of grains and the coarser fruits and
vegetables (though much of their substances are not food in the
strictest sense) are valuable to increase the peristaltic movements of
the intestines and to act as a carrying body to move the waste
excretions along their course.
The combustion, or burning of fuel in any form, (oxidation for the
release of latent heat and energy) always leaves some parts which
are not used as heat or energy, and it is the work of the intestines to
eliminate much of this refuse. When coal is burned, gas, smoke and
cinders or clinkers, constitute the waste and if these were not
allowed to escape from a stove the fire would soon go out—the
smoke and gas would smother it and the clinkers would prevent the
circulation of oxygen and soon clog and fill the stove. The same is
true in the body—the carbonic acid gas not being allowed to pass off
would soon put out the fires of life; it would poison the body and
stunt the action of the nerves. If the nitrogenous waste (like ashes
and cinders) is not eliminated by the kidneys, one will die in
convulsions in one or two days.
The absolute necessity of a free elimination of waste will be readily
seen.—If the engine is to do its best work, the engineer sees that it is
kept perfectly clean—otherwise it becomes clogged, does inefficient
work and the clogging soon wears out some parts. The same is true
in the body,—clogging in any part overworks and wears out other
parts dependent upon the work of the one.
Summary
Let us sum up the processes which the food undergoes in its
conversion into condition to be absorbed by the body; in its
absorption through the walls of the intestines and stomach; and the
metabolic processes which it undergoes in being converted into heat
and energy and again broken down and eliminated as waste.
The Saliva begins the digestion of starches and sugars in the
mouth. This digestion is continued by the saliva in the stomach.
The Stomach, when in normal condition, thoroughly digests the
proteins. If any proteins fail of digestion in the stomach the process
is completed in the intestines.
The Intestines, aside from their work of digestion and absorption,
excrete bile pigment, bile salts, animal acids, mucus and other
decomposition of proteins, with bacterial fermentation and
putrefactions; also such food materials as are not digested.
The small intestine digests and absorbs the fats and continues the
digestion of starches, sugars and fats when this digestion is not
completed in the stomach.
The large part of the food is absorbed through the small intestine,
though a small part is absorbed through the walls of the stomach
and through the large intestine.
Fats are almost entirely absorbed in the small intestine. They are
absorbed through the lacteals and are carried into the blood stream.
The Liver. The proteins and the starches (converted into maltose)
and sugars pass into the liver. The sugar (including the sugar in
vegetables, milk, fruits and that used for sweetening, as well as the
carbohydrates which have been changed into maltose), is converted
into glycogen in the liver, stored here for a time and again broken
down into sugar that it may be in condition to be absorbed into the
blood.
The proteins pass through the liver but are not acted upon by this
organ until they again return to the liver through the blood stream,
after they have been partly oxidized in the tissues. The liver further
oxidizes them putting them into condition to be excreted by the
kidneys and intestines.
The liver also breaks up the worn out red corpuscles, putting them
into condition to be eliminated in the bile.
It oxidizes and renders harmless poisonous substances absorbed
in the food, such as fermented food products and alcohol.
The Muscles oxidize the fats and sugars liberating the latent heat
and energy.
They partly oxidize proteins which are further broken up in the
liver.
The Nerves oxidize food materials stored in the nerve cells,
providing nervous energy.
The Lungs absorb oxygen and throw off carbon dioxid, watery
vapor and some organic substances.
The Kidneys and The Skin purify the blood by excreting water,
carbon dioxid and nitrogenous waste.

You might also like