100% found this document useful (4 votes)
204 views55 pages

Mastering Full Stack React Web Development 1st Edition Tomasz Dyl All Chapters Instant Download

Dyl

Uploaded by

aswdaabkal
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 (4 votes)
204 views55 pages

Mastering Full Stack React Web Development 1st Edition Tomasz Dyl All Chapters Instant Download

Dyl

Uploaded by

aswdaabkal
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/ 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Mastering Full Stack React Web Development 1st


Edition Tomasz Dyl

https://textbookfull.com/product/mastering-full-stack-react-
web-development-1st-edition-tomasz-dyl/

OR CLICK BUTTON

DOWNLOAD NOW

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


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

Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node Vasan Subramanian

https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-vasan-subramanian/

textboxfull.com

Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node 2nd Edition Vasan Subramanian

https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-2nd-edition-vasan-
subramanian/
textboxfull.com

Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node 1st Edition Vasan Subramanian
(Auth.)
https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-1st-edition-vasan-
subramanian-auth/
textboxfull.com

Full Stack React Projects Modern web development using


React 16 Node Express and MongoDB 2nd Edition Shama Hoque

https://textbookfull.com/product/full-stack-react-projects-modern-web-
development-using-react-16-node-express-and-mongodb-2nd-edition-shama-
hoque/
textboxfull.com
React Architect Full Stack React App Development and
Serverless Deployment Frank Zickert

https://textbookfull.com/product/react-architect-full-stack-react-app-
development-and-serverless-deployment-frank-zickert/

textboxfull.com

Modern Full-Stack Development: Using TypeScript, React,


Node.js, Webpack, and Docker Zammetti

https://textbookfull.com/product/modern-full-stack-development-using-
typescript-react-node-js-webpack-and-docker-zammetti/

textboxfull.com

Ultimate Nuxt.js for Full-Stack Web Applications 1st


Edition Lau Tiam Kok

https://textbookfull.com/product/ultimate-nuxt-js-for-full-stack-web-
applications-1st-edition-lau-tiam-kok/

textboxfull.com

Full-Stack Web Development with Go: Build your web


applications quickly using the Go programming language and
Vue.js 1st Edition Nanik Tolaram
https://textbookfull.com/product/full-stack-web-development-with-go-
build-your-web-applications-quickly-using-the-go-programming-language-
and-vue-js-1st-edition-nanik-tolaram/
textboxfull.com

Full-Stack Web Development with Jakarta EE and Vue.js:


Your One-Stop Guide to Building Modern Full-Stack
Applications with Jakarta EE and Vue.js Daniel Andres
Pelaez Lopez
https://textbookfull.com/product/full-stack-web-development-with-
jakarta-ee-and-vue-js-your-one-stop-guide-to-building-modern-full-
stack-applications-with-jakarta-ee-and-vue-js-daniel-andres-pelaez-
lopez/
textboxfull.com
Title Page
Mastering Full-Stack React Web Development

Dynamic and forward-thinking JavaScript web


development

Tomasz Dyl
Kamil Przeorski
BIRMINGHAM - MUMBAI
Mastering Full-Stack React Web Development
Copyright © 2017 Packt Publishing

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 authors, nor Packt Publishing, and its dealers
and distributors will be held liable for any damages caused or
alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information


about all of the companies and products mentioned in this book by
the appropriate use of capitals. However, Packt Publishing cannot
guarantee the accuracy of this information.

First published: April 2017

Production reference: 1240417

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78646-176-6

www.packtpub.com
Credits

Copy Editors
Authors

Safis Editing
Tomasz Dyl

Kamil Przeorski
Madhusudan Uchil

Reviewer Project Coordinator

Samer Buna Sheejal Shah

Commissioning Editor Proofreader

Amarabha Banerjee Safis Editing


Acquisition Editor Indexer

Smeet Thakkar Tejal Daruwale Soni

Content Development Editor Production Coordinator

Parshva Sheth Melwyn D'sa

Technical Editor

Prajakta Mhatre
About the Authors
Tomasz Dyl has worked with React since 2014. He's the technical
lead developer for React Poland. The team focuses on cross-platform
full-stack development using React and Node (http://reactpoland.com). He
has worked on over 20 different React and Node projects for his
clients since 2014. React Poland also works on the React Community
platform (https://reactjs.co).

Kamil Przeorski has worked with React since 2014. Along with
Tomasz, he is the co-founder of React Poland--the leading company
for React developers. In the meantime, besides building the best
React team in Poland, he runs two different Facebook groups called
Node.js Poland (https://www.facebook.com/groups/nodejsPL/) and ReactJS,
React Native, GraphQL (https://web.facebook.com/groups/reactjs.co/)--both
groups have around 2000 members.
About the Reviewer
Samer Buna is a coder, mentor, and technical content author. He
has a master's degree in Information Security, and years of
progressive experience and success creating tailored solutions for
businesses in many industries.

Samer is passionate about everything JavaScript, and he loves


exploring new libraries. His favorite technical stack is Node.js for the
backend and React.js for the frontend.

Samer has authored a few books and online courses about React
and GraphQL. You can follow him on Twitter at
https://twitter.com/samerbuna, and you can read more of what he writes at

https://edgecoders.com/.
www.PacktPub.com
For support files and downloads related to your book, please visit ww
w.PacktPub.com.

Did you know that Packt offers eBook versions of every book
published, with PDF and ePub files available? You can upgrade to the
eBook version at www.PacktPub.com and as a print book customer, you
are entitled to a discount on the eBook copy. Get in touch with us
at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical


articles, sign up for a range of free newsletters and receive exclusive
discounts and offers on Packt books and eBooks.

https://www.packtpub.com/mapt

Get the most in-demand software skills with Mapt. Mapt gives you
full access to all Packt books and video courses, as well as industry-
leading tools to help you plan your personal development and
advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the
heart of our editorial process. To help us improve, please leave us an
honest review on this book's Amazon page at https://www.amazon.com/dp/
1786461765.

If you'd like to join our team of regular reviewers, you can e-mail us
at [email protected]. We award our regular reviewers with free
eBooks and videos in exchange for their valuable feedback. Help us
be relentless in improving our products!
Dedication

For Kate and Anna

- Kamil Przeorski
Table of Contents
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Configuring Full-Stack with Node.js, Express.js, MongoDB, Mongoose, Falcor, and Red
ux
More about our technical stack
Environment preparation
NVM and Node installation
MongoDB installation
Robomongo GUI for MongoDB
Running MongoDB and viewing our collections in the Robomongo GUI
Importing the first example collection into the database
Importing the articles to MongoDB
Server setup with Node.js and Express.js
Working on our server (server.js)
Mongoose and Express.js
A summary of how to run the project
Redux basic concepts
The single immutable state tree
Immutability - actions and state tree are read-only
Pure and impure functions
The reducer function
First reducer and webpack config
The rest of the important dependencies installation and npm dev script
Working on src/app.js and src/layouts/PublishingApp.js
Wrapping up React-Redux application
Finishing our first static publishing app
Falcor's basic concepts
What is Falcor and why do we need it in our full-stack publishing app?
Tight coupling and latency versus one model everywhere
No more tight coupling on client and server side
Client-side Falcor
A summary of client-side Falcor + Redux
Moving Falcor's model to the backend
Configuring Falcor's router (Express.js)
Second route for returning our two articles from the backend
Final touch to make full-stack Falcor run
Adding MongoDB/Mongoose calls based on Falcor's routes
Double-check with the server/routes.js and package.json
Our first working full-stack app
Summary
2. Full-Stack Login and Registration for Our Publishing App
Structure of JWT token
New MongoDB users collection
Explanation
Importing the initPubUsers.js file into MongoDB
Working on the login's falcor-route
Creating a falcor-router's login (backend)
How the call routes work
Separating the DB configs - configMongoose.js
Explanation
Improving the routes.js file
Explanation
Checking to see if the app works before implementing JWT
Creating a Mongoose users' model
Explanation
Implementing JWT in the routesSession.js file
Explanation
Successful login on falcor-route
Explanation
Frontend side and Falcor
The CoreLayout component
The LoginView component
A root's container for our app
Remaining configuration for configureStore and rootReducer
Last tweaks in layouts/PublishingApp.js before running the app
Last changes in src/app.js before running the app
Screenshots of our running app
Home page
Login view
Working on the login form that will call the backend in order to authenticate
Working on LoginForm and DefaultInput components
Explanation
LoginForm and making it work with LoginView
Improving the src/views/LoginView.js
Making DashboardView's component
Finishing the login's mechanism
Handling successful logins in the LoginView's component
Explanation
A few important notes about DashboardView and security
Starting work on the new editor's registration
Adding register's falcor-route
Explanation
Frontend implementation (RegisterView and RegisterForm)
RegisterView
Summary
3. Server-Side Rendering
When the server side is worth implementing
Mocking the database response
The handleServerSideRender function
Double-check server/server.js
Frontend tweaks to make the server-side rendering work
Summary
4. Advanced Redux and Falcor on the Client Side
Focusing on the app's frontend
Backend wrap-up before frontend improvement
Improving handleServerSideRender
Changing routes in Falcor (frontend and backend)
Our website header and articles list need improvements
New ArticleCard component
Dashboard - adding an article button, logout, and header improvements
Important note before creating a frontend add article feature
The AddArticleView component
Modifying DashboardView
Starting work on our WYSIWYG
Stylesheet for the draft-js WYSIWYG
Coding a draft-js skeleton
Improving the views/articles/AddArticleView component
Adding more formatting features to our WYSIWYG
Pushing a new article into article reducer
MapHelpers for improving our reducers
The CoreLayout improvements
Why Maps over a JS object?
Improving PublishingApp and DashboardView
Tweaks to AddArticleView
The ability to edit an article (the EditArticleView component)
Let's add a dashboard link to an article's edition
Creating a new action and reducer
Edit mode in src/components/articles/WYSIWYGeditor.js
Improvements in EditArticleView
EditArticleView's render improvements
Deleting an article's feature implementation
Summary
5. Falcor Advanced Concepts
The problem that Falcor aims to solve
Virtual JSON - one model everywhere
Falcor versus Relay/GraphQL
Big-picture similarities
Technical differences - overview
Improving our application and making it more reliable
Securing the auth required routes
JSON Graph and JSON envelopes in Falcor
Improving our Falcor code on the frontend
Improving server.js and routes.js
Falcor's sentinel implementation
The $ref sentinel
Detailed example of the $ref sentinel
Improving our articles' numberOfLikes with $ref
Practical use of $ref in our project
Mongoose config improvements
The server/routes.js improvements
JSON Graph atoms
Improving the articles[{integers}] route
New route in server/routes.js: articles.add
Frontend changes in order to add articles
Important note about route returns
Full-stack - editing and deleting an article
Deleting an article
Frontend - edit and delete
Securing the CRUD routes
The $error sentinel basics
DRY error management on the client side
Tweaks - FalcorModel.js on the frontend
Backend implementation of the $error sentinel
Testing our $error-related code
Cleaning up $error after a successful test
Wrapping up the routes' security
What routes to secure
Summary
6. AWS S3 for Image Upload and Wrapping Up Key Application Features
AWS S3 - an introduction
Generating keys (access key ID and secret key)
IAM
Setting up S3 permissions for the user
Coding the image upload feature in the AddArticleView
Environment variables in Node.js
Improving our Mongoose article schema
Adding routes for S3's upload
Creating the ImgUploader component on the frontend
Wrapping up the ImgUploader component
AddArticleView improvements
Some remaining tweaks for PublishingApp, ArticleCard, and DashboardVie
w
Improving the ArticleCard component
Improving the DashboardView component
Editing an article's cover photo
Adding the ability to add/edit the title and subtitle of an article
AddArticleView improvements
Ability to edit an article title and subtitle
ArticleCard and PublishingApp improvements
Dashboard improvement (now we can strip the remaining HTML)
Summary
7. The MongoDB Deployment on mLab
mLab overview
Replica set connections and high availability
MongoDB failover
Free versus paid plan in mLab
The new mLab's account and node
Creating the database's user/password and other configurations
Config wrap up
Summary
8. Docker and the EC2 Container Service
Docker installation with Docker Toolbox
Docker Hub - an hello world example
Dockerfile example
Modifications to our codebase in order to create it
Working on the publishing app Docker image
Building the publishing app container
Running the publishing app container locally
Debugging a container
Pushing a Docker container to a remote repository
A summary of useful Docker commands
Introduction to Docker on AWS EC2
Manual approach - Docker on EC2
Basics - launching an EC2 instance
SSH access via PuTTy - Windows users only
Connecting to an EC2 instance via SSH
Basics of ECS - AWS EC2
Working with ECS
Step 1 - creating a task definition
Step 2 - configuring the service
Step 3 - configuring the cluster
Step 4 - reviewing
Launch status
Finding your load balancer address
AWS Route 53
Summary
9. Continuous Integration with Unit and Behavioral Tests
When to write unit and behavioral tests
React conventions
Karma for testing
How to write unit and behavioral tests
What is Mocha and why do you need it?
Testing CoreLayout step-by-step
Continuous integration with Travis
Summary
Preface
The innovations in the JavaScript programming language in recent
years have been vital. For example, since 2009 the rise of Node
granted developers the ability to use the same programming
language in the browser and on the backend. The environmental
changes haven't slowed down in 2017 as well. This book will teach
you about some new and hot concepts that speed up the full-stack
development process even more.
In 2016 and 2017, there has been an even greater demand for
making apps even faster with full-stack technologies such as Falcor
or GraphQL. This book isn't just a guide on how to expose the API
endpoints in Node and start consuming them with your client-side
application. You will learn how to use the newest technology from
Netflix, called Falcor. Beside that, you will learn how to set up a
project with the use of React and Redux.
In this book, you will find a huge tutorial for building a full-stack app
from scratch with the use of the Node.js, Express.js, MongoDB,
Mongoose, Falcor, and Redux libraries. You will also learn how to
deploy your application with the use of Docker and Amazon's AWS
services.
What this book covers
Chapter 1,Configuring Full-Stack with Node.js, Express.js, MongoDB,
Mongoose, Falcor, and Redux, takes you through the initial setup of
the application from scratch. It helps you understand how different
libraries from npm make a usable full-stack React starter kit.

Full-Stack Login and Registration for Our Publishing App,


Chapter 2,
guides you through how to set up the JWT token in order to
implement a basic full-stack authentication mechanism.

Server-Side Rendering, teaches you how to add server-side


Chapter 3,
rendering to the application, which is helpful for quicker application
execution and search engine optimization.

Advanced Redux and Falcor on the Client Side, shows you


Chapter 4,
how to add more advanced features to your application such as an
integrated WYSIWYG editor and the Material-UI components that
extend the application from the app user's perspective.

Falcor Advanced Concepts, takes you through a more


Chapter 5,
detailed backend-related development guide to Falcor and its
backend, Falcor-Router.

AWS S3 for Image Upload and Wrapping Up Key Application


Chapter 6,
Features, guides you through the publishing app's articles cover
photos uploading process.

The MongoDB Deployment on mLab, teaches you how to


Chapter 7,
prepare a remote database for your application.

Docker and the EC2 Container Service, teaches you


Chapter 8,
AWS/Docker setup.
Chapter 9,Continuous Integration with Unit and Behavioral Tests,
shows you what you will need to use in order to prepare your CI and
tests for the published application.
What you need for this book
This book was written with use of the macOS El Capitan and Sierra.
It was tested on Linux Ubuntu and a Windows 10 machine (some
additional comments have been added concerning the differences
between these three operating systems).

The rest of the toolset installation is shown in Chapter 1, Configuring


Full-Stack with Node.js, Express.js, MongoDB, Mongoose, Falcor, and
Redux.
Who this book is for
Do you want to build and understand the full-stack development
from the ground up? Then this book is for you.

If you are a React developer who is looking for a way to improve


your full-stack development skill sets, then you will be right at home
as well. You will use the newest technologies to build your next full-
stack publishing application from scratch. Make your first full-stack
application with end-to-end guidance.

We assume in the book that you already have basic knowledge of


the React library.
Conventions
In this book, you will find a number of text styles that distinguish
between different kinds of information. Here are some examples of
these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames,


file extensions, pathnames, dummy URLs, user input, and Twitter
handles are shown as follows: "In the project's directory, create a
file called initData.js."

A block of code is set as follows:

[
{
articleId: '987654',
articleTitle: 'Lorem ipsum - article one',
articleContent: 'Here goes the content of the article'
},
{
articleId: '123456',
articleTitle: 'Lorem ipsum - article two',
articleContent: 'Sky is the limit, the content goes here.'
}
]

Any command-line input or output is written as follows:

mkdir server
cd server
touch index.js

New terms and important words are shown in bold. Words that
you see on the screen, for example, in menus or dialog boxes,
appear in the text like this: "Create a connection with defaults by
clicking the Create link."

Warnings or important notes appear in a box like this.


Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what
you think about this book-what you liked or disliked. Reader
feedback is important for us as it helps us develop titles that you will
really get the most out of it.

To send us general feedback, simply e-mail [email protected], and


mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested
in either writing or contributing to a book, see our author guide at w
ww.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a
number of things to help you to get the most from your purchase.
Exploring the Variety of Random
Documents with Different Content
one over. For example, an eight strand braid requires 17 carriers,
while a 10 strand requires 21, and so on. The width of the braid may
be further regulated by the contraction of the goods determined upon
and provided for in the take-up; also by the size and character of the
material used for covering.
On account of the diagonal formation of the covering threads when
braiding, it will be seen that variable contraction of the web will
produce variable widths. This is not so with a woven elastic fabric,
inasmuch as the weft lies straight across the web and therefore the
same width is maintained whether it is stretched or otherwise. In
braiding, the threads move both across and lengthwise of the fabric,
taking the place of both warp and filling, therefore increased
contraction, no matter whether it is produced from the use of heavier
rubber, or changed material or take-up, results in greater width,
inasmuch as the lengthwise position of the threads is brought into a
new position which is more of a crosswise formation.
This diagonal lay of the covering threads opens up possibilities for
very effective plaid effects, but this is the limit of color elaboration. A
fancy frill effect may be obtained by the omission of rubber threads
at the outer edges.
Chapter XI.
WEAVING THE VAN HEUSEN COLLAR
Heavy Loom Required—How Long-Sided Effect and Folding Line
Are Obtained—Cloth Construction
Until recently the soft collar was cut and carved into shape from
plain piece goods. The patented Van Heusen collar has done away
with much of this, for from the loom is produced a fabric properly
shaped and formed for the purpose, and ready to be cut into suitable
lengths. It is adapted to various styles. Clumsy joinings are done
away with and a collar is produced which combines shape, comfort
and appearance. Much labor in collar manufacturing is also
eliminated by this method of production.
There have recently been quite a number of factories put on the
production of these goods, and at least one newly organized factory
is devoted exclusively to their manufacture. The main feature in the
Van Heusen collar is that it is woven in such a manner that when it
leaves the loom it is complete in respect of the cloth for the band and
outer part, with provision made for folding, thus doing away with any
joining together of the two parts as formerly.
The formation of a cloth having the novel quality of allowing for a
greater woven length at the outer edge of the collar than at the band,
properly graded throughout so as to meet all the requirements of a
collar in comfort and fit, at the same time providing for the insertion
of the scarf so that it will run easily, and also allowing for the
production of a variety of styles, calls for features in manufacturing
that are different in many respects from the making of a flat fabric.

Heavy Loom Required


The first essential is a loom of sufficient strength and firmness to
withstand the heavy beat of the lay resulting from packing in the
filling, where an aggregate weight of 1,000 pounds for each
individual piece must be carried. The looms which are now being
used have from 12 to 16 pieces, so that it will be seen that they must
be very rigid indeed properly to care for the weight carried on the
combined pieces, and maintain uniform picking. In order also to get
the requisite shed opening, the strain on the cams and cam jacks is
severe, so that provision for ample strength at these parts is
essential.

Cone-Shaped Take-Up Roll


The long-sided formation of the cloth is produced by the use of a
cone-shaped take-up roll, as shown in the illustration, which has a
slope of 1 inch in 6 inches. Above this cone-shaped roll is hung a
straight roll, which swings freely to different angles, so as to take
care of the slack delivered to the take-up roll. It will be noticed that
one leg of the swinging roll is longer than the other, thus allowing the
straight roll to set in proper position over the cone.
At first thought it would seem advisable to provide a reverse cone-
shaped take-up roll, as shown in the illustration, which has a slope of
1 [Transcriber’s Note: It’s possible that a line of text was missing here from the original
printing, as the sentence doesn’t make complete sense] the impracticability of such
an arrangement and the straight roll with a free movement as
described is more desirable. It is also necessary, or at least
advisable, to use a slightly tapered roll on the breast beam, over
which the cloth passes.

Woven in Three Widths


The fabric woven is made in three widths, 4¼ inches, 4¾ inches
and 5¼ inches, with the folding line in different positions in each
width, so as to provide for different styles. The great amount of stock
employed over these widths, and the difference in the take-up
between one side of the web and the other, makes it necessary to
divide the warps into sections and carry considerable weight on
each, so as to obtain a perfect clearance in the shed, and pack the
filling in uniformly.

The Weave
The weave employed is an ordinary double cloth plain, made with
face, back, binder and gut. It is necessary to have 2 back, 2 binder, 4
face and 4 gut warps. The accompanying table will show the number
of threads required in each warp, together with the weights carried
on each one.
WARP DETAILS FOR VAN HEUSEN COLLAR

4¼ Inch 4¾ Inch 5¼ Inch


No. of Threads Weight No. of Threads No. of Threads
Warps (60/2) Carried Warps (60/2) Warps (60/2)
Face 2 99 8 lbs. each 2 109 2 119
Face 2 82 7 lbs. each 2 92 2 104
Back 1 198 13 lbs. each 1 218 2 238
Back 1 164 12 lbs. each 1 184 2 208
Binder 1 99 10 lbs. each 1 109 1 119
Binder 1 78 7 lbs. each 1 88 1 100
Gut 2 99 8 lbs. each 2 109 2 119
Gut 2 78 7 lbs. each 2 88 2 100

It is essential that these warps be properly separated at the back


rolls; Use the first roll for two binder, second for 4 face, third for 2
back and fourth for 4 gut. A 24 dent back reed should be used, which
will allow for 4 face, 4 gut, 2 back and 2 binders in each dent, which
together with the back roll separation of the different warps makes it
convenient to handle the various warp sections and keep the threads
straight and confined to the limitations of space available.
Take-Up Giving Long-Sided Cloth

Method of Reeding
The front reed used is a 40 dent, with one cord or seven threads to
each dent. In some mills, however, great advantage has been found
in using a 26½ dent front reed, drawing 10 threads in one dent and
11 in the next, splitting between face and back, which makes the
stock work much easier, and relatively increases the output. Any
tendency to “rowing” caused by the dents in this coarser reed are
completely hidden in the bleaching process.

Harness Draft and Weave for Van Heusen Collar

The folding line between the neck band and the outer fold of the
collar is made by leaving out the binder and gut threads in four cords
at the desired point, only retaining the face and back threads. The
position of the folding line may be varied in each of the three
standard widths to meet the requirements of the manufacturer and
according to the style of the collar desired.
There are 104 picks per inch, counting at the folded line, as there
are more on the short side and less on the long side. High grade
60/2 C. P. yarn is used throughout. The goods are woven in the gray
and bleached afterwards.
Knitted Narrow Fabrics
By William Davis, M.A.
Branch of the Knitting Industry That Presents Interesting Features—
Yarn Testing—Manufacture of Cleaners and Meat Bags, Coverings
for Wires and Cables, Fancy Stitch and Colored Effects for
Trimmings—Use of Core Thread to Give Strength
Knitting machine builders are remarkable for the new inventions
and adaptations they are constantly bringing out on their machines.
Several important concerns in this line have recently been active in
producing types to deal with the large trade now being done in
narrow fabrics for various purposes.
The ordinary circular knitting machine of small diameter has long
been recognized as a suitable means of making trials of new yarns
to judge how closely they match the original sample, because in
knitting there is not the necessity of elaborate warp preparation and
loom mounting. The machine generally employed for this purpose is
an ordinary type of stocking knitter containing 96 or 112 needles. If
the machine is only to be employed as a sampling machine it is by
no means necessary to have a full stocking machine, because in this
work it is never necessary to use the ribber or dial which is always
supplied.
The work of sampling to shade is done in most weaving or
spinning factories and a narrow width plain stitch knitting machine is
satisfactory for the purpose. It is usually quite suitable to work the
machine by hand, owing to the small lengths required and the
frequent changes necessary when testing different colors and
qualities.
The latch needle machine is much better for this purpose than the
bearded needle frame owing to the simplicity of loop formation and
also owing to the facility with which small or thick yarns can be made
to give good work on the machine with suitable adjustment of the
stitch tensions. It is also used as a means of producing samples of
color, as the various colors can be introduced rapidly one after the
other on this machine.
This type of frame with the needles stationary, and revolving cams
and thread guide has from the first been recognized as the best
adapted for knitting gas mantles from ramie. The yarn is working in
long lengths on a narrow width circular knitting machine using the
latch needle and this fabric is afterwards cut into lengths according
to the mantles being produced. Mantles of different sizes can be
obtained by using different diameters of machines as supplied by
machine builders for this purpose.
In most hardware establishments and department stores one sees
woven metal material knitted into fabric on such machines, and
intended to be used for cleaning pots and pans in household work.
The wire has a sharp edge so as to grip the matter to be removed.
Knitting the metal material into looped form enables the product to
do its work with the greatest efficiency.
Another side line of the knitting industry is the production of what
are known as meat bags, with which the carcasses of frozen and
ordinary mutton and beef are covered prior to transport. These bags
are usually made on circular knitting machines of large diameter
using the latch needle, and as the size of the yarn is fine compared
to the set of the needles a gauze-like character is obtained which
allows free circulation of air as well as affording a clean method of
handling the meat and protecting it in the course of transport on ship,
train and truck.

Plain Knitted Tube


Examples are given by the accompanying illustrations of a few
products of the narrow fabric branch of the trade. It will be evident at
once what an interesting field of application is afforded by this
division of the knitting industry. Fig. 1 shows a plain knitted fabric
worked in circular form on a knitting machine using the latch needle
in which we have 40 needles in the circumference, so that in this
tube, front and back, are 40 stitches shown here in flat form.
Fig. 1 Fig. 2

Fig. 3 Fig. 4
It is evident that this tubing can be used for the purpose of
covering wires and cables which slide inside the fabric. It has more
elasticity than woven fabric of similar form and is generally produced
in a more simple and direct manner. It should be pointed out,
however, that this fabric is susceptible to being torn and if it breaks at
any point a little further strain will cause it to unravel in a rapid
manner. Thus it is clear that it cannot be used by itself to any great
extent in cases where great strain or pull will be applied to it. Made in
suitable materials, there is nothing to hinder this tube from serving as
lamp wicks.

Introduction of Fancy Stitch


Fig. 2 shows the same fabric with a fancy stitch introduced at one
needle on the cylinder of the knitting machine to produce what is
known as “tuck” work. In this work the needle in question is made to
hold its thread for one course without knocking over its loop, and
takes a second thread on the next course so that two threads are
knocked over together, giving rise to the effect shown in the middle
of the illustration.
This effect is produced by inserting a needle at this point with a
latch which is longer than the other needle latches of the machine,
with the result that it does not knock over its stitches with the
ordinary needles unless it receives a specially deep draw down,
which it gets every second course. All the stitches made on this
needle are double as compared with the single stitches in the rest of
the tube. In a machine with 20 needles in the circumference, one
needle would be inserted with this extra long latch to give a tuck
stitch right down the tube.
As regards the position of the fabric at which the tuck effect is
made to show, this is entirely a matter of arrangement in folding the
tube. According to the line of folding the tuck effect can be made to
appear in the middle or at the side.
Further examples of this style of narrow fabric are given in Figs. 3
and 4, made on the same diameter of machine. In Fig. 3 the tuck
stitch is made both front and back of the tape; that is, a long latch
needle is inserted in the cylinder every tenth needle so that there are
two in the circumference in place of the single line in Fig. 2. In Fig. 3
the second vertical line of tucking stitches appears on the back of the
fabric directly under the line shown on the face, and this has the
effect of making the tuck stitch more pronounced.
Fig. 5 Fig. 6

Fig. 7 Fig. 8

In Fig. 4 it will be recognized that this idea is further developed by


having two vertical rows of tuck stitches showing on the face of the
tube, and these are supplemented by two others placed directly
under them on the other side of the fabric, thus giving a total of four
long latch needles in the circumference of the machine. To give the
proper effect, the tube as obtained from the machine has to be
carefully pressed so as to show the fancy effect at the correct place,
for if the tube gets out of alignment at any point, this will affect the
form of the pattern.

Use for Trimmings


In the knitting industry such pieces of tubing folded double are
found extremely useful in trimming garments, particularly in the
circular or cut trade, where so much depends on having articles
tastefully ornamented at a moderate cost. At present the
manufacturer has often to buy these touches of trimmings from the
outside. The great advantage of doing the work on his own premises
and on his own machines is that he can install such a machine at a
very moderate cost and place among his ordinary knitting machines
at little or no extra cost for mechanics.

Patterns With Colored Yarns


Several other examples are given herewith of the application of
this principle of the latch needle knitting machine for tubular fabrics
suitable for narrow tapes or ribbons. Fig. 5 illustrates a fabric
produced on a machine of still narrower dimensions, having only 12
needles in the circumference of the machine. In this case the pattern
effect is introduced by having several feeds of thread in the
circumference; three different colors are employed and introduced in
the order of one white, one black, and one tan all the way down the
fabric, thus giving rise to a style of pattern which is very suitable for
many purposes of the knitting manufacturer, particularly of outer
garments. There are three yarn feeds round the circumference of
this machine and every revolution of the machine creates three
courses in the three colors named.
It will be noted that this gives rise to a color effect showing at a
decided angle to the right, in place of being exactly horizontal, as
would be approximately the case in a machine of larger diameter.
This is one of the defects of all machines of this character where
several feeds are used. They create a decidedly spiral tendency and
the color effects appear at an angle. In many cases this is no
disadvantage, but rather the reverse, as it takes away the stiffness of
the color scheme and produces attractive effects in twill fashion
similar to what can only be created in woven goods by the aid of the
corkscrew weave and an elaborate setting of the cloth.
Fabrics of the character shown in Fig. 5 are very useful for edging
parts of knitting coats, jumpers or vestings, these edgings giving a
suitable finish for the edges of the garment. In addition to the color
feature, these bands are often made in a tight tension so as to give a
rigid cloth which will strengthen certain parts at which extra pull is
applied, enabling the garment to retain its shape.

Knitted Cords
Fig. 6 gives a view of a narrow fabric made on a circular latch
needle knitting machine with only six needles in the cylinder. There
are two feeds, one supplying blue yarn to the needles and the other
supplying green, the pattern being alternate courses of green and
blue. The material is artificial silk and the cord, for it is nothing more,
is employed for threading through certain garments which have a
kind of open trimming through the spaces of which this cord is
passed to complete the drawing together of the part. Very often
these drawing together cords are provided with tassels at their
extreme ends to afford a further ornamental feature.
Fig. 7 gives another variation of this pattern produced on the same
machine where the courses alternate with each other in red and
green. This sample shows the facility with which new color blends
can be produced to match any color of ground garment. One bobbin
is simply replaced with another on the machine, or both may be
changed. In this pattern again a decided tendency is shown for the
effect to run in the direction of the right owing to the tendency to a
spiral effect.

Use of Core Thread


In some cases the cord made of the knitted fabric itself is too
elastic and lacks the tensile strength required for certain purposes. In
this event it is an easy matter to arrange that a center core thread be
run into the machine as the fabric is being knitted. The core thread is
made of some strong, non-elastic material and is arranged on a
bobbin above the machine. That material is drawn off its bobbin and
passes down the center of the circle of needles so that it is
completely covered by the knitted fabric. Its use considerably
strengthens the cord and makes it suitable for certain purposes for
which it otherwise would not be satisfactory.
Fig. 8 shows a sample of an actual cord made on the same type of
machine where we have only four needles in the cylinder, these
being worked with two yarn feeds, one black and one white, giving a
one and one black and white effect in the cord. For this style it is
necessary to have a core thread of material which passes into the
center of the tube as the knitting proceeds. This makes the cord bulk
larger and causes it to be quite round in effect.
The smallest cord of this character is produced from one latch
needle by an arrangement such as is supplied with the Union
Special sewing machine, where the latch needle works by power,
enters its loop and takes the new thread, which it draws through the
old one, thus making an endless chain of loops in a very rapid
manner. These strings are used as the ground work of the
ornamental edgings produced on this machine.

THE ABBOTT PRESS, NEW YORK


*** END OF THE PROJECT GUTENBERG EBOOK ELASTIC AND
NON-ELASTIC NARROW FABRICS ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying copyright
royalties. Special rules, set forth in the General Terms of Use part of
this license, apply to copying and distributing Project Gutenberg™
electronic works to protect the PROJECT GUTENBERG™ concept
and trademark. Project Gutenberg is a registered trademark, and
may not be used if you charge for an eBook, except by following the
terms of the trademark license, including paying royalties for use of
the Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is very
easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund from
the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law in
the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms of
this agreement by keeping this work in the same format with its
attached full Project Gutenberg™ License when you share it without
charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears, or
with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
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!

textbookfull.com

You might also like