100% found this document useful (1 vote)
8 views43 pages

Reactive Programming with JavaScript 1st Edition Hayward Jonathan pdf download

The document provides information about the book 'Reactive Programming with JavaScript' by Jonathan Hayward, detailing its content, structure, and the author's background. It includes links to various related books on reactive programming and functional programming in JavaScript and other languages. The book aims to teach readers about the ReactJS framework and its applications in web development.

Uploaded by

ttrgrwt919
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 (1 vote)
8 views43 pages

Reactive Programming with JavaScript 1st Edition Hayward Jonathan pdf download

The document provides information about the book 'Reactive Programming with JavaScript' by Jonathan Hayward, detailing its content, structure, and the author's background. It includes links to various related books on reactive programming and functional programming in JavaScript and other languages. The book aims to teach readers about the ReactJS framework and its applications in web development.

Uploaded by

ttrgrwt919
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/ 43

Reactive Programming with JavaScript 1st Edition

Hayward Jonathan download

https://textbookfull.com/product/reactive-programming-with-
javascript-1st-edition-hayward-jonathan/

Download full version ebook from https://textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

Reactive Programming with RxJS 5 Untangle your


asynchronous Javascript code 1st Edition Sergi Mansilla

https://textbookfull.com/product/reactive-programming-with-
rxjs-5-untangle-your-asynchronous-javascript-code-1st-edition-
sergi-mansilla/

RxSwift Reactive Programming with Swift 1st Edition


Florent Pillet

https://textbookfull.com/product/rxswift-reactive-programming-
with-swift-1st-edition-florent-pillet/

Reactive Programming with Angular and ngrx: Learn to


Harness the Power of Reactive Programming with RxJS and
ngrx Extensions 1st Edition Oren Farhi (Auth.)

https://textbookfull.com/product/reactive-programming-with-
angular-and-ngrx-learn-to-harness-the-power-of-reactive-
programming-with-rxjs-and-ngrx-extensions-1st-edition-oren-farhi-
auth/

Scala Reactive Programming Build scalable functional


reactive microservices with Akka Play and Lagom 1st
Edition Rambabu Posa

https://textbookfull.com/product/scala-reactive-programming-
build-scalable-functional-reactive-microservices-with-akka-play-
and-lagom-1st-edition-rambabu-posa/
RxSwift Reactive Programming with Swift Third Edition
Raywenderlich Tutorial Team

https://textbookfull.com/product/rxswift-reactive-programming-
with-swift-third-edition-raywenderlich-tutorial-team/

Beginning Functional JavaScript. Functional Programming


with JavaScript using EcmaScript 6 1st Edition Anto
Aravinth

https://textbookfull.com/product/beginning-functional-javascript-
functional-programming-with-javascript-using-ecmascript-6-1st-
edition-anto-aravinth/

Beginning Functional JavaScript: Functional Programming


with JavaScript Using EcmaScript 6 1st Edition Anto
Aravinth

https://textbookfull.com/product/beginning-functional-javascript-
functional-programming-with-javascript-using-ecmascript-6-1st-
edition-anto-aravinth-2/

Functional Reactive Programming 1st Edition Stephen


Blackheath

https://textbookfull.com/product/functional-reactive-
programming-1st-edition-stephen-blackheath/

Get Programming with JavaScript First Edition John R


Larsen

https://textbookfull.com/product/get-programming-with-javascript-
first-edition-john-r-larsen/
Reactive Programming
with JavaScript

Learn the hot new frontend web framework from


Facebook – ReactJS, an easy way of developing
the V in MVC and a better approach to software
engineering in JavaScript

Jonathan Hayward

BIRMINGHAM - MUMBAI
Reactive Programming with JavaScript

Copyright © 2015 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 author, 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: August 2015

Production reference: 1260815

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham B3 2PB, UK.

ISBN 978-1-78355-855-1

www.packtpub.com
Credits

Author Project Coordinator


Jonathan Hayward Mary Alex

Reviewers Proofreader
Antal Orcsik Safis Editing
Sven A Robbestad
Hibai Unzueta Indexer
Rekha Nair

Commissioning Editor
Kunal Parikh Graphics
Jason Monteiro

Acquisition Editor
Manish Nainani Production Coordinator
Aparna Bhagat

Content Development Editor


Aparna Mitra Cover Work
Aparna Bhagat

Technical Editor
Mohita Vyas

Copy Editors
Vikrant Phadke
Alpha Singh
Ameesha Smith-Green
About the Author

Jonathan Hayward is a polymath with advanced degrees bridging mathematics,


computers (UIUC), theology, and philosophy. He obtained his theology and
philosophy degrees from Cambridge University. He has worked in many areas of
web development, with a site (http://cjsh.name/) for "after hours" titles, and he
is also interested in the human side of computing, including usability/UI/UX. His
most popular work is a piece of poetry at https://cjshayward.com/doxology/.
The faster route to get there is by typing cjsh.name/doxology, and it gets there.
Jonathan has studied many languages, including French, Spanish, Latin, and
Greek. He is currently learning Russian. He has worked on various other books
as well (refer to http://www.amazon.com/s/ref=nb_sb_noss_2?url=search-
alias%3Daps&field-keywords=%22CJS+Hayward%22 to find out more).

I would like to thank my parents, John and Linda; my brothers,


Matthew, Joe, and Kirk; my sisters-in-law, Kristin and Adrien; and
my nephews, Jack and James. I would also like to thank all of the
Packt Publishing editorial team, including a great many who I do not
know, but I would like to single out Usha, Akshay, Neetu, Mohita,
and Aparna. They are the editors who left me wishing we lived next
door. Finally, I'd like to thank all those at Facebook for releasing
ReactJS as a framework that is free for the rest of the world.
About the Reviewers

Antal Orcsik is a full-stack web developer from Hungary. He works at Prezi


(https://prezi.com/) as a payment engineer. In the last decade, he worked
for Hungary's biggest real estate catalog site and one of the biggest local weather
portals. Then he joined the fantastic team that created a revolutionary presentation
tool called Prezi to change the way the world shares ideas. During this time, he
gained experience in Scala, Python, and PHP backend environments as well as
JavaScript frontend technologies, while experimenting with various other fields
of the full-stack web development spectrum. Antal is a big fan of cats, games,
science fiction, and hamburgers.

I would like to thank my lovely girlfriend for her support and


patience while I played my part in creating this book.

Sven A Robbestad is a Norwegian open source developer and frequent


conference speaker with more than 20 years of experience of working on the Web.
He is passionate about mobile development and is always ready to talk about code.
Sven is currently employed at TeliaSonera (http://www.teliasonera.com/) as a
technologist.
Hibai Unzueta is a multifaceted builder who was programming and designing
complex systems much before he applied for his first job.

He believes that technology is nothing without technique and technique in turn needs
a solid vision-based foundation. He enjoys territories where different knowledge
areas overlap. Lately, he has been involved in projects of data visualization and user
experience design.

For the past 2 years, he has been researching travel search paradigms and technology
with the intention of launching a new project that is expected to rethink the way we
do travel planning. As a result, he has worn many hats, but never all of them at once.
www.PacktPub.com

Support files, eBooks, discount offers, and more


For support files and downloads related to your book, please visit www.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.
TM

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital
book library. Here, you can search, access, and read Packt's entire library of books.

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

Free access for Packt account holders


If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view 9 entirely free books. Simply use your login credentials for
immediate access.
To my nephews Jack and James: You are the light of my life
Table of Contents
Preface v
Chapter 1: Introduction and Installation 1
A 10,000-foot overview 1
An easier way to handle user interface programming 2
Programming paradigms 3
Installing the tools required 6
Installing Google Chrome 6
Installing Node.js 10
Installing the Starter Kit for ReactJS 16
Summary 18
Chapter 2: Core JavaScript 19
The strict mode 20
Variables and assignment 20
Comments 21
Flow control 22
A note on values and NaN 22
Functions 22
Comments 24
Loops 28
Taking a look at ECMAScript 6 29
Summary 30
Chapter 3: Reactive Programming – The Basic Theory 31
Declarative programming 33
The war on Heisenbugs 33
The Flux Architecture 35
From the pit of despair to the pit of success 35
Complete UI teardown and rebuild 38
JavaScript as a Domain-specific Language 39

[i]
Table of Contents

The Big-Coffee Notation 40


Summary 43
Chapter 4: Demonstrating Nonfunctional Reactive
Programming – A Live Example 45
The history of a game with multiple ports 46
The HTML for the web page 47
Using a content distribution network wherever we can 48
Some simple styling 48
A fairly minimal page body 50
The JavaScript that animates that page 51
A brief syntax note – Immediately Invoked Function Expression 51
Variable declaration and initialization 52
The function used to start or restart the game 53
The function that creates game levels 54
Getting our hands dirty with ReactJS classes 55
Tick-tock, tick-tock – the game's clock ticks 59
GAME OVER 62
Summary 65
Chapter 5: Learning Functional Programming – The Basics 67
Custom sort functions – the first example of functional
JavaScript and first-class functions 69
This leads us to array.filter() 72
Illusionism, map, reduce, and filter 74
Fool's gold – extending Array.prototype 75
Avoiding global pollution 77
The map, reduce, and filter toolbox – map 78
The reduce function 78
The last core tool – filter 81
An overview of information hiding in JavaScript 82
Information hiding with JavaScript closures 85
Summary 87
Chapter 6: Functional Reactive Programming – The Basics 89
A trip down computer folklore's memory lane 90
Advanced prerequisites for Hello, World! 92
Distinguishing the features of functional reactive programming 95
If you learn just one thing... 96
Learn what you can! 99
JavaScript as the new bare metal 103
Summary 105

[ ii ]
Table of Contents

Chapter 7: Not Reinventing the Wheel – Tools for


Functional Reactive Programming 107
ClojureScript 108
Om 110
Bacon.js 110
Brython – a Python browser implementation 112
Immutable.js – permanent protection from change 115
Jest – BDD unit testing from Facebook 122
Implementing the Flux Architecture using Fluxxor 126
Summary 127
Chapter 8: Demonstrating Functional Reactive
Programming in JavaScript – A Live Example, Part I 129
What we will be attempting in this chapter 130
This project's first complete component 136
The render() method 139
Triggering the actual display for what we have created 142
Summary 143
Chapter 9: Demonstrating Functional Reactive Programming
in JavaScript with a Live Example Part II – A To-do List 145
Adding a to-do list to our application 146
Including ReactJS add-ons in our project 147
Setting the appropriate initial state 147
Making text editable 147
Heavy lifting with render() 148
Inner functions used to render 148
Building the result table 149
Rendering our result 151
Differentiating columns visually 151
Summary 152
Chapter 10: Demonstrating Functional Reactive Programming
in JavaScript: A Live Example Part III – A Calendar 153
Play it again Sam – an interesting challenge 154
Classical Hijaxing works well 157
Built with usability in mind, but there's still room to grow 160
Plain old JavaScript objects are all you need 164
Progressive disclosure that starts simply 166
A render() method can easily delegate 168
Boring code is better than interesting code! 169
A simple UI for simply non-recurring entries... 170

[ iii ]
Table of Contents

The user can still opt-in for more 172


Avoiding being clever 174
Anonymous helper functions may lack pixie dust 175
How far in the future should we show? 178
Different stripes for different entry types 178
Now we're ready to display! 179
Let's be nice and sort each day in order 180
Let them use Markdown! 181
One thing at a time! 182
The holidays that inspired this calendar 183
Summary 184
Chapter 11: Demonstrating Functional Reactive Programming
in JavaScript with a Live Example Part IV – Adding a
Scratchpad and Putting It All Together 187
Adding a WYSIWYG scratchpad, courtesy CKeditor 188
Bringing all things together into one web page 188
This book is about ReactJS, so why use CKeditor? 189
CKeditor – small free offerings, and small is beautiful 190
Including CKeditor in our page 190
Integrating all four subcomponents into one page 192
Persistence 194
One detail – persisting the CKeditor state 198
Summary 199
Chapter 12: How It All Fits Together 201
A review of the terrain covered 202
Could the Mythical Man-Month have been avoided? 202
ReactJS is just a view, but what a view! 204
Programming is fun again! 205
Summary 208
The next steps from here 209
Appendix: A Node.js Kick start 211
Node.js and INTERCAL 212
Warning – Node.js and its ecosystem are hot, and hot enough
to burn you badly! 218
A sample project – a server for our Pragmatometer 223
Client-side preparations 224
The server side 227
Summary 231
Index 235

[ iv ]
Preface

Preface
Charles Cézanne famously said about the impressionist painter Claude Monet,
"Monet is only an eye, but what an eye!" Today, we can similarly say, "ReactJS
[or if you prefer, "ReactJS is only a view, but what a view!"

ReactJS has neither the intention nor the ambition to be a complete, general-purpose
web framework. It doesn't even include tooling for Ajax calls! Rather, the intent
is that you will use technologies that make sense for different concerns in your
application, and use ReactJS's power tools for views and user interface development.

Functional reactive programming has been an extremely high-hanging fruit, with


a prohibitive barrier to entry in terms of sheer mathematical expectations assumed
in order to work with it. No longer with ReactJS! A veteran C++ programmer with
no particularly deep math background—I said this to pick a profile of programmers
who keep on saying on Stack Overflow that they don't get functional reactive
programming—is a veteran programmer who stands a fair chance of getting real
work done using ReactJS.

This book is about ReactJS, a simple and small technology that nonetheless lets huge
teams work together on different components of a web page without stepping on
each others' feet, but without a hint of bureaucratic measures. And add some liberal
help of pixie dust.

What this book covers


Chapter 1, Introduction and Installation, provides a 10,000-foot overview of different
programming paradigms, each of which has its strengths, and an introduction to
the trio of functional programming, reactive programming, and functional reactive
programming.

[v]
Another Random Scribd Document
with Unrelated Content
Now, if we believe that God loves us as He
does, quite infinitely—more than we can even
understand—we may be quite sure that He will
always give us every good thing that He can—that
He will never put any limit to His promises if He
can help it—that He would like to give Rest and all
other good things to everyone if it were possible.
We must never doubt for one moment God’s
willingness to give us all good things, and to do all
for us that it is possible for love to do. Remember
what Christ says about that, “If ye then, being
evil, know how to give good gifts unto your
children, how much more shall your Father which
is in heaven know how to give good things to
them that ask Him (Matt. vii. 11). And again, “I
say not that I will pray the Father for you; for the
Father himself loveth you” (John xvi. 26, 27). And
St. Paul tells us that “He that spared not His own
Son, but delivered Him up for us all, how shall He
not with Him freely give us all things?” (Rom. viii.
32).
So you see that we may be quite sure that if we
do not get this great blessing, Rest, it will not be
because God is not willing to give it to us.
But there are certain great principles, which we
call laws, which govern God’s world, which are of
the very nature of God’s own being, and the more
we come to know and realize about these laws,
the more we shall find them to be the most
wonderfully good and beautiful and blessed ones
which could be imagined, and see in every one of
them some great and glorious provision for the
best possible things, which could not come
without them.
Now you know God made man in His own
image (Gen. i. 27), and, though man afterwards
broke that beautiful image and lost the perfect
likeness that God had given him to Himself—(as
we are told in Eccles. vii. 29, “God made man
upright; but they have sought out many
inventions”)—still man is so deep a partaker of
God’s nature, that the truest and deepest part of
him is that which is like God and akin to Him, so
that St. Paul tells us, “In God we live, and move,
and have our being ... for we are also his
offspring” (Acts xvii. 28). Now just because our
whole blessedness, and our only hope of
returning at last to the perfect image in which
God made us, lies in our trying to get nearer and
nearer to God, and to become more and more like
Him, so that our Lord Jesus bids us “Be perfect,
even as your Father which is in heaven is perfect”
(Matt. v. 48)—just because of this, I say, one of
the great and merciful laws of God is that none of
us shall ever find any true happiness apart from
goodness; and no one can hope for Rest who
does not seek it in the way of striving to do God’s
will. Some one has said that the true Rest of the
soul is attained only when God’s will is our will. So
we are told by Isaiah, that “There is no peace,
saith my God, for the wicked” (Isa. lvii. 21).
And “the wicked” do not mean those only who
do great and shameful sins, which seem very
terrible even to us, but all who do not strive in
everything to do God’s will. Let us look a little
more closely at what this will of God’s is.
We are told in the Old Testament what it is.
Look at Isaiah i. 16, 17, “Wash you, make you
clean; put away the evil of thy doing from before
Mine eyes; cease to do evil; learn to do well; seek
judgment, relieve the oppressed, judge the
fatherless, plead for the widow.” And again, look
at Micah vi. 8, “He hath showed thee, O man,
what is good; and what doth the Lord require of
thee, but to do justly, and to love mercy, and to
walk humbly with thy God.”
And when we come to the New Testament, we
find Our Lord Jesus Christ telling men who those
are whom God blesses—what it is to do God’s will:
“Blessed are the poor in spirit.
Blessed are the meek.
Blessed are they that hunger and thirst after righteousness.
Blessed are the merciful.
Blessed are the pure in heart.
Blessed are the peacemakers.” (See Matt. v.)

And while He says that that man only “shall


enter into the kingdom of heaven,” who “doeth
the will of my Father which is in heaven” (Matt.
vii. 21), He explains that will to be, “Thou shalt
love the Lord thy God with all thy heart, and with
all thy soul, and with all thy strength; and thy
neighbour as thyself.... This do and thou shalt
live” (Luke x. 27, 28). So that if that Rest seems
to us a great and glorious thing to attain, we must
seek it in God’s way; we must try to do God’s will
here, that we may rest in perfect harmony and
agreement with that will hereafter.
Is it not a wonderful and beautiful thing that
God loves us so much that He will not let us be
otherwise than good?—that He will not cease to
remind us by constant unhappiness and
restlessness that we are not fulfilling our highest
end, till we strive day by day to come nearer to
Him; so that at last, in that great happy day of
Rest, there will be no more striving; for “we shall
be like Him, for we shall see Him as He is.”
Would you like to hear once more those words,
which I daresay you know so well, and which tell
us better than any others have ever done, what
that Rest shall be, and how it shall satisfy all our
wants at last, as “eye hath not seen, nor ear
heard.”
Let us turn to the Revelation of St. John, and
hear the description he gives of those who have
entered into Rest: “They shall hunger no more,
neither thirst any more; neither shall the sun light
on them, nor any heat. For the Lamb which is in
the midst of the throne shall feed them, and shall
lead them unto living fountains of waters: and
God shall wipe away all tears from their eyes.”
“Behold the tabernacle of God is with men, and
He will dwell with them, and they shall be His
people, and God Himself shall be with them, and
be their God.... And there shall be no more death,
neither sorrow, nor crying, neither shall there be
any more pain: for the former things are passed
away.” “And there shall be no night there; and
they need no candle, neither light of the sun; for
the Lord God giveth them light: and they shall
reign for ever and ever.” “Blessed are they that do
His commandments, that they may have right to
the tree of life, and may enter in through the
gates into the city” (Rev. vii. 16, 17; xxi. 3, 4; xxii.
5, 14).
APPENDIX C
CONCLUSIONS FROM “A VISIT TO AMERICAN
SCHOOLS AND COLLEGES”

“The two features of American education which


strike an Englishman as characteristic, are, the
union of all classes in the same schools and of
both sexes in the same colleges; the first being
nearly universal throughout the Northern States;
the second still exceptional, and as regards public
opinion, still on probation.
I. That no disadvantages attend the system of
mingling all classes in school can hardly, I
suppose, be maintained, though it may be
thought that the advantages greatly
preponderate.... So far as distinctions and
consequent separations of rank depend on merely
external circumstances, such as wealth and
position, I do not believe that we gain much by
observing them; but when they rest on real
differences of culture and refinement, the case
becomes different, and it does not seem good
policy to risk certain loss to one class, without
being sure of securing a more than proportionate
gain to another. In short it seems to me that, if
we can mingle different classes of children in such
proportions and under such conditions as to
ensure that the higher standard shall prevail over
the lower, and the tone of all be raised to that of
the foremost few, the measure must be an
altogether good one: and I am sure that to some
extent and under some restrictions this may be
done: but if once the inferior standard of
refinement is allowed to predominate, the lower
dragging down the higher rather than being raised
by it, I fear that no results gained can pay for the
loss accruing.
II. With regard to the joint education of the
sexes, it seems to be pretty clearly established
that, in America at least, this system can prosper
for years without any markedly evil effects as to
the morals and manners of the fellow-students,
and the evidence of most professors and teachers
goes strongly to show that, on the contrary, the
mutual influence exerted is usually very beneficial.
It seems also to be proved that at least a
considerable number of women can undertake
and successfully complete the same course of
study that is usual for men, and that without
more apparent detriment to their health than
students of the other sex.
The general issue divides itself into three
practical questions: (a) whether men and women
shall pursue the same course of study; (b)
whether they shall continue it to the same point;
and (c) whether their studies, if identical, shall be
pursued together....
(a) If there is no fundamental education
answering to the needs of common humanity,
and, therefore, equally necessary both for men
and women,—it follows that the difference of sex
is more radical and more essential than is the
common humanity that underlies it.... Women
have, I think, from the earliest times, suffered
from the fact of men’s pretensions to ‘evolve out
of their moral consciousness the idea of’ a
woman,—which idea has not by any means
always happened to correspond with the facts
that might, perhaps, afford a surer guide.... It
might perhaps be shown that those who, starting
with their ‘evolved idea’ of a woman, deny that
the same education may safely be given to each
sex because of the vast essential differences of
nature, are in point of fact more incredulous of
the reality of that difference than those who hold
the opposite views.... The naturalist will not fear
to lay meat and hay before horses and lions, cows
and tigers, for neither will the lion be seduced by
the offer of hay, nor will the horse and cow lose
their distinctive characteristics because they both
partake of it.....
I do not by any means intend to say that I
desire to see the education of all women made
identical with that at present given to men. It
must first be proved that that education is, in
truth, the best and most desirable for the human
being, before we can wish to make it universal.
But I do say that what is ultimately decided by the
wisdom of ages to be the best possible form of
culture for one human nature, must be so for
another, for our common humanity lies deeper in
all, and is more essential in each, than any
differences.
I do not believe that women are to be
‘educated to be wives and mothers’ in any sense
in which it is not equally imperative to educate
boys to be husbands and fathers. I believe that
each human being, developed to his or her best
and utmost, will most perfectly fulfil the duties
that God may appoint in each case, and if
teachers and parents have ever before their eyes
the aim of making good, true, and sensible
women, I do not fear but they will also train the
best wives and mothers....
(b) I confess that I have been surprised in
America to find how much study young women do
seem able to accomplish without material injury,
but I do not know how much allowance to make
for possible differences of national constitution....
My own belief, founded mainly on observation of
English girls, is, that in quickness of intellect they
in no way fall behind their brothers, and that
during one or two hours’ study of any subject
they would be quite able to keep up with them,
but that after a certain time their physical powers
flag,—sooner perhaps than those of boys,—and
that a long continued strain is apt to be injurious
to them. I state this opinion with great diffidence,
however, for many of my fellow-teachers and
friends assert the contrary....
Above all, be the limits of study what they may,
let whatever is done be done thoroughly, so that
the only too well deserved reproach of
superficiality and incompleteness may at length be
removed from our system of female education.
Work half done is not merely unsatisfactory, it is
absolutely injurious to the moral and mental
health of the worker; and I believe it is better to
omit any and every study altogether, than to allow
a pupil to skim over it so as to gather together a
string of words thereto relating, with no solid
meaning or knowledge lying beneath.
(c) The third question,—whether men and
women shall pursue their studies together,—I do
not much care to discuss, for I am by no means
sure of having sufficient data whereon to rest any
opinion, and moreover it seems to me not vital to
the general issue. So long as men and women can
each obtain an absolutely good education, it does
not appear very material whether they get it in
company or not,—not material, that is, as regards
the education, whatever may be the case as to
the social results.
But one thing does seem to me important, viz.
that not merely a similar but an identical standard
should exist for all, whether it be the many or the
few who avail themselves of it. This fixed standard
does exist for men, being represented by the
examinations and degrees of the Universities, and
that the same facilities should be thrown open to
women does seem to me vitally important. I have
already said that I should not care to see all
women aim at so high a mark; nor do I believe
that, for many years, a large number would
present themselves for examination. But that
those who do, by earnest study, attain to the
prescribed standard, should be excluded from
recognition of the fact, seems to be manifestly
unjust and wrong. Universities hold, I suppose, in
some sense a national trust, and that trust
involves all possible aid to the cause of education
throughout the land.”
APPENDIX D
THE EDINBURGH EXTRA-MURAL SCHOOL

The Edinburgh Extra-Mural classes are medical


classes conducted by fully qualified and
authorized lecturers other than the University
professors. They prepare students primarily for
the examinations of the Royal Colleges of
Physicians and Surgeons, but their certificates are,
as a matter of fact, accepted by many examining
bodies. The history of the association of these
classes with the University is—briefly—as follows:
In 1840 Professor Syme begged the Town
Council of Edinburgh, who were then the
recognized patrons of the University, to order the
recognition of extra-mural classes, an argument
for the innovation being “that one of the
professors was so comparatively inefficient that
many students, after paying his fee and obtaining
his certificate of attendance, went to learn his
subject elsewhere.” In 1842 the Town Council
ordained that four Extra-Mural classes should be
allowed to count for graduation,—the classes to
be chosen by each student at his discretion. The
Medical Faculty of the University refused to
consent to this except on the condition that any
student taking such classes should have a year
added to his curriculum. The Town Council
refused this condition, and the Senatus,
supporting the Medical Faculty, referred the
matter to the Court of Law. In 1850 judgment was
given against the Senatus; they appealed to the
Inner House, but the judgment was confirmed in
1852. An appeal was taken to the House of Lords,
but again in 1854 the Town Council gained the
day. In 1855 the regulations came into operation
and have ever since remained in force.
APPENDIX E
LETTER TO THE TIMES IN REPLY TO MRS. GARRETT
ANDERSON

“To the Editor of the Times.


Sir,—I have only just seen the letter from Dr.
Garrett Anderson which you published on the 5th
inst., and I venture to beg that you will allow me
to point out my reasons for thinking she has
selected the very worst of all the alternatives
suggested, when she advises Englishwomen to go
abroad for medical education.
In the first place, I think that Dr. Anderson
assumes greatly too much in supposing that all
the Scotch Universities are permanently closed to
women by the recent decision, especially when
notice has already been given in Parliament that a
Scotch member will, at the beginning of next
Session, bring in a Bill to enable those Universities
both to teach and examine female students. Even
if no such Bill were announced, it would, I
suppose, be open to every Scotch University at
this moment to obtain the necessary powers
merely by application for the sanction of the
Queen in Council, as it was repeatedly stated,
both by the defenders in the late suit and by
those Judges who gave decisions in their favour,
that it was merely the absence of Royal authority
for recent changes which rendered those changes
illegal. I think there is very good ground to hope
that this course may be taken by one or more of
the other Universities, even if Edinburgh is
content to rest quietly under the imputations on
her good faith which can hardly be effaced in any
other way.
Even if the Scotch Universities are left out of
the question, those of Cambridge and London
may well be expected to move in a matter like the
present; or it would hardly seem unreasonable to
hope that some of the surplus revenues in Ireland
might be applied in one way or other to the
solution of the present difficulty.
I think, moreover, that Mrs. Anderson concedes
very much more than has yet been proved when
she states that the examining bodies, such as the
Colleges of Physicians and Surgeons, ‘have the
power to refuse to admit women to their
examinations and qualifications.’ That they have
the will to do so may, I fear, only be too probable,
but it is at least a very open question whether
such power does lie in their hands. I have been
assured on very good authority that this is not the
case, and at any rate I believe no decision to that
effect has ever been given by a Court of Law.
Certainly the primâ facie assumption would be the
other way. The Medical Act of 1858 in no way
excludes women from the profession, and two
women are actually registered under its
provisions. It is, therefore, hardly credible, that
when all candidates are by the Act required to
submit to certain examinations, the Examining
Boards should at their option be able to turn away
all applicants who are not of the male sex, no
mention of any such power being contained in the
Act itself; nor, I think, need we assume even a
desire to exclude women on the part of all the
Examining Boards until application has been made
to each individually; and this has never, so far as I
am aware, been done at present.
I trust, therefore, that I have shown that Mrs.
Anderson’s advice that all Englishwomen desiring
to study medicine should at once expatriate
themselves is premature in the extreme; I hope
further to show that it is moreover radically
erroneous in principle. Even if it should ultimately
be proved (as is at present by no means the case)
that women cannot obtain official examination in
this country, and therefore cannot enter their
names on the Register, it would still, I think, be
very far from certain that their best plan was to
seek such examination abroad, seeing that after
having spent years of labour and much money
they would, as regards legal recognition, be
exactly as far as ever from gaining their end. Mrs.
Anderson says that they would at least obtain
‘what is denied them in their own country, a first-
class medical education.’ If it were true that such
an education could not be got without going
abroad, there would, no doubt, be much force in
this argument, but I submit that this is not the
case. Without stopping to consider the
alternatives brought forward by your
correspondent herself—the establishment of a
new school for women or the purchase of one of
the existing hospital schools—either of which
seems to me infinitely preferable, Mrs. Anderson
quite overlooks the fact that at this moment
medical classes of first-rate quality can be
obtained in Edinburgh in the Extra-Mural school
(many of whose lecturers stand much higher than
[166]
the University professors in public estimation),
and that with very little trouble a complete
curriculum of medical study could be there
arranged, without altering any of the existing
conditions of affairs. The doors of the Edinburgh
Royal Infirmary have also been thrown open to
women, though under some restrictions, and
excellent clinical instruction is given to them there
by two of the best and most popular teachers in
the city. Can any one doubt that when so much
has been secured, and when every year promises
increased facilities, it is infinitely better that
Englishwomen should study medicine under the
direction of their own countrymen, in their own
language, and amid the social and hygienic
conditions which will occur in their own future
practice, rather than in a foreign land, from
lecturers who teach in a strange language and in
hospitals where all the arrangements and theories
vary from those of this country, and where even
the types of disease may be so far modified as
greatly to lessen the value of the instruction for
those who intend to practise medicine in Great
Britain?
In point of fact, the question of medical
education in this country may be already
considered solved, even if we grant the necessity
of attending lectures on every subject in the
medical curriculum. It is, however, worth remark
that many of the very first men in the profession
are becoming more and more strongly in favour of
free trade in study—i.e., of allowing every student
to obtain his knowledge as he pleases, whether
from books or from lectures, requiring only final
evidence of satisfactory results. It may be that on
investigation the present system will be found to
rest rather on the ‘vested interests’ of teachers
than on the needs of students, and, if so, the
question of medical education for women will be
still further simplified. At present, however, it is
not needful to argue that question. I have shown
that provision for the education of women after
the present fashion is to a great extent already
made, and that, for purposes of instruction at
least, it is quite unnecessary for them to
expatriate themselves.
With regard to examination, the case seems to
me equally clear. No foreign diploma or degree is
at present acknowledged as qualifying for
registration in this country, and though it may be
well for those who covet such ornamental honours
to go through the examinations requisite to obtain
them, I cannot see any ground on which it would
be worth the while of most Englishwomen to live
for years abroad to arrive at a result so eminently
unpractical. We live under English law, and to
English law we must conform, so far as lies in our
power; if we are arbitrarily precluded from such
compliance it is to the English Government that
we must look for a remedy. I can imagine few
things that would please our opponents better
than to see one Englishwoman after another
driven out of her own country to obtain medical
education abroad, both because they know that,
on her return after years of labour, she can claim
no legal recognition whatever, and because they
are equally certain that, so long as no means of
education are provided at home, only a very small
number of women will ever seek admission to the
profession. I do not say that a woman may not be
justified in going abroad for education if her
circumstances make it imperative that she should
as soon as possible enter upon medical practice;
but I do say, and I most firmly believe, that every
woman who consents to be thus exiled does more
harm than can easily be calculated to the general
cause of medical women in this country, and
postpones indefinitely, so far as in her lies, the
final and satisfactory solution of the whole
question.
It is not an easy thing to remember at all times
that
‘They also serve who only stand and wait’;
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