100% found this document useful (1 vote)
21 views61 pages

Pro JavaScript With MooTools Learning Advanced JavaScript Programming 1st Edition Mark Joseph Obcena (Auth.) Instant Download

The document is a promotional listing for the book 'Pro JavaScript with MooTools: Learning Advanced JavaScript Programming' by Mark Joseph Obcena, which is available for digital download. It includes details about the book's content, structure, and additional resources related to JavaScript and MooTools. The document also provides links to other related books and resources for JavaScript programming.

Uploaded by

dlbvxss4176
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)
21 views61 pages

Pro JavaScript With MooTools Learning Advanced JavaScript Programming 1st Edition Mark Joseph Obcena (Auth.) Instant Download

The document is a promotional listing for the book 'Pro JavaScript with MooTools: Learning Advanced JavaScript Programming' by Mark Joseph Obcena, which is available for digital download. It includes details about the book's content, structure, and additional resources related to JavaScript and MooTools. The document also provides links to other related books and resources for JavaScript programming.

Uploaded by

dlbvxss4176
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/ 61

Pro JavaScript with MooTools Learning Advanced

JavaScript Programming 1st Edition Mark Joseph


Obcena (Auth.) - PDF Download (2025)

https://ebookultra.com/download/pro-javascript-with-mootools-
learning-advanced-javascript-programming-1st-edition-mark-joseph-
obcena-auth/

Visit ebookultra.com today to download the complete set of


ebooks or textbooks
We have selected some products that you may be interested in
Click the link to download now or visit ebookultra.com
for more options!.

MooTools Essentials The Official MooTools Reference for


JavaScript and Ajax Development 1st Edition Aaron Newton

https://ebookultra.com/download/mootools-essentials-the-official-
mootools-reference-for-javascript-and-ajax-development-1st-edition-
aaron-newton/

HTML5 Programming with JavaScript For Dummies 1st Edition


John Paul Mueller

https://ebookultra.com/download/html5-programming-with-javascript-for-
dummies-1st-edition-john-paul-mueller/

Professional XMPP Programming with JavaScript and jQuery


1st Edition Jack Moffitt

https://ebookultra.com/download/professional-xmpp-programming-with-
javascript-and-jquery-1st-edition-jack-moffitt/

JavaScript with Promises 1st Edition Daniel Parker

https://ebookultra.com/download/javascript-with-promises-1st-edition-
daniel-parker/
Eloquent JavaScript A Modern Introduction to Programming
1st Edition Marijn Haverbeke

https://ebookultra.com/download/eloquent-javascript-a-modern-
introduction-to-programming-1st-edition-marijn-haverbeke/

Professional JavaScript Frameworks Prototype YUI ExtJS


Dojo and MooTools Wrox Programmer to Programmer 1st
Edition Leslie M. Orchard
https://ebookultra.com/download/professional-javascript-frameworks-
prototype-yui-extjs-dojo-and-mootools-wrox-programmer-to-
programmer-1st-edition-leslie-m-orchard/

Learn JavaScript and Ajax with w3Schools 1st Edition


W3Schools

https://ebookultra.com/download/learn-javascript-and-ajax-
with-w3schools-1st-edition-w3schools/

Eloquent JavaScript A Modern Introduction to Programming


2nd Edition Marijn Haverbeke

https://ebookultra.com/download/eloquent-javascript-a-modern-
introduction-to-programming-2nd-edition-marijn-haverbeke/

Learning JavaScript Data Structures and Algorithms 2nd


Edition Loiane Groner

https://ebookultra.com/download/learning-javascript-data-structures-
and-algorithms-2nd-edition-loiane-groner/
Pro JavaScript with MooTools Learning Advanced
JavaScript Programming 1st Edition Mark Joseph
Obcena (Auth.) Digital Instant Download
Author(s): Mark Joseph Obcena (auth.)
ISBN(s): 9781430230557, 143023055X
Edition: 1
File Details: PDF, 3.97 MB
Year: 2010
Language: english
Pro JavaScript with
MooTools
Learning Advanced
JavaScript Programming

■■■

Mark Joseph Obcena

i
Pro JavaScript with MooTools: Learning Advanced JavaScript Programming
Copyright © 2010 by Mark Joseph A. Obcena
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN 978-1-4302-3054-0
ISBN 978-1-4302-3055-7 (eBook)
Printed and bound in the United States of America (POD)
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol
with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only
in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of
the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are
not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject
to proprietary rights.
President and Publisher: Paul Manning
Lead Editors: Frank Pohlmann and Ben Renow-Clarke
Technical Reviewer: Simo Kinnunen
Editorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan Gennick,
Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes, Jeffrey Pepper, Frank
Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh
Coordinating Editor: Mary Tobin
Copy Editor: Sharon Terdeman
Compositor: MacPS, LLC
Indexer: Julie Grady
Artist: April Milne
Cover Designer: Anna Ishchenko
Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233 Spring
Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail
[email protected], or visit www.springeronline.com.
For information on translations, please e-mail [email protected], or visit www.apress.com.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use.
eBook versions and licenses are also available for most titles. For more information, reference our
Special Bulk Sales–eBook Licensing web page at www.apress.com/info/bulksales.
The information in this book is distributed on an “as is” basis, without warranty. Although every
precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have
any liability to any person or entity with respect to any loss or damage caused or alleged to be caused
directly or indirectly by the information contained in this work.
The source code for this book is available to readers at www.apress.com.

ii
To the one who owns my heart.

iii
Contents at a Glance

■Contents ................................................................................................................ v
■Foreword ............................................................................................................ xiv
■About the Author ................................................................................................. xv
■About the Technical Reviewer............................................................................ xvi
■Acknowledgments............................................................................................. xvii
■Preface ............................................................................................................. xviii
Part I: Exploring JavaScript and MooTools .............................................................. 1
■Chapter 1: JavaScript and MooTools .................................................................... 3
■Chapter 2: Functions ........................................................................................... 11
■Chapter 3: Objects ............................................................................................... 47
■Chapter 4: Classes............................................................................................... 71
■Chapter 5: Classes: The Extras ............................................................................ 99
■Chapter 6: Types ............................................................................................... 127
Part II: Conquering the Client Side ....................................................................... 171
■Chapter 7: JavaScript in a Window ................................................................... 173
■Chapter 8: Elements .......................................................................................... 187
■Chapter 9: Selector Engines .............................................................................. 245
■Chapter 10: Events ............................................................................................ 261
■Chapter 11: Request .......................................................................................... 307
■Chapter 12: Animation ...................................................................................... 339
Part III: Breaking from the Browser ..................................................................... 359
■Chapter 13: JavaScript without Limits.............................................................. 361
■Chapter 14: MooTools on Deck.......................................................................... 371
■Appendix: Resources......................................................................................... 387
■Index ................................................................................................................. 389

iv
Contents

■Contents at a Glance ............................................................................................ iv


■Foreword ............................................................................................................ xiv
■About the Author ................................................................................................. xv
■About the Technical Reviewer............................................................................ xvi
■Acknowledgments............................................................................................. xvii
■Preface ............................................................................................................. xviii

Part I: Exploring JavaScript and MooTools .............................................................. 1


■Chapter 1: JavaScript and MooTools .................................................................... 3
JavaScript ....................................................................................................................... 3
MooTools......................................................................................................................... 4
The Language Extension ................................................................................................. 5
Your Toolkit ..................................................................................................................... 5
JavaScript Interpreter ............................................................................................................................ 6
JavaScript Console ................................................................................................................................ 6
MooTools Core and the Snippet Runner................................................................................................. 8
Code Editor and JSLint ........................................................................................................................... 9
The Wrap Up ................................................................................................................. 10
■Chapter 2: Functions ........................................................................................... 11
The Function ................................................................................................................. 11
One Function, Multiple Forms ....................................................................................... 12
Function Declaration ............................................................................................................................ 12
Function Expression ............................................................................................................................. 14
Named Function Expression ................................................................................................................ 15

v
■ CONTENTS

Single-Execution Function ............................................................................................ 17


Function Object .................................................................................................................................... 19
Arguments .................................................................................................................... 20
Return Values ................................................................................................................ 24
Function Internals ......................................................................................................... 25
Executable Code and Execution Contexts ............................................................................................ 25
Variables and Variable Instantiation..................................................................................................... 27
Scoping and the Scope Chain .............................................................................................................. 29
Closures ............................................................................................................................................... 31
The “this” Keyword .............................................................................................................................. 33
Advanced Function Techniques .................................................................................... 36
Limiting Scope ..................................................................................................................................... 36
Currying ............................................................................................................................................... 38
Decoration ............................................................................................................................................ 39
Combination ......................................................................................................................................... 41
MooTools and Functions ............................................................................................... 42
Function Binding .................................................................................................................................. 43
Extending Functions with Methods ...................................................................................................... 44
The Wrap Up ................................................................................................................. 46
■Chapter 3: Objects ............................................................................................... 47
JavaScript is Prototypal(-ish) ........................................................................................ 47
A Language of Objects .................................................................................................. 48
The Building Blocks of Objects ..................................................................................... 50
Constructor Functions .......................................................................................................................... 50
Prototypes ............................................................................................................................................ 53
Inheritance .................................................................................................................... 56
The Prototype Chain ...................................................................................................... 61
Deliberate Chains ................................................................................................................................. 63
Simplified Prototypal Programming .............................................................................. 65

vi
■ CONTENTS

The Wrap Up ................................................................................................................. 68


■Chapter 4: Classes............................................................................................... 71
From Prototypes to Classes .......................................................................................... 71
The MooTools Class System ......................................................................................... 73
Constructors and Initializers ......................................................................................... 75
Rethinking Members ..................................................................................................... 77
Rethinking Methods ............................................................................................................................. 78
Rethinking Properties........................................................................................................................... 80
Inheritance .................................................................................................................... 83
Overridden Methods ............................................................................................................................. 86
Inside this.parent() ............................................................................................................................... 90
Mixins............................................................................................................................ 91
The Wrap Up ................................................................................................................. 96
■Chapter 5: Classes: The Extras ............................................................................ 99
Mutators ........................................................................................................................ 99
Implementing Your Own Mutators ..................................................................................................... 101
Mutator Gotchas ................................................................................................................................. 104
The Built-in Mixins ...................................................................................................... 106
The Chain Mixin ................................................................................................................................. 106
The Events Mixin ................................................................................................................................ 109
The Options Mixin .............................................................................................................................. 112
Static Members ........................................................................................................... 114
Encapsulation and Visibility ........................................................................................ 118
Private Methods ................................................................................................................................. 120
Protected Methods ............................................................................................................................. 121
MooTools and Classes ................................................................................................ 125
The Wrap-Up ............................................................................................................... 126
■Chapter 6: Types ............................................................................................... 127
Values and Type Systems ........................................................................................... 127

vii
■ CONTENTS

An Alternative Type System ........................................................................................ 129


Native Types and Values ............................................................................................. 131
Null and Undefined ............................................................................................................................. 131
Primitive Types .................................................................................................................................. 132
Composite Types ................................................................................................................................ 135
Type Casting ............................................................................................................... 143
Casting Using Constructors ................................................................................................................ 144
Casting Using Native Functions and Idioms ....................................................................................... 145
The MooTools Type System ........................................................................................ 147
The Type Constructor and Function Subclassing ............................................................................... 147
Instance Checking .............................................................................................................................. 148
Type Detection ................................................................................................................................... 151
Working with Type Objects ......................................................................................... 152
Implementing New Members ............................................................................................................. 153
Aliases and Mirroring ......................................................................................................................... 155
The extend Method and Generics ...................................................................................................... 158
Creating New Types .................................................................................................... 160
A Table Type ...................................................................................................................................... 160
The Table Constructor ........................................................................................................................ 162
Setter, Getter, and Removal ............................................................................................................... 163
Membership Methods ........................................................................................................................ 164
Keys, Values and Traversals .............................................................................................................. 165
Our Final Type .................................................................................................................................... 167
The Wrap-Up ............................................................................................................... 168
Part II: Conquering the Client Side ....................................................................... 171
■Chapter 7: JavaScript in a Window ................................................................... 173
A Language for Every Computer ................................................................................. 173
Life Cycle of a Page .................................................................................................... 174
Pause, Script ............................................................................................................... 175

viii
■ CONTENTS

The Scripted Browser ................................................................................................. 176


The Document Object Model .............................................................................................................. 177
The Browser Object Model ................................................................................................................. 178
Frameworks, Libraries, and Toolkits........................................................................... 182
MooTools and the Browser ......................................................................................... 183
Fixing Browsers with MooTools ......................................................................................................... 183
Browser Detection ............................................................................................................................. 185
Feature Detection ............................................................................................................................... 185
The Wrap-Up ............................................................................................................... 186
■Chapter 8: Elements .......................................................................................... 187
Families and Trees ...................................................................................................... 187
Is My DOM Ready Yet? ................................................................................................ 191
DOM Scripting with MooTools ..................................................................................... 198
Selecting Elements ............................................................................................................................ 198
An Elemental Segue ........................................................................................................................... 215
Moving Elements Around ................................................................................................................... 218
Modifying Element Objects ................................................................................................................ 227
Creating Elements .............................................................................................................................. 231
Destroying Elements .......................................................................................................................... 235
The Element Type ....................................................................................................... 235
Revisiting document.id ...................................................................................................................... 236
Extending Element ............................................................................................................................. 238
The Elements Type...................................................................................................... 239
The Universal Modificators ......................................................................................... 239
Element Storage ......................................................................................................... 241
The Wrap Up ............................................................................................................... 242
■Chapter 9: Selector Engines .............................................................................. 245
What Node?................................................................................................................. 245
Selecting in Style ........................................................................................................ 248

ix
■ CONTENTS

Selector Engines ................................................................................................................................ 249


A Whirlwind Tour of CSS Selector Notation ....................................................................................... 249
Slick: the MooTools Selector Engine........................................................................... 252
Selecting Elements with Slick............................................................................................................ 252
Combinator Prefixes ........................................................................................................................... 253
Reverse Combinators ......................................................................................................................... 254
Pseudo-Selector Functions ................................................................................................................ 255
Inside Slick.................................................................................................................. 256
The Slick Parser Engine ..................................................................................................................... 256
The Slick Selection Engine ................................................................................................................. 258
The Wrap-Up ............................................................................................................... 259
■Chapter 10: Events ............................................................................................ 261
A Loopy World ............................................................................................................. 261
The Event Loop ........................................................................................................... 263
Event-Based Programming ......................................................................................... 264
The Event Models........................................................................................................ 265
The Internet Explorer Model ............................................................................................................... 265
The DOM Level 2 Model ..................................................................................................................... 273
The MooTools Event System ....................................................................................... 288
Attaching Event Handlers ................................................................................................................... 288
Preventing Default Action .................................................................................................................. 291
Stopping Event Propagation ............................................................................................................... 292
Stopping Events All Together ............................................................................................................. 293
Detaching Event Handlers .................................................................................................................. 294
Dispatching Events ............................................................................................................................ 295
Event System Internals ............................................................................................... 296
The Event Type ................................................................................................................................... 296
Two Layers ......................................................................................................................................... 299
The Event Table.................................................................................................................................. 299
Event Handler Wrapping .................................................................................................................... 300

x
■ CONTENTS

Event Handler Detachment and Dispatch .......................................................................................... 304


Custom Events ................................................................................................................................... 305
The Wrap-Up ............................................................................................................... 306
■Chapter 11: Request .......................................................................................... 307
Requests and Responses ............................................................................................ 307
The XMLHttpRequest Object ....................................................................................... 309
Going Async ................................................................................................................ 314
The MooTools Request Class ...................................................................................... 319
Creating New Requests...................................................................................................................... 320
Adding Request Headers .................................................................................................................... 321
Sending Data ...................................................................................................................................... 322
Attaching Event Handlers ................................................................................................................... 323
Timeouts ............................................................................................................................................ 328
Event Handler Declarations ................................................................................................................ 330
Sending the Request .......................................................................................................................... 331
Request Sending Modes .................................................................................................................... 332
Our Final Code .................................................................................................................................... 333
Subclassing Request................................................................................................... 335
Request Internals ............................................................................................................................... 335
Success Overriding ............................................................................................................................ 336
The Wrap-Up ............................................................................................................... 337
■Chapter 12: Animation ...................................................................................... 339
Getting Animated ........................................................................................................ 339
Being Stylish ............................................................................................................... 340
CSS Styles .......................................................................................................................................... 341
Explicit, Implicit, and Computed ........................................................................................................ 342
Revisiting Style Methods.................................................................................................................... 342
Time for Some Action.................................................................................................. 343
Timers ................................................................................................................................................ 343

xi
■ CONTENTS

Timer Execution ................................................................................................................................. 345


A Basic JavaScript Animation ..................................................................................... 346
MooTools Fx Classes................................................................................................... 349
Animation Objects .............................................................................................................................. 349
Tween and Morph .............................................................................................................................. 351
Fx Methods and Events ...................................................................................................................... 353
Fx Internals ................................................................................................................. 354
The Fx Base Class .............................................................................................................................. 354
CSS Animation ................................................................................................................................... 356
The Wrap-Up ............................................................................................................... 357
Part III: Breaking from the Browser ..................................................................... 359
■Chapter 13: JavaScript without Limits.............................................................. 361
Breaking out of the Browser ....................................................................................... 361
CommonJS .................................................................................................................. 362
Common Modules ....................................................................................................... 363
Export and Require............................................................................................................................. 363
Module Paths ..................................................................................................................................... 365
MooTools and CommonJS .......................................................................................... 367
Meso: MooTools in the Middle .................................................................................... 368
The Wrap-Up ............................................................................................................... 369
■Chapter 14: MooTools on Deck.......................................................................... 371
Revisiting Request and Response ............................................................................... 371
JavaScript on the Server............................................................................................. 373
JSGI ............................................................................................................................. 373
JSGI and CommonJS Engines ............................................................................................................ 376
A Common Deck ................................................................................................................................. 379
Enter Deck .................................................................................................................. 379
Getting Decked ................................................................................................................................... 380
Routing ............................................................................................................................................... 381

xii
■ CONTENTS

Middleware using Modules ................................................................................................................ 382


Deck Internals ............................................................................................................. 384
Request and Response ...................................................................................................................... 384
The Filtered Model ............................................................................................................................. 384
Dispatching ........................................................................................................................................ 385
The Router.......................................................................................................................................... 385
The Wrap-Up ............................................................................................................... 385
The Wrap-Up to Conquer All Wrap-Ups ....................................................................... 386
■Appendix: Resources ......................................................................................... 387
JavaScript ................................................................................................................... 387
MooTools..................................................................................................................... 387
■Index ................................................................................................................. 389


xiii
■ CONTENTS

Foreword

I began working on MooTools in 2005, and, after a year of development, I released the very first version
to the public. MooTools slowly gained popularity, ascending to its current position as one of the top
JavaScript frameworks.
MooTools, however, has a rather steep learning curve and a very big codebase. It was never written
with absolute beginners in mind, so users are often intimidated about trying to learn it. This is
unfortunate; they’re missing out on the great power and customizability MooTools offers, simply
because it looks scary.
It is not all MooTools’ fault, of course. There’s a distinct lack of useful information available on the
subject, though I must admit that MooTools itself hasn’t done enough to correct the situation. People
who want to learn the framework are left to their own devices—and that can get really at times.
Fortunately, that’s where this book comes in. Pro JavaScript with MooTools will take you on a journey
from the building blocks of JavaScript, through the prototypal concepts, to the very inner workings of
MooTools. By the time you’re finished reading it, MooTools will hold no more secrets from you.
When I think about the best MooTools articles I have ever read on the Web, Mark’s blog, Keetology,
comes immediately to mind. Mark has been writing awesome JavaScript and MooTools material for
years, in articles (like his “Up the Moo herd” series) and in actual code (Raccoon!). His blog is a must-
read for anyone wanting to learn or expand his knowledge of MooTools, or JavaScript in general.
Pro JavaScript with MooTools isn’t simply a well-written technical book. This book thoroughly
explains how object-oriented programming works in JavaScript, and then gradually takes advantage of
your newly acquired knowledge to explain how MooTools operates, and how you can build awesome
stuff with it.
And awesome stuff is what we want you to build! MooTools is no longer an obscure framework that
sprang from a simple effects library. It’s now a full-fledged development tool with a great set of core
developers, an active and growing community, and a huge roll of user-developed applications and extensions.
But development doesn’t end with the recent successes. While this book is about MooTools 1.3, the
most recent release, it is also a preparation of sorts for version 2.0. MooTools 1.3 reflects the direction
we’re heading in the future—toward a better, faster, and more powerful MooTools. We’re working to
make the strong parts of the framework even stronger, and we’re going to improve the parts that need
improvement.
However, we want you to share in these exciting developments, and the first step toward that is
learning more about MooTools. You don’t need to be an expert to learn MooTools, as this book will show
you. All you need is a little patience, creativity—and a whole lot of milk.
Back in 2005, MooTools was just a small framework I created for fun and experimentation. It never
occurred to me that it would eventually become the subject of a book, a book whose range, I must say, is
as impressive as its depth. It makes me proud of what MooTools has achieved.
Things are just gonna get more awesome from here…
Valerio Proietti
MooTools Founder and Lead-Developer

xiv
About the Author

■ Mark Joseph Obcena is a freelance software developer, graphic designer, and writer
from Manila, Philippines. Popularly known as keeto online, Mark is a big fan of open
source development and regularly contributes to several open source projects,
including MooTools where he’s a member of the official Community Team. He’s
currently experimenting with new programming languages while working on several
CommonJS projects, which are available from his Github page, and he sometimes
gets bullied by the MooTools community into writing a post for his web site, Keetology
(http://keetology.com).
Mark also owns a cat named Shröddy, who may or may not exist.

xv
■ CONTENTS

About the Technical Reviewer

■ Simo Kinnunen, originally from Helsinki, lives in Tokyo, where he combines the study of the Japanese
language with being a web expert and JavaScript hacker. He is also a Zend engineer, and he spent quite a
large part of this spare time building a rather complicated web text replacement hack called cufón.

xvi
Acknowledgments

I’ve often thought of myself as a one-man show: Mark, the Developer for Every Occasion™. This book,
however, is not mine alone. A lot of people have contributed in one way or another to make this book
possible, and I’d like to take a piece of it to thank them.
First, I want to give a big thank-you to Valerio Proietti, MooTools Founder and Lead Developer, who
has not only given his time to read early drafts of the work, but has also graced this book with a foreword.
You, sir, are truly awesome.
I’d also like to thank the MooTools team—the builders, the contributors, and the creators—who
have tirelessly given their love to the framework. This book would literally not have been possible if not
for the great work that you’ve put into MooTools. Special thanks to Christoph, Djamil, William, David,
and Thomas, who have given their input, pings, and thumbs-up for the book.
A thank-you also goes out to the members of the MooTools community, especially the regulars of
the #mootools IRC channel. Your constant need for updates about the book and unending
encouragement drove me to make this work worthy of the highlights. Thanks and []/ are also due to the
regulars of the “other” mootools IRC channel: Jabis, Michael, Graham, and Rud. You guys are all
awesome.
Of course, I won’t forget to thank Simo, my dear technical reviewer, who has given his time and
effort in reviewing the drafts of this work. Thank you for putting up with my dangling semicolons.
Chocolates and thank-yous are sent to Tokyo for you.
Another round of cheers and claps are also given to the people at Apress who believed enough in
this work to put their time into it. To Frank, thank you for giving me the chance to broadcast my ideas to
the world, and thank you for believing that I could pull off this work. To Mary and Ben, thank you for
putting up with my haphazard writing styles and weird submission schedule. And to Sharon, thank you
for adding more awesome to my writing.
Of course, I’d also like to give thanks and hugs to my family. To my mom and dad who have always
believed in me in their own quirky way, to my siblings Christine and Jan Raleigh who are now learning
the value of being connected, and to my aunt and uncle who have stood by me like a second set of
parents, thank you.
Finally, I’d like to give the biggest thanks to three people by dedicating parts of the book to them.
Part I is dedicated to my friend Garrick Cheung. Without you, this book would have never been
started. Thank you for the input, the critiques and the ideas. You are a great man, an awesome person,
and a very good friend. To Happiness.
Part II is dedicated to my very good friend Tim Wienk. Without you, this book would never have
been completed. Thank you for listening to my rants, thank you for keeping me company, thank you for
keeping me sane, and thank you for being a good friend. To Friendship.
And Part III is dedicated to P.E.M. Without you, I would have never gotten the courage to find
happiness. Thank you for showing me what’s wrong, what’s changing, and what’s possible. I’ll always be
your Marquito. To Love.

xvii
■ CONTENTS

Preface

The universe, perhaps, is just a crazy runtime environment with sparse documentation and seemingly
random side effects, and life is nothing more than a program written in a language called “Universcript.”
I conclude that this might be the case because, when I decided to invoke my audition method in the fall
of 2008 to try out for the role of Moritz Stiefel in a local production of Spring Awakening, I never
expected that it would return a Book object.
Fortunately, not all things are that quirky. The universe might think that it’s a great idea to take my
botched audition and turn it into a writing opportunity—an API decision I fully approve, by the way—but
most programming languages behave more predictably. Some languages behave predictably well, some
languages behave predictably well with some exceptions, and some languages behave predictably weird.
The fascinating thing, though, is that a language’s predictability often has less to do with the
language itself and more to do with its users. The more we learn about a programming language, the
more predictable it becomes. The key, then, isn’t coding blindly and whining (quite loudly for some)
about a language’s apparent shortcomings, but learning, experimenting, and applying. The quirks will
stay quirky, but at least now we can appreciate their quirkiness.
This book is about JavaScript as it relates to the MooTools framework. Like any other language,
JavaScript’s predictability has a lot to do with the people who code with it. While it is pretty predictable,
JavaScript does have some quirks and unique features that might not be apparent at base level.
Unfortunately, a lot of us who proudly proclaim to be JavaScript developers don’t take time to learn the
language enough to appreciate these quirks and features.
A big part of this problem, surprisingly, comes from the popularity of frameworks. JavaScript’s
almost prodigal-son-like comeback into the limelight of web development has brought forth a slew of
libraries and frameworks that promise an easier experience when working with the language. While
most of them do deliver on the promise, it comes with the cost of dependency: developers get so
comfortable with a framework that they forget there’s a powerful language underneath the abstraction.
This book tries to address this particular issue for the MooTools framework. MooTools is in the
unique position of being one of the more popular frameworks that extend and improve JavaScript rather
than bury it in the guise of an API. MooTools works with native JavaScript, uses native JavaScript, and
feels like native JavaScript. MooTools users, therefore, are exposed to the power of JavaScript at every
level—all they have to do is look at it.
If you’re looking for a recipe book, a how-to book, or a book of source code that you can copy and
paste into your next application, I’m afraid this is not that book. This book is all about exploring
JavaScript and looking at how JavaScript is used for the internals of the MooTools framework. This book
will show you how the features of JavaScript are used inside the framework, and how they come together
to create the very powerful set of APIs we know as MooTools.
In essence, this book is an extension and expansion of the Up the MooTools Herd series I previously
wrote for my blog. As with that series, this book is not aimed at beginners, but at intermediate and
advanced users. So, if you’re new to MooTools or JavaScript, I suggest you put this book on your to-read
list and grab a beginner’s book first.
This book is divided into three parts. The first part is all about JavaScript as ECMAScript, and
focuses on the native features of the language—functions, objects, and types—and the subsystems

xviii
■ PREFACE

inside MooTools that work with these parts. The second part of the book focuses on JavaScript in the
browser and explores subjects such as elements, events, and animation. Finally, the last part of this book
is a short exploration of JavaScript outside the browser and gives an introduction to CommonJS and
MooTools using Deck.
As you’ll learn in the next chapter, MooTools is divided into two main projects: MooTools Core and
MooTools More. In writing this book, I’ve decided to focus solely on MooTools Core, so there’s no
mention of any of the features or extensions found in MooTools More. Also, I’ve limited myself to
MooTools version 1.3 for this book, so any features from or incompatibilities with previous versions are
not mentioned.
And with those words out of the way, it’s time for us to start our exploration. It’s best that we begin
with the opening credits and get to know our dramatis personae. So if you’re ready, let’s meet the cast:
JavaScript and MooTools.

xix
PART I

Exploring JavaScript and


MooTools
Other documents randomly have
different content
“I can not forbear to say, I would have my gentleman learn a
trade, a manual trade; nay, two or three, but one more
particularly.”[137]
Rousseau will say the same: “Recollect that it is not talent that I
require of you; it is a trade, a real trade, a purely mechanical art, in
which the hands work more than the head.”
But Locke, in having his gentleman learn carpentry or agriculture,
especially designed that this physical labor should lend the mind a
diversion, an occasion for relaxation and repose, and secure to the
body a useful exercise. Rousseau is influenced by totally different
ideas. What he wants is, first, that through an apprenticeship to a
trade, Émile may protect himself against need in case a
revolutionary crisis should deprive him of his wealth. In the second
place, Rousseau obeys his social, we might even say his socialistic,
preoccupations. Work, in his view, is a strict duty, from which no one
can exempt himself. “Rich or poor, every idle citizen is a knave.”

221. Working Schools.—Although Locke is almost exclusively


preoccupied with classical studies and with a gentleman’s education,
nevertheless he has not remained completely a stranger to questions
of primary instruction. In 1697 he addressed to the English
government a remarkable document on the importance of organizing
“working schools” for the children of the poor. All children over three
and under fourteen years of age are to be collected in homes where
they will find labor and food. In this way Locke thought to contend
against immorality and pauperism. He would find a remedy for the
idleness and vagabondage of the child, and lighten the care of the
mother who is absorbed in her work. He would also, through habits
of order and discipline, train up steady men and industrious
workmen. In other terms, he attempted a work of social
regeneration, and the tutor of gentlemen became the educator of
the poor.

222. Locke and Rousseau.—In the Émile we shall frequently find


passages inspired by him whom Rousseau calls “the wise Locke.”
Perhaps we shall admire even more the practical qualities and the
good sense of the English educator when we shall have become
acquainted with the chimeras of his French imitator. In the case of
Locke, we have to do, not with an author who wishes to shine, but
with a man of sense and judgment who expresses his opinions, and
who has no other pretense than to understand himself and to be
comprehended by others. To appreciate the Thoughts at their full
value, they should not be read till after having re-read the Émile,
which is so much indebted to them. On coming from the reading of
Rousseau, after the brilliant glare and almost the giddiness
occasioned his reader by a writer of genius whose imagination is
ever on the wing, whose passion urges him on, and who mingles
with so many exalted truths, hasty paradoxes, and noisy
declamations, it is like repose and a delicious unbending to the spirit
to go to the study of Locke, and to find a train of thought always
equable, a style simple and dispassionate, an author always master
of himself, always correct, notwithstanding some errors, and a book,
finally, filled, not with flashes and smoke, but with a light that is
agreeable and pure.

[223. Analytical Summary.—1. This study illustrates the fact


that the aims and methods of education are determined by the
types of thought, philosophical, political, religious, scientific,
and social, that happen to be in the ascendent; and also the
tendency of the human mind to adopt extreme views.
2. The subjective tendency of human thought is typified by
the Socratic philosophy, and the objective tendency by the
Baconian philosophy; and from these two main sources have
issued two distinctive schools of educators, the formalists and
the realists, the first holding that the main purpose of
education is discipline, training, or formation, and the other,
that this purpose is furnishing instruction or information. This
line is distinctly drawn in the seventeenth century, and the two
schools are typified by Malebranche and Locke.
3. The spirit of reaction is exhibited in the opposition to
classical studies, in the effort to convert study into a diversion,
in the use of milder means of discipline, and in the importance
attached to useful studies. In these particulars the reaction of
the sixteenth century is intensified.]
F O OT N OT E S :
[128] Rollin, Traité des études, Tome IV. p. 335.
[129] I am in doubt whether M. Compayré intends to sanction
this doctrine or not. This is an anticipation of one of Jacotot’s
paradoxes: “All human beings are equally capable of learning.”
The verdict of actual teachers is undoubtedly to the effect that
there are manifold differences in the ability of pupils to know,
comprehend, and judge. (P.)
[130] Is not the antagonism pointed out by Malebranche more
serious than M. Compayré seems to think? If the current of
mental activity sets strongly towards the feelings, emotions, or
senses, it is thereby diverted from the purely intellectual
processes, such as reflection and judgment. The mind of the
savage is an example of what comes from “following the order of
nature” in an extreme training of the senses. On the nature and
extent of this antagonism, the following authorities may be
consulted: Hamilton, Metaphysics, p. 336; Mansel, Metaphysics,
pp. 68, 70, 77; Bain, The Senses and the Intellect, pp. 392-394;
Bain, Education as a Science, pp. 17, 29, 37; Spencer, Principles
of Psychology, pp. 98-99. (P.)
[131] John Locke. His Life and his Work. Paris, 1878.
[132] Thoughts, translation by G. Compayré, p. 57.
[133] Demogeot et Montucci, de l’Enseignement secondaire en
Angleterre, p. 41.
[134] On the question of corporal punishment in school, is not M.
Compayré too absolute in his assumptions? On what principle
does he base his absolute condemnation of the rod? What is to
be done in those cases of revolt against order and decency that
occur from time to time in most schools? There is no doubt that
the very best teachers can govern without resorting to this
hateful expedient; but what shall be done in extreme cases by
the multitude who are not, and never can be, teachers of this
ideal type? Nor does this question stand alone. Below, it is related
to family discipline; and above, to civil administration. If corporal
punishment is interdicted in the school, should it not be
interdicted in the State? (P.)
[135] It is usually said that a pupil’s distaste for a study indicates
one of two things, either the mode of presenting the subject is
bad, or it is presented at an unseasonable period of mental
development; but this distaste is quite as likely to be due to the
fact that a certain mode of mental activity has not yet been
established; for until fairly established, its exercise cannot be
pleasurable. The assumption that intellectual appetites already
exist and are waiting to be gratified, or that they will invariably
appear at certain periods of mental development, is by no means
a general law of the mental life. In many cases, these appetites
must be created, and it may often be that the studies employed
for this purpose may not at first be relished. And there are cases
where, under the best of skill, this relish may never come; and
still, the knowledge or the discipline is so necessary that the
studies may be enforced contrary to the pupil’s pleasure. (P.)
[136] Thoughts, edited by R. H. Quick (Cambridge, 1880), pp.
153-4.
[137] Thoughts, p. 177.
CHAPTER X.

T H E E D U C AT I O N O F W O M E N I N T H E S E V E N T E E N T H
C E N T U R Y.— J A C Q U E L I N E P A S C A L A N D M A D A M E D E
MAINTENON.

THE EDUCATION OF WOMEN IN THE SEVENTEENTH CENTURY; MADAME DE SÉVIGNÉ; THE ABBÉ FLEURY;
EDUCATION IN CONVENTS; PORT ROYAL AND THE REGULATIONS OF JACQUELINE PASCAL; GENERAL
IMPRESSION; SEVERITY AND AFFECTION; GENERAL CHARACTER OF SAINT CYR; TWO PERIODS IN
THE INSTITUTION OF SAINT CYR; DRAMATIC REPRESENTATIONS; THE REFORM OF 1692; THE PART
PLAYED BY MADAME DE MAINTENON; HER PEDAGOGICAL WRITINGS; INTERIOR ORGANIZATION OF
SAINT CYR; DISTRUST OF READING; THE STUDY OF HISTORY NEGLECTED; INSTRUCTION
INSUFFICIENT; MANUAL LABOR; MORAL EDUCATION; DISCREET DEVOTION; SIMPLICITY IN ALL
THINGS; FÉNELON AND SAINT CYR; GENERAL JUDGMENT; ANALYTICAL SUMMARY.

224. The Education of Women in the Seventeenth Century.—The


Education of Girls of Fénelon has shown us how far the spirit of the
seventeenth century was able to go in what concerns the education
of women, as exhibited in the most liberal theories on the subject;
but in practice, save in brilliant exceptions, even the modest and
imperfect ideal of Fénelon was far from being attained.
Chrysale was not alone of this opinion, when he said in the
Learned Ladies:—
“It is not very proper, and for several reasons, that a woman
should study and know so many things. To train the minds of her
children in good morals and manners, to superintend her household,
by keeping an eye on her servants, and to control the expenditures
with economy, ought to be her study and philosophy.”[138] It is true
that Molière himself did not sympathize with the prejudices whose
expression he put in the mouth of his comic character, and that he
concludes that a woman “may be enlightened on every subject” (“Je
consens qu’une femme ait des clartés de tout”). But in real fact and
in practice, it is the opinion of Chrysale that prevailed. Even in the
higher classes, woman held herself aloof from instruction, and from
things intellectual. Madame Racine had never seen played, and had
probably never read, the tragedies of her husband.

225. Madame de Sévigné.—However, the seventeenth century was


not wanting in women of talent or genius, who might have made an
eloquent plea in behalf of their sex; but they were content to give
personal examples of a high order, without any anxiety to be
imitated. Madame de Lafayette made beautiful translations from
Latin; Madame Dacier was a humanist of the first order; and
Madame de Sévigné knew the modern languages as well as the
ancient. No one has better described the advantage of reading. She
recommends the reading of romances in the following terms:—
“I found that a young man became generous and brave in seeing
my heroes, and that a girl became genteel and wise in reading
Cleopatra. There are occasionally some who take things somewhat
amiss, but they would perhaps do scarcely any better if they could
not read.”[139]
Madame de Sévigné had her daughter read Descartes, and her
granddaughter Pauline, the tragedies of Corneille.
“For my part,” she said, “if I were to bring up my granddaughter, I
would have her read what is good, but not too simple. I would
reason with her.”[140]

226. The Abbé Fleury.—But Madame de Sévigné and Madame de


Grignan were but brilliant exceptions. If one were to doubt the
ignorance of the women of this period, it would suffice to read this
striking passage from the Abbé Fleury, the assistant of Fénelon in
the education of the Duke of Bourgogne:—
“This, doubtless, will be a great paradox, that women ought to
learn anything else than their catechism, sewing, and different little
pieces of work, singing, dancing, and dressing in the fashion, and to
make a fine courtesy. As things now go, this constitutes all their
education.”[141]
Fleury desires something else for woman. He demands that she
learn to write correctly in French, and that she study logic and
arithmetic. But we need not fear lest the liberalism of a thinker of
the seventeenth century carry him too far. Fleury admits, for
example, that history is absolutely useless to women.

227. Education in the Convents.—It is almost exclusively in convents


that young girls then received what passed for an education. The
religious congregations that devoted themselves to female education
were numberless; we note, for example, among the most
celebrated, the Ursulines, founded in 1537; the Association of the
Angelics, established in Italy in 1536; and the Order of Saint
Elizabeth. But, notwithstanding the diversity of names, all the
convents for girls resemble one another. In all of them woman was
educated for heaven, or for a life of devotion. Spiritual exercises
formed the only occupation of the pupils, and study was scarcely
taken into account.

228. Port Royal and the Regulations of Jacqueline Pascal.—The best


means of penetrating into the inner life of the convents of the
seventeenth century is to read the Regulations for Children, written
towards 1657 by Jacqueline Pascal, Sister Saint Euphemia. The
education of girls interested the Jansenists not less than the
education of men; but in this respect, Port Royal is far from
deserving the same encomiums in both cases.

229. General Impression.—There is nothing so sombre and sad as


the interior of their institution for girls, and nothing so austere as the
rules of Jacqueline Pascal.
“A strange emotion, even at the distance of centuries, is caused by
the sight of those children keeping silent or speaking in a whisper
from rising till retiring, never walking except between two nuns, one
in front and the other behind, in order to make it impossible, by
slackening their pace on the pretext of some indisposition, for them
to hold any communication; working in such a way as never to be in
companies of two or three; passing from meditation to prayer, and
from prayer to instruction; learning, besides the catechism, nothing
but reading and writing; and, on Sunday, ‘a little arithmetic, the
older from one to two o’clock, and the younger from two to half past
two’; the hands always busy to prevent the mind from wandering;
but without being able to become attached to their work, which
would please God as much the more as it pleased themselves the
less; opposing all their natural inclinations, and despising the
attentions due the body ‘destined to serve as food for worms’; doing
nothing, in a word, except in the spirit of mortification. Imagine
those days of fourteen and sixteen hours, slowly succeeding one
another, and weighing down on the heads of those poor little sisters,
for six or eight years in that dreary solitude, where there was
nothing to bring in the stir of life, save the sound of the bell
announcing a change of exercise or of penance, and you will
comprehend Fénelon’s feeling of sadness when he speaks of the
shadows of that deep cavern in which was imprisoned and, as it
were, buried the youth of girls.”[142]

230. Severity and Love.—The severity of the Regulations is such that


the editor, M. de Pontchartrain, also a Jansenist, allows that it will be
impossible to obtain from all children “so complete a silence and so
formal a life”; and requires that the mistresses shall try to gain their
affections. Love must be united with severity. Jacqueline Pascal does
not seem to be entirely of this opinion, since she declares that only
God must be loved. However, notwithstanding her habitual severity,
human tenderness sometimes asserts its rights in the rules which
she established. We feel that she loves more than she confesses,
those young girls whom she calls “little doves.” On the one hand, the
Regulations incite the pupils to eat of what is placed before them
indifferently, and to begin with what they like the least, through a
spirit of penitence; but, on the other hand, Jacqueline writes: “They
must be exhorted to take sufficient nourishment so as not to allow
themselves to become weakened, and this is why care is taken that
they have eaten enough.” And so there is a touching solicitude that
is almost maternal in this remark: “As soon as they have retired,
each particular bed must be visited, to see whether all proprieties
have been observed, and whether the children are well covered in
winter.” The mystic sister of the ascetic Pascal has moments of
tenderness. “Nevertheless, we must not cease to feel pity for them,
and to accommodate ourselves to them in every way that we can,
but without letting them know that we have thus condescended.”
However, the dominant conception ever reappearing, is the idea that
human nature is evil; that we have to do with rebellious spirits which
must be conquered, and that they deserve no commiseration.
There is a deal of anxiety to make study agreeable! Jacqueline
directs her pupils to work at the very things that are most repulsive,
because the work that will please God the most is that which will
please them the least. The exterior manifestations of friendship are
forbidden, and possibly friendship itself. “Our pupils shall shun every
sort of familiarity one towards another.”
Instruction is reduced to the catechism, to the application of the
Christian virtues, to reading, and to writing. Arithmetic is not taught
save on holidays. It seems that memory is the only faculty that
Jacqueline wishes to have developed. “This opens their minds, gives
them occupation, and keeps them from evil thoughts.” Have we not
reason to say that at Port Royal women have less value than men!
What a distance between the solid instruction of Lancelot’s and
Nicole’s pupils and the ignorance of Jacqueline Pascal’s! Even when
the men of Port Royal speak of the education of women, they have
more liberal ideas than those which are applied at their side. Nicole
declares that books are necessary even in convents for girls,
because it is necessary “to sustain prayer by reading.”
231. General Character of Saint Cyr.—In leaving Port Royal for Saint
Cyr, we seem, on coming out of a profound night, to perceive a ray
of light. Without doubt, Madame de Maintenon has not yet, as a
teacher, all that breadth of view that could be desired. Her work is
far from being faultless, but the founding of Saint Cyr (1686) was
none the less a considerable innovation. “Saint Cyr,” it has been said,
“is not a convent. It is a great establishment devoted to the lay
education of young women of noble birth; it is a bold and intelligent
secularization of the education of women.” There is some excess of
praise in this statement, and the lay character of Saint Cyr is very
questionable. Lavallée, an admirer, could write: “The instructions of
Madame de Maintenon are doubtless too religious, too monastic.”
Let us grant, however, that Madame de Maintenon, who, after
having founded Saint Cyr, was the director of it, extra muros, and
even taught there, at stated times, is personally the first lay teacher
of France. Let us grant, also, that at least in the beginning, and up
to 1692, the women entrusted with the work of instruction were not
nuns in the absolute sense of the term. They were not bound by
solemn and absolute vows.
But this character relatively laic, and this rupture with monastic
traditions, were not maintained during the whole life of the
institution.

232. Two Periods in the History of Saint Cyr.—Saint Cyr, in fact,


passed, within a few years, through two very different periods, and
Madame de Maintenon followed in succession two almost opposite
currents. For the first years, from 1686 to 1692, the spirit of the
institution is broad and liberal; the education is brilliant, perhaps too
much so; literary exercises and dramatic representations have an
honored place. Saint Cyr is an institution inclining to worldliness,
better fitted to train women of intellect than good economists and
housewives. Madame de Maintenon quickly saw that she had taken a
false route, and, from 1692, she reacted, not without excess, against
the tendencies which she had at first obeyed. She conceived an
extreme distrust of literary studies, and cut off all she could from the
instruction, in order to give her entire thought to the moral and
practical qualities of her pupils. Saint Cyr became a convent, with a
little more liberty, doubtless, than there was in the other monasteries
of the time, but it was a convent still.

233. Dramatic Representations.—It was the notorious success of the


performance of Andromaque and Esther that caused the overthrow
of the original intentions of Madame de Maintenon. Esther, in
particular, was the great event of the first years of Saint Cyr. Racine
distributed the parts; Boileau conducted the training in elocution;
and the entire Court, the king at the head, came to applaud and
entertain the pretty actresses, who left nothing undone to please
their spectators. Heads were a little turned by all this; dissipation
crept into the school. The pupils were no longer willing to sing in
church, for fear of spoiling their voices. Evidently the route was now
over a dangerous declivity. The institution had been turned from its
purpose. Matters were in a way to establish, under another form,
another Hôtel de Rambouillet.[143]

234. Reform of 1692.—At the first, as we have seen, the ladies of


Saint Louis, charged with the direction of Saint Cyr, did not found a
monastic order properly so-called; but, when Madame de Maintenon
resolved to reform the general spirit of the house, she thought it
necessary to transform Saint Cyr into a monastery, and she founded
the Order of Saint Augustine.
But what she changed in particular was the moral discipline, and
the programme of studies.
Madame de Maintenon has herself recited, in a memorable letter,
[144] the reasons of that reform which modified so profoundly the
character of Saint Cyr:—
“The sorrow I feel for the girls of Saint Cyr,” she said, “can be
cured only by time and by an entire change in the education that we
have given them up to this hour. It is very just that I should suffer
for this, since I have contributed to it more than any one else.... The
whole establishment has been the object of my pride, and the
ground for this feeling has been so real that it has gone to extremes
that I never intended. God knows that I wished to establish virtue at
Saint Cyr, but I have built upon the sand. Not having, what alone
can make a solid foundation, I wished the girls to be witty, high-
spirited, and trained to think; I have succeeded in this purpose. They
have wit, and they use it against us. They are high-spirited, and are
more heady and haughty than would be becoming in a royal
princess. Speaking after the manner of the world, we have trained
their reason, and have made them talkative, presumptuous,
inquisitive, bold ... witty,—such characters as even we who have
trained them cannot abide.... Let us seek a remedy, for we must not
be discouraged.... As many little things form pride, many little things
will destroy it. Our girls have been treated with too much
consideration, have been petted too much, treated too gently. We
must now leave them more to themselves in their class-rooms, make
them observe the daily regulations, and speak to them of scarcely
anything else.... Pray to God, and ask Him to change their hearts;
and that He may give to all of them humility. There should not be
much conversation with them on the subject. Everything at Saint Cyr
is made a matter of discourse. We often speak of simplicity, and try
to define it correctly ... and yet, in practice, the girls make merry in
saying: ‘Through simplicity I take the best place; through simplicity I
am going to commend myself.’ Our girls must be cured of that
jesting turn of mind which I have given them.... We have wished to
shun the pettiness of certain convents, and God has punished us for
this haughty spirit. There is no house in the world that has more
need of humility within and without than our own. Its situation near
the Court; the air of favor that pervades it; the favors of a great
king; the offices of a person of consideration,—all these snares, so
full of danger, should lead us to take measures directly contrary to
those we have really taken....”

235. The Part played by Madame de Maintenon.—Whatever may be the


opinion respecting the tone of the educational work at Saint Cyr,
there cannot be the least doubt as to the admirable zeal of Madame
de Maintenon, and her indefatigable devotion to the success of her
favorite undertaking. The vocation of the teacher was evidently hers.
For more than thirty years, from 1686 to 1717, she did not cease to
visit Saint Cyr every day, sometimes at six in the morning. She wrote
for the directresses and for the pupils counsels and regulations that
fill several volumes. Nothing which concerns “her children” is a
matter of indifference to her. She devotes her attention to their
meals, their sleep, their toilet, as well as to their character and their
instruction:—
“The affairs we discuss at Court are bagatelles; those at Saint Cyr
are the more important....” “May that establishment last as long as
France, and France as long as the world. Nothing is dearer to me
than my children of Saint Cyr.”
It is not tenderness, it is well known, that characterizes the soul of
Madame de Maintenon; but, at Saint Cyr, from being formal and
cold, which is her usual state, she becomes loving and tender:—
“Forget nothing that may save the souls of our young girls, that
may fortify their health and preserve their form.”
One day, as she had come to the school, as her custom was, to
consult with the nuns, a company of girls passed by raising a cloud
of dust. The nuns, fearing that Madame de Maintenon was annoyed
by it, requested them to withdraw. “Pray, let the dear girls be,”
replied Madame de Maintenon; “I love them even to the dust they
raise.” Conversely, as it were, the pupils of Pestalozzi, consulted on
the question of knowing whether they were willing always to be
beaten and clawed by their old master, replied affirmatively: they
loved him even to his claws!

236. Her Pedagogical Writings.—It is only in our day that the works
of Madame de Maintenon have been published in the integrity of
their text, thanks to the labors of Théophile Lavallée. For the most
part, these long and interesting letters are devoted to education and
to Saint Cyr. These are, first, the Letters and Conversations on the
Education of Girls.[145] These letters were written from day to day,
and are addressed, sometimes to the ladies of Saint Cyr, and
sometimes to the pupils themselves. “We find in them,” says
Lavallée, “for all circumstances and for all times, the most solid
teaching, masterpieces of good sense, of naturalness, and of truth,
and, finally, instructions relative to education that approach
perfection. The Conversations originated in the consultations that
Madame de Maintenon had during the recreations or the recitations,
either with the ladies or with the young women, who themselves
collected and edited the words of their governess.”
After the Letters and Conversations comes the Counsels to Young
Women who enter Society,[146] which contain general advice,
conversations or dialogues, and, finally, proverbs, that is, short
dramatic compositions, designed at once to instruct and amuse the
young ladies of Saint Cyr. These essays are not admirable in all
respects; most often they are lacking in imagination; and Madame
de Maintenon, though an imitation of Fénelon, makes a misuse of
indirect instruction, of artifice, and of amusement, in order to teach
some moral commonplaces by insinuation. Here are the titles of
some of these proverbs: The occasion makes the rogue; Women
make and unmake the home; There is no situation more
embarrassing than that of holding the handle of the frying-pan.
Finally, let us note the third collection, the Historical and
Instructive Letters addressed to the Ladies of Saint Cyr.[147]
It is to be regretted that, out of these numerous volumes, where
repetitions abound, there have not been extracted, in a methodical
manner, a few hundred pages which should contain the substance of
Madame de Maintenon’s thinking on educational questions.

237. Interior Organization.—The purpose of the founding of Saint


Cyr was to assure to the two hundred and fifty daughters of the
poor nobility, and to the children of officers dead or disabled, an
educational retreat where they would be suitably educated so as to
be prepared for becoming either nuns, if this was their vocation, or,
the more often, good mothers. As M. Gréard has justly observed,
“the very conception of an establishment of this kind, the idea of
making France pay the debt of France, educating the children of
those who had given her their blood, proceeds from a feeling up to
that time unknown.”[148]
Consequently, children of the tenderest years, from six or seven,
were received at Saint Cyr, there to be cared for till the age of
marriage, till eighteen and twenty.
The young girls were divided into four classes,—the reds, the
greens, the yellows, and the blues. The blues were the largest, and
they wore the royal colors. Each class was divided into five or six
bands or families, of eight or ten pupils each.
The ladies of Saint Cyr were ordinarily taken from the pupils of the
school. They were forty in number,—the superior, the assistant who
supplied the place of the superior, the mistress of the novices, the
general mistress of the classes, the mistresses of the classes, etc.
The capital defect of Saint Cyr is, that, as in the colleges of the
Jesuits, the residence is absolute and the sequestration complete.
From her fifth to her twentieth year the young girl belongs entirely
to Saint Cyr. She scarcely knows her parents. It will be said, perhaps,
that in many cases she has lost them, and that in some cases she
could expect only bad examples from them. But no matter; the
general rule, which interrupted family intercourse to the extent of
almost abolishing it, cannot obtain our approbation. The girl was
permitted to see her parents only three or four times a year, and
even then these interviews would last only for a half an hour each
time, and in the presence of a mistress. There was permission to
write family letters from time to time; but as though she mistrusted
the natural impulses of the heart, and the free outpouring of filial
affection, Madame de Maintenon had taken care to compose some
models of these letters. With more of reason than of feeling,
Madame de Maintenon is not exempt from a certain coldness of
heart. It seems that she would impose on her pupils the
extraordinary habits of her own family. She recollected having been
kissed only twice by her mother, on her forehead, and then only
after a long separation.

238. Distrust of Reading.—After the reforms of 1692, the


instruction at Saint Cyr became a matter of secondary importance.
Reading, writing, and counting were taught, but scarcely anything
besides. Reading, in general, was viewed with distrust: “Teach girls
to be very sparing as to reading, and always to prefer manual labor
instead.” Books of a secular nature were interdicted; only works of
piety were put in the hands of pupils, such as the Introduction to a
Devout Life, by Saint François de Salles, and the Confessions of Saint
Augustine. “Renounce intellectual culture” is the perpetual injunction
of Madame de Maintenon.
“We must educate citizens for citizenship. It is not the question of
giving them intellectual culture. We must preach family duties to
them, obedience to husband, and care for children.... Reading does
more harm than good to young girls.... Books make witlings and
excite an insatiable curiosity.”

239. The Study of History Neglected.—To judge of the spirit of Saint


Cyr, from the point of view of intellectual education, it suffices to
note the little importance that was there given to history. This went
so far as to raise the question whether it were not best to prohibit
the study of French history entirely. Madame de Maintenon consents
to have it taught, but only just enough so that “pupils may not
confuse the succession of our kings with the princes of other
countries, and not take a Roman emperor for an emperor of China
or Japan, a king of Spain or of England for a king of Persia or of
Siam.” As to the history of antiquity, it must be held in mistrust for
the very reason—who would believe it?—of the beautiful examples
of virtue that it contains. “I should fear that those grand examples of
generosity and heroism would give our young girls too much
elevation of spirit, and make them vain and pretentious.” Have we
not some right to feel surprised that Madame de Maintenon is
alarmed at the thought of raising the intelligence of woman? It is
true that she doubtless thought of the romantic exaggerations
produced by the reading of the Cyrus the Great and other writings of
Mlle. de Scudéry. Let us add, besides, to excuse the shortcomings of
the programme of Saint Cyr in the matter of history, that even for
boys in the colleges of the University, the order that introduced the
teaching of history into the classes dates only from 1695.

240. Insufficient Instruction.—“Our day,” says Lavallée, “would not


accept that education in which instruction properly so-called was but
a secondary matter, and entirely sacrificed to the manner of training
the heart, the reason, and the character; and an education, too,
that, as a whole and in its details, was wholly religious.” The error of
Madame de Maintenon consists essentially in the wish to develop the
moral virtues in souls scarcely instructed, scarcely enlightened.
There was much moral discoursing at Saint Cyr. If it did not always
bear fruit, it was because the seed fell into intelligences that were
but little cultivated.
“Our young women are not to be made scholarly. Women never
know except by halves, and the little that they know usually makes
them conceited, disdainful, chatty, and disgusted with serious
things.”

241. Manual Labor.—If intellectual education was neglected at Saint


Cyr, by way of compensation great attention was paid to manual
education. The girls were there taught to sew, to embroider, to knit,
and to make tapestry; and there was also made there all the linen
for the house, the infirmary, and the chapel, and the dresses and
clothing of the ladies and the pupils:—
“But no exquisite productions,” says Madame de Maintenon, “nor
of very elaborate design; none of those flimsy edgings in embroidery
or tapestry, which are of no use.”
With what good grace Madame de Maintenon ever preaches the
gospel of labor, of which she herself gave the example! In the
coaches of the king, she always had some work in hand. At Saint
Cyr, the young women swept the dormitories, put in order the
refectory, and dusted the class-rooms. “They must be put at every
kind of service, and made to work at what is burdensome, in order
to make them robust, healthy, and intelligent.”
“Manual labor is a moral safeguard, a protection against sin.”
“Work calms the passions, occupies the mind, and does not leave
it time to think of evil.”

242. Moral Education.—“The Institute,” said Madame de


Maintenon, “is intended, not for prayer, but for action.” What she
wished, above all else, was to prepare young women for home and
family life. She devoted her thought to the training of wives and
mothers. “What I lack most,” she said, “is sons-in-law!” Hence she
was incessantly preoccupied with moral qualities. One might make a
fine and valuable book of selections out of all the practical maxims of
Madame de Maintenon; as her reflections on talkativeness: “There is
always sin in a multitude of words;” on indolence: “What can be
done in the family of an indolent and fastidious woman?” on
politeness, “which consists, above all else, in giving one’s thought to
others;” on lack of energy, then too common among women of the
world: “The only concern is to eat and to take one’s ease. Women
spend the day in morning-gowns, reclining in easy-chairs, without
any occupation, and without conversation; all is well, provided one
be in a state of repose.”

243. Discreet Devotion.—We must not imagine that Saint Cyr was a
house of prayer, a place of overdone devotion. Madame de
Maintenon held to a reasonable Christianity. Piety, such as was
recommended at Saint Cyr, is a piety that is steadfast, judicious, and
simple; that is, conformed to the state in which one ought to live,
and exempt from refinements.
“The young women are too much at church, considering their
age,” she wrote to Madame de Brinon, the first director of the
institution.... “Consider, I pray you, that this is not to be a
cloister.”[149]
And later, after the reform had begun, this is what she wrote:—
“Let the piety with which our young girls shall be inspired be
cheerful, gentle, and free. Let it consist rather in the innocence of
their lives, and in the simplicity of their occupations, than in the
austerities, the retirements, and the refinements of devotion....
When a girl comes from a convent, saying that nothing ought to
interfere with vespers, she is laughed at; but when an educated
woman shall say that vespers may be omitted for the sake of
attending her sick husband, everybody will commend her.... When a
girl shall say that a woman does better to educate her children and
instruct her servants than to spend the forenoon in church, that
religion will be heartily accepted, and will make itself loved and
respected.”[150] Excellent advice, perhaps too little followed!
Madame de Maintenon here speaks the language of good sense, and
we are wholly surprised to hear it from the lips of a politic woman
who, not without reason, and for her part in the Revocation of the
Edict of Nantes, has the reputation of being an intolerant fanatic.

244. Simplicity in All Things.—The simplicity which she


recommended in religion, Madame de Maintenon demanded in
everything,—in dress and in language: “Young girls,” she says, “must
wear as few ribbons as possible.”
A class-teacher had given a fine lecture, in which she exhorted her
pupils to make an “eternal divorce” with sin. “Very well said,
doubtless,” remarked Madame de Maintenon; “but, pray, who among
our young ladies knows what divorce is?”

245. Fénelon and Saint Cyr.—Michelet, speaking of Saint Cyr, which


he does not love, said: “Its cold governess was much more a man
than Fénelon.” The fact is, that the author of the Education of Girls
gives a larger place to sensibility and intelligence. It is not Madame
de Maintenon who said: “As much as possible, tenderness of heart
must be excused in young girls.” It is not at Saint Cyr that these
maxims were practised. “Pray let them have Greek and Roman
histories. They will find in them prodigies of courage and
disinterestedness. Let them not be ignorant of the history of France,
which also has its beauty.... All this serves to give dignity to the
mind, and to lift the soul to noble sentiments.” Nevertheless,
Fénelon’s work was highly esteemed at Saint Cyr. It appeared in
1687, and Saint Cyr was founded in 1686. A great number of its
precepts were there observed, such as the following: “Frequent
leaves of absence should be avoided;” “Young girls should not be
accustomed to talk much.”

246. General Judgment.—In a word, if the ideal proposed to the


young women of Saint Cyr by Madame de Maintenon cannot satisfy
those who, in our day, conceive “an education broader in its scheme
and more liberal in its spirit,” at least we must do justice to an
institution which was, as its foundress said, “a kind of college,” a first
attempt at enfranchisement in the education of women. Without
demanding of Madame de Maintenon what was not in her age to
give, let us be inspired by her in what concerns the changeless
education in moral virtues, and in the qualities of discretion, reserve,
goodness, and submission. “However severe that education may
appear,” says Lavallée, “I believe it will suggest better reflections to
those who observe the way in which women are educated to-day,
and the results of that education in luxury and pleasure, not only on
the fireside, but still more on society and political life, and on the
future of the men that it is preparing for France. I believe they will
prefer that manly education, so to speak, which purified private
morals and begot public virtues; and that they will esteem and
regret that work of Madame de Maintenon, which for a century
prevented the corruption of the Court from extending to the
provinces, and maintained in the old country-seats, from which came
the greater part of the nobility, the substantial virtues and the simple
manners of the olden time.”

[247. Analytical Summary.—1. The education of women in the


seventeenth century reflects the sentiment of the age as to
their relative position in society, their rights, and their destiny.
Woman was still regarded as the inferior of man, in the lower
classes as a drudge, in the higher as an ornament; in her case,
intellectual culture was regarded as either useless or
dangerous; and the education that was given her was to fit her
for a life of devotion or a life of seclusion from society.
2. The rules of Jacqueline Pascal exhibit the effects of an
ascetic belief on education,—human nature is corrupt; all its
likes are to be thwarted, and all its dislikes fostered under
compulsion.
3. The education directed by Madame de Maintenon is the
beginning of a rupture with tradition. It was a movement
towards the secularization of woman’s education, and towards
the recognition of her equality with man, with respect to her
grade of intellectual endowments, her intellectual culture, and
to her participation in the duties of real life.
4. The type of the higher education was still monastic, both
for men and women. No one was able to conceive that both
sexes might be educated together with mutual advantage.]
F O OT N OT E S :
[138] Les Femmes Savantes, Act II. Scene VII., Van Laun’s
translation.
[139] Letter of Nov. 16, 1689.
[140] Letter of June 1, 1680.
[141] Traité du choix et de la méthode des études, Chap. XXXVIII.

[142] Gréard, Mémoire sur l’enseignement secondaire des filles,


p. 55.
[143] “The name generally given to a social circle, which for more
than half a century gathered around Catherine de Vivonne,
marquise de Rambouillet, and her daughter, Julie d’Angennes,
duchess de Montausier, and which exercised a very conspicuous
influence on French language, literature, and civilization.... Her
house soon became the place where all who had genius, wit,
learning, talent, or taste, assembled, and from these reunions
originated the French Academy, the highest authority of French
literature, and the salons, the most prominent feature of French
civilization.”—Johnson’s Cyclopædia.
[144] See the Letter to Madame de Fontaine, general mistress of
the school, Sept. 20, 1691.
[145] Two volumes, 2d edition, 1861.
[146] Two volumes, 1857.
[147] Two volumes, 1860.
[148] M. Gréard, Mémoire sur l’enseignement secondaire des
filles, 1882, p. 59.
[149] Lettres historiques, Tome I. p. 48.
[150] Lettres historiques, Tome I. p. 89.
CHAPTER XI.

ROLLIN.

THE UNIVERSITY OF PARIS; STATUTES OF 1598 AND OF 1600; ORGANIZATION OF THE DIFFERENT
FACULTIES; DECADENCE OF THE UNIVERSITY OF PARIS IN THE SEVENTEENTH CENTURY; THE
RESTORATION OF STUDIES AND ROLLIN (1661-1741); THE TREATISE ON STUDIES; DIFFERENT
OPINIONS; DIVISION OF THE TREATISE ON STUDIES; GENERAL REFLECTIONS ON EDUCATION;
STUDIES FOR THE FIRST YEARS; THE EDUCATION OF GIRLS; THE STUDY OF FRENCH; GREEK AND
LATIN; ROLLIN THE HISTORIAN; THE TEACHING OF HISTORY; PHILOSOPHY; SCIENTIFIC
INSTRUCTION; EDUCATIONAL CHARACTER OF ROLLIN’S PEDAGOGY; INTERIOR DISCIPLINE OF
COLLEGES; PUBLIC EDUCATION; THE ROD; PUNISHMENTS IN GENERAL; CONCLUSION; ANALYTICAL
SUMMARY.

248. The University of Paris.—Since the thirteenth century, the


University of Paris had been a centre of light and a resort for
students. Ramus could say: “This University is not the university of
one city only, but of the entire world.” But even in the time of
Ramus, in consequence of the civil discords, and by reason also of
the progress in the colleges organized by the Company of Jesus, the
University of Paris declined; she saw the number of her pupils
diminish. She persisted, however, in the full light of the Renaissance,
in following the superannuated regulations which the Cardinal
d’Estouteville had imposed on her in 1452; she fell behind in the
routine of the scholastic methods. A reform was necessary, and in
1600 it was accomplished by Henry IV.
249. Statutes of 1600.—The statutes of the new university were
promulgated “by the order and the will of the most Christian and
most invincible king of France and Navarre, Henry IV.” This was the
first time that the State directly intervened in the control of
education, and that secular power was set up in opposition to the
absolute authority of the Church.
In the thirteenth and fourteenth centuries a reform had been
made in the University, by the Popes Innocent III. and Urban V. The
reformer of 1452, the Cardinal d’Estouteville, acted as the legate of
the pontifical power. On the contrary, the statutes of 1600 were the
work of a commission named by the king, and there sat at its
deliberations, by the side of a few ecclesiastics, magistrates, and
even professors.

250. Organization of the Different Faculties.—The University of Paris


comprised four Faculties: the Faculties of Theology, of Law, and of
Medicine, which corresponded to what we to-day call superior
instruction, and the Faculty of Arts, which was almost the equivalent
of our secondary instruction.[151]
It would take too long to enumerate in this place the different
innovations introduced by the statutes of 1600. Let us merely say a
word of the Faculty of Arts.
In the Faculty of Arts the door was finally opened to the classical
authors. In a certain degree the tendencies of the Renaissance were
obeyed. Nevertheless, the methods and the general spirit were
scarcely changed. Catholicism was obligatory, and the French
language remained under ban. Frequent exercises in repetition and
declamation were maintained. The liberal arts were always
considered “the foundation of all the sciences.” Instruction in
philosophy was always reduced to the interpretation of the texts of
Aristotle. As to history, and the sciences in general, no account
whatever was taken of them.
251. Decadence of the University in the Seventeenth Century.—The
reform, then, was insufficient, and the results were bad. While the
colleges of the Jesuits attracted pupils in crowds, and while the
Oratorians and the Jansenists reformed secondary instruction, the
colleges of the University[152] remained mediocre and obscure. Save
in rare exceptions, there were no professors of distinction; the
education was formal, in humble imitation of that of the Company of
Jesus; there was an abuse of abstract rules, of grammatical
exercises, of written tasks, and of Latin composition; there was no
disposition to take an advance step; but an obstinate resistance to
the new spirit, which was indicated either by the interdiction of the
philosophy of Descartes, or by the refusal to teach in the French
language; in a word, there was complete isolation in immovable
routine, and in consequence, decadence,—such is a summary history
of the University of Paris up to the last quarter of the seventeenth
century.

252. The Restoration of Studies and Rollin (1661-1741).—We must


go forward to the time when Rollin taught, to observe a revival in
the studies of the University. Several distinguished professors, as his
master Hersan, Pourchot, and still others, had prepared the way for
him. There was then, from 1680 to 1700, a real rejuvenescence of
studies, which was initiated in part by Rollin.
Latin lost a little ground in consequence of a growing recognition
of the rights of the French language and the national literature,
which had just been made illustrious by so many masterpieces. The
spirit of the Jansenist methods penetrated the colleges of the
University. The Cartesian philosophy was taught in them, and a little
more attention was given to the explication of authors, and a little
less to the verbal repetition of lessons. New ideas began to infiltrate
into the old citadel of scholasticism. The question came to be asked
if celibacy was indeed an indispensable condition of the teaching
office. Men began to comprehend that at least marriage was not a
reason for exclusion. Finally, real progress was made in discipline as
well as in methods, and the indubitable proof of this is the Treatise
on Studies, by Rollin.

253. The Treatise on Studies.—Rollin has summed up his


educational experience, an experience of fifty years, in a book which
has become celebrated under the title of Treatise on Studies. The full
title of this work was: De la manière d’enseigner et d’étudier les
belles-lettres par rapport à l’esprit et au cœur. The first two volumes
appeared in 1726, and the other two in 1728.
The Treatise on Studies is not like the Émile, which was published
twenty years later, a work of venturesome inquiry and original
novelties; but is a faithful exposition of the methods in use, and a
discreet commentary on them. While this treatise belongs by its date
to the eighteenth century, it is the pedagogy of the seventeenth
century, and the traditions of the University under the reign of Louis
XIV. that Rollin has collected, and of which he has simply wished to
be the reporter. In the Latin dedication, which he addresses to the
Rector of the University of Paris, he clearly defines his intentions and
his purpose:—
“My first design was to put in writing and define the method of
teaching which has long been in use among you, and which, up to
this time, has been transmitted only by word of mouth, and through
a sort of tradition; and to erect, so far as I am able to do it, a
durable monument of the rules and practice which you have
followed in the instruction of youth, for the purpose of preserving, in
all its integrity, the taste for belles-lettres, and to preserve it, if
possible, from the injuries and the alterations of time.”

254. Different Opinions.—Rollin has always had warm admirers.


Voltaire called the Treatise a book “forever useful,” and whatever
may be our reservations on the deficiences, and on the short and
narrow views of certain parts of the pedagogy of Rollin, we must
subscribe to this judgment. But we shall not go so far as to accept
the enthusiastic declarations of Villemain, who complains that the
study of the Treatise is neglected in our time, “as if new methods
had been discovered for training the intelligence and the heart”; and
he adds, “Since the Treatise on Studies, not a forward step has been
taken.” This is to undervalue all the earnest efforts that have been
made for two centuries by educators just as profound as was the
ever timid and cautious Rollin. When we compare the precepts of
the Treatise with the reforms which the spirit of progress has already
effected, and particularly with those which it will effect, we are
astonished to hear Nisard say: “In educational matters, the Treatise
on Studies is the unique book, or better still, the book.”
To put such a burden of pompous praise on Rollin is to
compromise his real worth; and without ceasing to do justice to his
wise and judicious spirit, we wish to employ more discretion in our
admiration.

255. Division of the Treatise on Studies.—Before calling attention to


the most interesting parts of the Treatise on Studies, let us briefly
state the object of the eight books of which it is composed.
The Treatise opens with a Preliminary Discourse which recites the
advantages of instruction.
The title of the first book is: Exercises which are proper for very
young children; of the education of girls. Rollin acknowledges that
he treats only very superficially “this double subject,” which is
foreign to his original plan. In fact, the first edition of his Treatise on
Studies contained but seven books, and it is only in 1734 that he
wrote, “at the urgent requests and prayers of several persons,” that
short essay on the education of boys and girls which first appeared
under the form of a supplement, and which became the first book of
the work only in the subsequent editions.
The different subjects proper for training the youth in the public
schools, that is, in the colleges,—such is the object of the six books
which follow: Book II. Of the learning of the languages; that is, the
study of Greek and Latin; Book III. Of poetry; Book IV. Of rhetoric;
Book V. Of the three kinds of eloquence; Book VI. Of history; Book
VII. Of philosophy.
Book VIII., the last, entitled Of the interior government of schools
and colleges, has a particular character. It does not treat of studies
and intellectual exercises, but of discipline and moral education. It is,
on all accounts, the most original and interesting part of Rollin’s
work, and it opens to us the treasures of his experience. This eighth
book has been justly called the “Memoirs of Rollin.” That which
constitutes its merit and its charm is that the author here at last
decides to be himself. He does not quote the ancients so much; but
he speaks in his own name, and relates what he has done, or what
he has seen done.

256. General Reflections on Education.—There is little to be gathered


out of the Preliminary Discourse of Rollin. He is but slightly
successful in general reflections. When he ventures to philosophize,
Rollin easily falls into platitudes. He has a dissertation to prove that
“study gives the mind more breadth and elevation; and that study
gives capacity for business.”
On the purpose of education, Rollin, who copies the moderns
when he does not translate from the ancients, is content with
reproducing the preamble of the regulations of Henry IV., which
assigned to studies three purposes: learning, morals and manners,
and religion.
“The happiness of kingdoms and peoples, and particularly of a
Christian State, depends on the good education of the youth, where
the purpose is to cultivate and to polish, by the study of the
sciences, the intelligence, still rude, of the young, and thus to fit
them for filling worthily the different vocations to which they are
destined, without which they will be useless to the State; and finally,
to teach them the sincere religious practices which God requires of
them, the inviolable attachment they owe to their fathers and
mothers and to their country, and the respect and obedience which
they are bound to render princes and magistrates.”

257. Primary Studies.—Rollin is original when he introduces us to


the classes of the great colleges where he has lived; but is much
less so when he speaks to us of little children, whom he has never
seen near at hand. He has never known family life, and scarcely ever
visited public schools; and it is through his recollections of Quintilian
that he speaks to us of children.
There is, then, but little to note in the few pages that he has
devoted to the studies of the first years, from three to six or seven.
One of the most interesting things we find here, perhaps, is the
method which he recommends for learning to read,—“the
typographic cabinet of du Mas.” “It is a novelty,” says the wise Rollin,
“and it is quite common and natural that we should be suspicious of
this word novelty.” But after the examination, he decides in favor of
the system in question, which consists in making of instruction in
reading, something analogous to the work of an apprentice who is
learning to print. The pupil has before him a table, and on this table
is placed a set of pigeon-holes, “logettes,” which contain the letters
of the alphabet, printed on cards. The pupil is to arrange on the
table the different letters needed to construct the words required of
him. The reasons that Rollin gives for recommending this method,
successful tests of which he had seen made, prove that he had
taken into account the nature of the child and his need of activity:—
“This method of learning to read, besides several other
advantages, has one which seems to me very considerable,—it is
that of being amusing and agreeable, and of not having the
appearance of study. Nothing is more wearisome or tedious in
infancy than severe mental effort while the body is in a state of
repose. With this device, the mind of the child is not wearied. He
need not make a painful effort at recollection, because the
distinction and the name of the boxes strike his senses. He is not
constrained to a posture that is oppressive by being always tied to
the place where he is made to read. There is free activity for eyes,
hands, and feet. The child looks for his letters, takes them out,
arranges them, overturns them, separates them, and finally replaces
them in their boxes. This movement is very much to his taste, and is
exactly adapted to the active and restless disposition of that age.”
Rollin seems really to believe that there “is no danger in beginning
with the reading of Latin.” However, “for the schools of the poor, and
for those in the country, it is better,” he says, “to fall in with the
opinion of those who believe that it is necessary to begin with the
reading of French.”
It may be thought that Rollin puts a little too much into the first
years of the child’s course of study. Before the age of six or seven he
ought to have learned to read, to write, to be nourished on the
Historical Catechism of Fleury, to know some of the fables of La
Fontaine by heart, and to have studied French grammar, and
geography. At least, Rollin requires that “no thought, no expression,
which is within the child’s range,” shall be allowed to be passed by.
He requires that the teacher speak little, and that he make the child
speak much, “which is one of the most essential duties and one of
those that are the least practised.” He demands, above all else,
clearness of statement, and commends the use of illustrations and
pictures in reading books. “They are very suitable,” he says, “for
striking the attention of children, and for fixing their memory; this is
properly the writing of the ignorant.”[154]

258. The Education of Girls.—The same reasons explain the


shortcomings of Rollin’s views on the education of women, and the
relative mediocrity of his ideas on the education of children. Living in
solitude and in the celibate state, he had no personal information on
these subjects, and so he goes back to Fénelon for his ideas on the
education of women, and to Quintilian in the case of children.
Is the study of Latin fit for girls? Such is the first question which
he raises; but he has the wisdom to answer it in the negative, save
for “nuns, and also for Christian virgins and widows.” “There is no
difference in minds,” Rollin emphatically says, “that is due to sex.”
But he does not extend the consequences of this excellent principle
very far. He is content to require of women the four rules of
arithmetic; orthography, in which he is not over exacting, for “their
ignorance of orthography should not be imputed to them as a crime,
since it is almost universal in their sex;” ancient history and the
history of France, “which it is disgraceful to every good Frenchman
not to know.”[155] As to reading, Rollin is quite as severe as Madame
de Maintenon: “The reading of comedies and tragedies may be very
dangerous for young ladies.” He sanctions only Esther and Athalie.
Music and dancing are allowed, but without enthusiasm and with
endless precautions:—
“An almost universal experience shows that the study of music is
an extraordinary dissipation.”
“I do not know how the custom of having girls learn to sing and
play on instruments at such great expense has become so
common.... I hear it said that as soon as they enter on life’s duties,
they make no farther use of it.”

259. The Study of French.—Rollin is chiefly preoccupied with the


study of the ancient languages; but he has the merit,
notwithstanding his predilection for exercises in Latin, of having
followed the example of the Jansenists so far as the importance
accorded to the French language is concerned.
“It is a disgrace,” he says, “that we are ignorant of our own
language; and if we are willing to confess the truth, we will almost
all acknowledge that we have never studied it.”
Rollin admitted that he was “much more proficient in the study of
Latin than in that of French.” In the opening of his Treatise, which he
wrote in French only that he might place himself within the reach of
his young readers and their parents, he excuses himself for making a
trial in a kind of writing which is almost new to him. And in
congratulating him on his work, d’Aguesseau wrote, “You speak
French as if it were your native tongue.” Such was the Rector of the
University in France at the commencement of the eighteenth
century.
Let us think well of him, therefore, for having so overcome his
own habits of mind as to recommend the study of French. He would
have it learned, not only through use, but also “through principles,”
and would have “the genius of the language understood, and all its
beauties studied.”
Rollin has a high opinion of grammar, but would not encourage a
misuse of it:—
“Long-continued lessons on such dry matter might become very
tedious to pupils. Short questions, regularly proposed each day after
the manner of an ordinary conversation, in which they themselves
would be consulted, and in which the teacher would employ the art
of having them tell what he wished to make them learn, would teach
them in the way of amusement, and, by an insensible progress,
continued for several years, they would acquire a profound
knowledge of the language.”
It is in the Treatise on Studies that we find for the first time a
formal list of classical French authors. Some of these are now
obscure and forgotten, as the Remarkable Lives written by Marsolier,
and the History of the Academy of Inscriptions and Belles-Lettres, by
de Boze; but the most of them have held their place in our
programmes, and the judgments of Rollin have been followed for
two centuries, on the Discourse on Universal History, by Bossuet, on
the works of Boileau and Racine, and on the Logic of Port Royal.
Like all his contemporaries, Rollin particularly recommends Latin
composition to his pupils. However, he has spoken a word for French
composition, which should bear, first, on fables and historical
narratives, then on exercises in epistolary style, and finally, on
common things, descriptions, and short speeches.

260. Greek and Latin.—But it is in the teaching of the ancient


languages that Rollin has especially tried the resources of his
pedagogic art. For two centuries, in the colleges of the University,
his recommendations have been followed. In Greek, he censures the
study of themes, and reduces the study of this language to the
understanding of authors. More of a Latinist than of a Hellenist, of
all the arguments he offers to justify the study of Greek, the best is,
that, since the Renaissance, Greek has always been taught; but,
without great success, he admits:—
“Parents,” he says, “are but little inclined in favor of Greek. They
also learned Greek, they claim, in their youth, and they have
retained nothing of it; this is the ordinary language which indicates
that one has not forgotten much of it.”
But Latin, which it does not suffice to learn to read, but which
must be written and spoken, is the object of all Rollin’s care, who, on
this point, gives proof of consummate experience. Like the teachers
of Port Royal, he demands that there shall be no abuse of themes in
the lower classes, and recommends the use of oral themes, but he
holds firmly to version, and to the explication of authors:—
“Authors are like a living dictionary, and a speaking grammar,
whereby we learn, through experience, the very force and the true
use of words, of phrases, and of the rules of syntax.”
This is not the place to analyze the parts of the Treatise on Studies
which relate to poetics and rhetoric, and which are the code, now
somewhat antiquated, of Latin verse and prose. Rollin brings to bear
on this theme great professional sagacity, but also a spirit of
narrowness. He condemns ancient mythology, and excludes, as
dangerous, the French poets, save some rare exceptions. He claims
that the true use of poetry belongs to religion. He has no conception
of the salutary and wholesome influence which the beauties of
poetry and eloquence can exercise over the spirit.

261. Rollin the Historian.—Rollin has made a reputation as an


historian. Frederick II. compares him to Thucydides, and
Chateaubriand has emphatically called him the “Fénelon of History.”
Montesquieu himself has pleasantly said: “A noble man has
enchanted the public through his works on history; it is heart which
speaks to heart; we feel a secret satisfaction in hearing virtue speak;
he is the bee of France.”
Modern criticism has dealt justly with these exaggerations. The
thirteen volumes of his Ancient History, which Rollin published, from
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!

ebookultra.com

You might also like