Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (5 votes)
156 views

Complete Design Patterns: Elements of Reusable Object-Oriented Software 1st Edition - Ebook PDF PDF For All Chapters

elements

Uploaded by

vidausseli
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
156 views

Complete Design Patterns: Elements of Reusable Object-Oriented Software 1st Edition - Ebook PDF PDF For All Chapters

elements

Uploaded by

vidausseli
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Download the full version of the ebook now at ebooksecure.

com

Design patterns: elements of reusable object-


oriented software 1st edition - eBook PDF

https://ebooksecure.com/download/design-patterns-
elements-of-reusable-object-oriented-software-
ebook-pdf/

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


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

C++ Programming: An Object-Oriented Approach, 1e ISE 1st


Edition Behrouz A. Forouzan - eBook PDF

https://ebooksecure.com/download/c-programming-an-object-oriented-
approach-1e-ise-ebook-pdf/

ebooksecure.com

(eBook PDF) Microsoft Visual C#: An Introduction to


Object-Oriented Programming 7th Edition

https://ebooksecure.com/product/ebook-pdf-microsoft-visual-c-an-
introduction-to-object-oriented-programming-7th-edition/

ebooksecure.com

(eBook PDF) Elements of Visual Design in the Landscape 3rd


Edition

https://ebooksecure.com/product/ebook-pdf-elements-of-visual-design-
in-the-landscape-3rd-edition/

ebooksecure.com

Thermodynamic Approaches in Engineering Systems 1st


Edition Stanislaw Sieniutycz - eBook PDF

https://ebooksecure.com/download/thermodynamic-approaches-in-
engineering-systems-ebook-pdf/

ebooksecure.com
(eBook PDF) The Science of Psychology: An Appreciative
View 5th Edition

https://ebooksecure.com/product/ebook-pdf-the-science-of-psychology-
an-appreciative-view-5th-edition/

ebooksecure.com

(eBook PDF) Understanding Health Information Systems for


the Health Professions

https://ebooksecure.com/product/ebook-pdf-understanding-health-
information-systems-for-the-health-professions/

ebooksecure.com

(eBook PDF) Accounting Information Systems, Global Edition


15th Edition

https://ebooksecure.com/product/ebook-pdf-accounting-information-
systems-global-edition-15th-edition/

ebooksecure.com

Security Operations Center Guidebook A Practical Guide for


a Successful SOC 1st Edition - eBook PDF

https://ebooksecure.com/download/security-operations-center-guidebook-
a-practical-guide-for-a-successful-soc-ebook-pdf/

ebooksecure.com

Theatre: The Lively Art 10th Edition (eBook PDF)

https://ebooksecure.com/product/theatre-the-lively-art-10th-edition-
ebook-pdf/

ebooksecure.com
Neuroplasticity: From Bench to Bedside 1st Edition Angelo
Quartarone (Editor) - eBook PDF

https://ebooksecure.com/download/neuroplasticity-from-bench-to-
bedside-ebook-pdf/

ebooksecure.com
Design Patterns
Elements of Reusable Object-Oriented Software

Produced by KevinZhang
Design Patterns: Elements of Reusable Object-Oriented Software

Contents

Preface to CD ........................................................ 5

Preface to Book ...................................................... 7

Foreword ............................................................. 9

Guide to Readers .................................................... 10

1 Introduction ...................................................... 11
1.1 What Is a Design Pattern? ...................................... 12
1.2 Design Patterns in Smalltalk MVC ............................... 14
1.3 Describing Design Patterns ..................................... 16
1.4 The Catalog of Design Patterns ................................. 18
1.5 Organizing the Catalog ......................................... 21
1.6 How Design Patterns Solve Design Problems ...................... 23
1.7 How to Select a Design Pattern ................................. 42
1.8 How to Use a Design Pattern .................................... 44

2 A Case Study: Designing a Document Editor ......................... 46


2.1 Design Problems ................................................ 46
2.2 Document Structure ............................................. 47
2.3 Formatting ..................................................... 53
2.4 Embellishing the User Interface ................................ 56
2.5 Supporting Multiple Look-and-Feel Standards .................... 60
2.6 Supporting Multiple Window Systems ............................. 64
2.7 User Operations ................................................ 72
2.8 Spelling Checking and Hyphenation .............................. 77
2.9 Summary ........................................................ 90

Design Pattern Catalog .............................................. 93

3 Creational Patterns ............................................... 94


Abstract Factory ................................................... 99
Builder ........................................................... 110
Factory Method .................................................... 121
Prototype ......................................................... 133
Singleton ......................................................... 144

Discussion of Creational Patterns .................................. 153

2
Design Patterns: Elements of Reusable Object-Oriented Software

4 Structural Patterns .............................................. 155


Adapter ........................................................... 157
Bridge ............................................................ 171
Composite ......................................................... 183
Decorator ......................................................... 196
Façade ............................................................ 208
Flyweight ......................................................... 218
Proxy ............................................................. 233

Discussion of Structural Patterns ................................. 246

5 Behavioral Patterns .............................................. 249


Chain of Responsibility ........................................... 251
Command ........................................................... 263
Interpreter ....................................................... 274
Iterator .......................................................... 289
Mediator .......................................................... 305
Memento ........................................................... 316
Observer .......................................................... 326
State ............................................................. 338
Strategy .......................................................... 349
Template Method ................................................... 360
Visitor ........................................................... 366

Discussion of Behavioral Patterns ................................. 382

6 Conclusion ....................................................... 388


6.1 What to Expect from Design Patterns ........................... 388
6.2 A Brief History ............................................... 392
6.3 The Pattern Community ......................................... 393
6.4 An Invitation ................................................. 395
6.5 A Parting Thought ............................................. 396

A Glossary ......................................................... 397

B Guide to Notation ................................................ 404


B.1 Class Diagram ................................................. 404
B.2 Object Diagram ................................................ 406
B.3 Interaction Diagram ........................................... 407

C Foundation Classes ............................................... 409


C.1 List .......................................................... 409
C.2 Iterator ...................................................... 412
C.3 ListIterator .................................................. 413

3
Design Patterns: Elements of Reusable Object-Oriented Software

C.4 Point ......................................................... 413


C.5 Rect .......................................................... 414

Bibliography ....................................................... 416

4
Design Patterns: Elements of Reusable Object-Oriented Software

Preface to CD

As we were writing Design Patterns, we knew the patterns we weredescribing had


value because they had proven themselves in manydifferent contexts. Our hope was
that other software engineers wouldbenefit from these patterns as much as we had.

Now, three years after its debut, we find ourselves both grateful andthrilled
by how the book has been received. Lots of people use it.Many tell us the patterns
have helped them design and build bettersystems. Many others have been inspired
to write their own patterns,and the pool of patterns is growing. And many have
commented on whatmight be improved about the book and what they would like to
see inthe future.

A recurring comment in all the feedback has been how well-suited thebook is to
hypertext. There are numerous cross-references, andchasing references is
something a computer can do very well. Sincemuch of the software development
process takes place on computers, itwould be natural to have a book like ours
as an on-line resource.Observations like these got us excited about the potential
of thismedium. So when Mike Hendrickson approached us about turning the bookinto
a CD-ROM, we jumped at the chance.

Two years and several megabytes of e-mail later, we're delighted thatyou can
finally obtain this edition, the Design Patterns CD,and put its unique capabilities
to work. Now you can access a patternfrom your computer even when someone has
borrowed your book. You can search the text for key words and phrases. It's also
considerably easier to incorporate parts of it in your own on-line
documentation.And if you travel with a notebook computer, you can keep the
bookhandy without lugging an extra two pounds of paper.

Hypertext is a relatively new publishing venue, one we arelearning to use just


like everyone else. If you have ideas on howto improve this edition, please send
them todesign-patterns-cd@cs.uiuc.edu.If you have questions or suggestions
concerning the patternsthemselves, send them to
thegang-of-4-patterns@cs.uiuc.edumailing list. (To subscribe, send e-mail to
gang-of-4-patterns@cs.uiuc.eduwith the subject "subscribe".) This list has quite
a few readers, and many of them can answer questions as well as we can—andusually
a lot faster! Also, be sure to check out thePatterns Home Page
athttp://hillside.net/patterns/.There you'll find other books and mailing lists
on patterns, notto mention conference information and patterns published on-line.

This CD entailed considerable design and implementation work. We areindebted to


Mike Hendrickson and the team at Addison-Wesley for theiron-going encouragement
and support. Jeff Helgesen, Jason Jones, andDaniel Savarese garner many thanks
5
Design Patterns: Elements of Reusable Object-Oriented Software

for their development effort andfor patience despite what must appear to have
been our insatiableappetite for revision. A special acknowledgment is due IBM
Research,which continues to underwrite much of this activity. We also thankthe
reviewers, including Robert Brunner, Sandeep Dani, Bob Koss, ScottMeyers, Stefan
Schulz, and the Patterns Discussion Group at theUniversity of Illinois
Urbana-Champaign. Their advice led to at leastone major redesign and several minor
ones.

Finally, we thank all who have taken time to comment on DesignPatterns. Your
feedback has been invaluable to us as we striveto better our understanding and
presentation of this material.

Zurich, Switzerland E.G.

Sydney, Australia R.H.

Urbana, Illinois R.J.

Hawthorne, New York J.V.

August 1997

6
Design Patterns: Elements of Reusable Object-Oriented Software

Preface to Book

This book isn't an introduction to object-oriented technology or design. Many


books already do a good job of that. This book assumes you are reasonably proficient
in at least one object-oriented programming language, and you should have some
experience in object-oriented design as well. You definitely shouldn't have to
rush to the nearest dictionary the moment we mention "types" and "polymorphism,"
or "interface" as opposed to "implementation” inheritance.

On the other hand, this isn't an advanced technical treatise either. It’s a book
of design patterns that describes simple and elegant solutions to specific problems
in object-oriented software design. Design patterns capture solutions that have
developed and evolved overtime. Hence they aren't the designs people tend to
generate initially. They reflect untold redesign and recoding as developers have
struggled for greater reuse and flexibility in their software. Design patterns
capture these solutions in a succinct and easily applied form.

The design patterns require neither unusual language features nor amazing
programming tricks with which to astound your friends and managers. All can be
implemented in standard object-oriented languages, though they might take a little
more work than ad hoc solutions. But the extra effort invariably pays dividends
in increased flexibility and reusability.

Once you understand the design patterns and have had an "Aha!" (and not just a
"Huh?") experience with them, you won't ever think about object-oriented design
in the same way. You'll have insights that can make your own designs more flexible,
modular, reusable, and understandable—which is why you're interested in
object-oriented technology in the first place, right?

A word of warning and encouragement: Don't worry if you don’t understand this
book completely on the first reading. We didn’t understand it all on the first
writing! Remember that this isn't a book to read once and put on a shelf. We hope
you'll find yourself referring to it again and again for design insights and for
inspiration.

This book has had a long gestation. It has seen four countries, three of its authors'
marriages, and the birth of two (unrelated) offspring.Many people have had a part
in its development. Special thanks are due Bruce Anderson, Kent Beck, and André
Weinand for their inspiration and advice. We also thank those who reviewed drafts
of the manuscript: Roger Bielefeld, Grady Booch, Tom Cargill, Marshall Cline,
Ralph Hyre, Brian Kernighan, Thomas Laliberty, Mark Lorenz, Arthur Riel, Doug
Schmidt, Clovis Tondo, Steve Vinoski, andRebecca Wirfs-Brock. We are also grateful
to the team at Addison-Wesley for their help and patience: Kate Habib,Tiffany
Moore,Lisa Raffaele,Pradeepa Siva, and John Wait.Special thanks to Carl Kessler,
7
Design Patterns: Elements of Reusable Object-Oriented Software

Danny Sabbah, and Mark Wegman at IBMResearch for their unflagging support of this
work.

Last but certainly not least, we thank everyone on the Internet andpoints beyond
who commented on versions of the patterns, offeredencouraging words, and told
us that what we were doing was worthwhile.These people include but are not limited
toJon Avotins,Steve Berczuk,Julian Berdych,Matthias Bohlen,John Brant,Allan
Clarke,Paul Chisholm,Jens Coldewey,Dave Collins,Jim Coplien,Don
Dwiggins,Gabriele Elia,Doug Felt,Brian Foote,Denis Fortin,Ward Harold,Hermann
Hueni,Nayeem Islam,Bikramjit Kalra,Paul Keefer,Thomas Kofler,Doug Lea,Dan
LaLiberte,James Long,Ann Louise Luu,Pundi Madhavan,Brian Marick,Robert
Martin,Dave McComb,Carl McConnell,Christine Mingins,Hanspeter Mössenböck,Eric
Newton,Marianne Ozkan,Roxsan Payette,Larry Podmolik,George Radin,Sita
Ramakrishnan,Russ Ramirez,Alexander Ran,Dirk Riehle,Bryan Rosenburg,Aamod
Sane,Duri Schmidt,Robert Seidl,Xin Shu,and Bill Walker.

We don't consider this collection of design patterns complete andstatic; it's


more a recording of our current thoughts on design. Wewelcome comments on it,
whether criticisms of our examples, referencesand known uses we've missed, or
design patterns we should haveincluded. You can write us care of Addison-Wesley,
or send electronicmail to design-patterns@cs.uiuc.edu. You can also
obtainsoftcopy for the code in the Sample Code sections by sending themessage
"send design pattern source" to design-patterns-source@cs.uiuc.edu. And now
there's a Web page at
http://st-www.cs.uiuc.edu/users/patterns/DPBook/DPBook.html for late-breaking
information and updates.

Mountain View, California E.G.

Montreal, Quebec R.H.

Urbana, Illinois R.J.

Hawthorne, New York J.V.

August 1994

8
Design Patterns: Elements of Reusable Object-Oriented Software

Foreword

Consider the work of a future software archeologist, tracingthe history of


computing. The fossil record will likely show clearstrata: here is a layer formed
of assembly language artifacts,there is a layer populated with the skeletons of
high orderprogramming languages (with certain calcified legacy partsprobably
still showing some signs of life). Each such layer willbe intersected with the
imprint of other factors that have shapedthe software landscape: components,
residue from the greatoperating system and browser wars, methods, processes, tools.
Eachline in this strata marks a definitive event: below that line,computing was
this way; above that line, the art of computing hadchanged.

Design Patterns draws such a line of demarcation;this is a work that represents


a change in the practice ofcomputing. Erich, Richard, Ralph, and John present
a compellingcase for the importance of patterns in crafting complex
systems.Additionally, they give us a language of common patterns that canbe used
in a variety of domains.

The impact of this work cannot be overstated. As I travel aboutthe world working
with projects of varying domains andcomplexities, it is uncommon for me to
encounter developers whohave not at least heard of the patterns movement. In the
moresuccessful projects, it is quite common to see many of thesedesign patterns
actually used.

With this book, the Gang of Four have made a seminalcontribution to software
engineering. There is much to learnedfrom them, and much to be actively applied.

Grady Booch
Chief Scientist, Rational Software Corporation

9
Design Patterns: Elements of Reusable Object-Oriented Software

Guide to Readers

This book has two main parts. The first part (Chapters 1 and 2)describes what
design patterns are and how they help you designobject-oriented software. It
includes a design case study thatdemonstrates how design patterns apply in practice.
The second partof the book (Chapters 3, 4, and 5) is a catalog of the actual
designpatterns.

The catalog makes up the majority of the book. Its chapters dividethe design
patterns into three types: creational, structural, andbehavioral. You can use
the catalog in several ways. You can readthe catalog from start to finish, or
you can just browse from patternto pattern. Another approach is to study one of
the chapters. Thatwill help you see how closely related patterns distinguish
themselves.

You can use the references between the patterns as a logicalroute through the
catalog. This approach will give you insightinto how patterns relate to each other,
how they can be combinedwith other patterns, and which patterns work well together.
Figure 1.1(page 23) depicts these references graphically.

Yet another way to read the catalog is to use a more problem-directedapproach.


Skip to Section 1.6 (page 23) to read about some common problems in designing
reusable object-orientedsoftware; then read the patterns that address these
problems. Somepeople read the catalog through first and then use aproblem-directed
approach to apply the patterns to their projects.

If you aren't an experienced object-oriented designer, then start withthe simplest


and most common patterns:

• Abstract Factory (page 99)


• Adapter (157)
• Composite (183)
• Decorator (196)
• Factory Method (121)
• Observer (326)
• Strategy (349)
• Template Method (360)

It's hard to find an object-oriented system that doesn't use at leasta couple
of these patterns, and large systems use nearly all of them.This subset will help
you understand design patterns in particular andgood object-oriented design in
general.

10
Visit https://testbankfan.com
now to explore a rich
collection of testbank or
solution manual and enjoy
exciting offers!
Design Patterns: Elements of Reusable Object-Oriented Software

1. Introduction

Designing object-oriented software is hard, and designing reusable


object-oriented software is even harder. You must find pertinent objects, factor
them into classes at the right granularity, define class interfaces and inheritance
hierarchies, and establish key relationships among them. Your design should be
specific to the problem at hand but also general enough to address future problems
and requirements. You also want to avoid redesign, or at least minimize it.
Experienced object-oriented designers will tell you that a reusable and flexible
design is difficult if not impossible to get "right" the first time. Before a
design is finished, they usually try to reuse it several times, modifying it each
time.

Yet experienced object-oriented designers do make good designs. Meanwhile new


designers are overwhelmed by the options available and tend to fall back on
non-object-oriented techniques they've used before. It takes a long time for
novices to learn what good object-oriented design is all about. Experienced
designers evidently know something inexperienced ones don't. What is it?

One thing expert designers know not to do is solve every problem from first
principles. Rather, they reuse solutions that have worked for them in the past.
When they find a good solution, they use it again and again. Such experience is
part of what makes them experts. Consequently, you'll find recurring patterns
of classes and communicating objects in many object-oriented systems. These
patterns solve specific design problems and make object-oriented designs more
flexible, elegant, and ultimately reusable. They help designers reuse successful
designs by basing new designs on prior experience. A designer who is familiar
with such patterns can apply them immediately to design problems without having
to rediscover them.

An analogy will help illustrate the point. Novelists and playwrights rarely design
their plots from scratch. Instead, they follow patterns like "Tragically Flawed
Hero" (Macbeth, Hamlet, etc.) or "The Romantic Novel" (countless romance novels).
In the same way, object-oriented designers follow patterns like "represent states
with objects" and "decorate objects so you can easily add/remove features." Once
you know the pattern, a lot of design decisions follow automatically.

We all know the value of design experience. How many times have you had design
déjà-vu—that feeling that you've solved a problem before but not knowing exactly
where or how? If you could remember the details of the previous problem and how
you solved it, then you could reuse the experience instead of rediscovering it.
However, we don't do a good job of recording experience in software design for
others to use.

11
Design Patterns: Elements of Reusable Object-Oriented Software

The purpose of this book is to record experience in designing object-oriented


software as design patterns. Each design pattern systematically names, explains,
and evaluates an important and recurring design in object-oriented systems. Our
goal is to capture design experience in a form that people can use effectively.
To this end we have documented some of the most important design patterns and
present them as a catalog.

Design patterns make it easier to reuse successful designs and architectures.


Expressing proven techniques as design patterns makes them more accessible to
developers of new systems. Design patterns help you choose design alternatives
that make a system reusable and avoid alternatives that compromise reusability.
Design patterns can even improve the documentation and maintenance of existing
systems by furnishing an explicit specification of class and object interactions
and their underlying intent. Put simply, design patterns help a designer get a
design "right" faster.

None of the design patterns in this book describes new or unproven designs. We
have included only designs that have been applied more than once in different
systems. Most of these designs have never been documented before. They are either
part of the folklore of the object-oriented community or are elements of some
successful object-oriented systems—neither of which is easy for novice designers
to learn from. So although these designs aren't new, we capture them in a new
and accessible way: as a catalog of design patterns having a consistent format.

Despite the book's size, the design patterns in it capture only a fraction of
what an expert might know. It doesn't have any patterns dealing with concurrency
or distributed programming or real-time programming. It doesn't have any
application domain-specific patterns. It doesn't tell you how to build user
interfaces, how to write device drivers, or how to use an object-oriented database.
Each of these areas has its own patterns, and it would be worthwhile for someone
to catalog those too.

What is a Design Pattern?

Christopher Alexander says, "Each pattern describes a problem which occurs over
and over again in our environment, and then describes the core of the solution
to that problem, in such a way that you can use this solution a million times
over, without ever doing it the same way twice" [AIS+77]. Even though Alexander
was talking about patterns in buildings and towns, what he says is true about
object-oriented design patterns. Our solutions are expressed in terms of objects
and interfaces instead of walls and doors, but at the core of both kinds of patterns
is a solution to a problem in a context.

In general, a pattern has four essential elements:


12
Design Patterns: Elements of Reusable Object-Oriented Software

1. The pattern name is a handle we can use to describe a design problem, its
solutions, and consequences in a word or two. Naming a pattern immediately
increases our design vocabulary. It lets us design at a higher level of
abstraction. Having a vocabulary for patterns lets us talk about them with
our colleagues, in our documentation, and even to ourselves. It makes it
easier to think about designs and to communicate them and their trade-offs
to others. Finding good names has been one of the hardest parts of developing
our catalog.
2. The problem describes when to apply the pattern. It explains the problem
and its context. It might describe specific design problems such as how
to represent algorithms as objects. It might describe class or object
structures that are symptomatic of an inflexible design. Sometimes the
problem will include a list of conditions that must be met before it makes
sense to apply the pattern.
3. The solution describes the elements that make up the design, their
relationships, responsibilities, and collaborations. The solution doesn't
describe a particular concrete design or implementation, because a pattern
is like a template that can be applied in many different situations. Instead,
the pattern provides an abstract description of a design problem and how
a general arrangement of elements (classes and objects in our case) solves
it.
4. The consequences are the results and trade-offs of applying the pattern.
Though consequences are often unvoiced when we describe design decisions,
they are critical for evaluating design alternatives and for understanding
the costs and benefits of applying the pattern. The consequences for
software often concern space and time trade-offs. They may address language
and implementation issues as well. Since reuse is often a factor in
object-oriented design, the consequences of a pattern include its impact
on a system's flexibility, extensibility, or portability. Listing these
consequences explicitly helps you understand and evaluate them.

Point of view affects one's interpretation of what is and isn't a pattern. One
person's pattern can be another person's primitive building block. For this book
we have concentrated on patterns at a certain level of abstraction. Design patterns
are not about designs such as linked lists and hash tables that can be encoded
in classes and reused as is. Nor are they complex, domain-specific designs for
an entire application or subsystem. The design patterns in this book are
descriptions of communicating objects and classes that are customized to solve
a general design problem in a particular context.

A design pattern names, abstracts, and identifies the key aspects of a common
design structure that make it useful for creating a reusable object-oriented design.
The design pattern identifies the participating classes and instances, their roles
and collaborations, and the distribution of responsibilities. Each design pattern

13
Design Patterns: Elements of Reusable Object-Oriented Software

focuses on a particular object-oriented design problem or issue. It describes


when it applies, whether it can be applied in view of other design constraints,
and the consequences and trade-offs of its use. Since we must eventually implement
our designs, a design pattern also provides sample C++ and (sometimes) Smalltalk
code to illustrate an implementation.

Although design patterns describe object-oriented designs, they are based on


practical solutions that have been implemented in mainstream object-oriented
programming languages like Smalltalk and C++ rather than procedural languages
(Pascal, C, Ada) or more dynamic object-oriented languages (CLOS, Dylan, Self).
We chose Smalltalk and C++ for pragmatic reasons: Our day-to-day experience has
been in these languages, and they are increasingly popular.

The choice of programming language is important because it influences one's point


of view. Our patterns assume Smalltalk/C++-level language features, and that
choice determines what can and cannot be implemented easily. If we assumed
procedural languages, we might have included design patterns called "Inheritance,"
"Encapsulation," and "Polymorphism." Similarly, some of our patterns are supported
directly by the less common object-oriented languages. CLOS has multi-methods,
for example, which lessen the need for a pattern such as Visitor (page 366). In
fact, there are enough differences between Smalltalk and C++ to mean that some
patterns can be expressed more easily in one language than the other. (See Iterator
(289) for an example.)

Design Patterns in Smalltalk MVC

The Model/View/Controller (MVC) triad of classes [KP88] is used to build user


interfaces in Smalltalk-80. Looking at the design patterns inside MVC should help
you see what we mean by the term "pattern."

MVC consists of three kinds of objects. The Model is the application object, the
View is its screen presentation, and the Controller defines the way the user
interface reacts to user input. Before MVC, user interface designs tended to lump
these objects together. MVC decouples them to increase flexibility and reuse.

MVC decouples views and models by establishing a subscribe/notify protocol between


them. A view must ensure that its appearance reflects the state of the model.
Whenever the model's data changes, the model notifies views that depend on it.
In response, each view gets an opportunity to update itself. This approach lets
you attach multiple views to a model to provide different presentations. You can
also create new views for a model without rewriting it.

The following diagram shows a model and three views. (We've left out the controllers
for simplicity.) The model contains some data values, and the views defining a
14
Design Patterns: Elements of Reusable Object-Oriented Software

spreadsheet, histogram, and pie chart display these data in various ways. The
model communicates with its views when its values change, and the views communicate
with the model to access these values.

Taken at face value, this example reflects a design that decouples views from
models. But the design is applicable to a more general problem: decoupling objects
so that changes to one can affect any number of others without requiring the changed
object to know details of the others. This more general design is described by
the Observer (page 326) design pattern.

Another feature of MVC is that views can be nested. For example, a control panel
of buttons might be implemented as a complex view containing nested button views.
The user interface for an object inspector can consist of nested views that may
be reused in a debugger. MVC supports nested views with the CompositeView class,
a subclass of View. CompositeView objects act just like View objects; a composite
view can be used wherever a view can be used, but it also contains and manages
nested views.

Again, we could think of this as a design that lets us treat a composite view
just like we treat one of its components. But the design is applicable to a more
general problem, which occurs whenever we want to group objects and treat the
group like an individual object. This more general design is described by the

15
Exploring the Variety of Random
Documents with Different Content
what governs their motions. It seems as if an atom must be
somewhat uncomfortable, and have anything but a harmonious
family life, if it is subject to such irruptions several billions of times in
every second. However, apparently it gets used to them, and learns
to adjust itself.
The phenomena of the optical spectrum are produced by
disturbances in the outer ring of electrons, i.e. when one of the outer
electrons has been moving in an orbit which is larger than the normal
orbit of an electron in the outer ring, and suddenly jumps to this
normal orbit or to some intermediate one. But X-rays arise from
disturbances in the inner rings of electrons. If an electron is torn
away from the inner regions of an atom, it will soon be replaced by
some electron which was formerly in the outer ring; there is a vacant
place near the nucleus, and any electron that can will seize the
chance to occupy it. The amount of energy radiated out in waves
when this occurs is very great, and therefore the frequency of the
waves is very great. X-rays only differ from ordinary light-waves by
their great frequency, so that the emission of X-rays is just what
might be expected under such circumstances. This is why X-rays
give us so much information about the inner rings.
Bohr[8] has given a table setting out his theory of the way the
electrons are arranged in the various inert gases, each of which has
its outer ring as full as it will hold until there are other electrons
outside it. The helium atom, in its commoner form, he supposes to
contain two electrons moving in circles, each with the same total
quantum number, namely 1, as the minimum circle in hydrogen.
There is, however, as we saw, another form of helium, in which one
of the electrons moves in an eccentric orbit. In the next inert gas,
neon, there are 10 electrons, two in the inner ring and eight in the
outer. The two in the inner ring, according to his table, remain as in
helium, but of the outer eight four are moving in circles and four in
ellipses. This and the other figures in his table apply, of course, to
the atom in its most compressed state, the state to which it tends
when it is let alone, the state corresponding to the minimum circle in
hydrogen. Argon, which comes next with 18 electrons, has its two
inner rings as in neon, but has eight electrons in a third ring. Partly
from spectroscopic considerations, partly on grounds of stability,
Bohr maintains that these eight outer electrons none of them move
in circles, but are divided into two groups of four, the first group
moving in orbits of very great eccentricity, the second in less
eccentric orbits. The first group of four will, at moments penetrate
inside the first ring. It is assumed that the two inner rings are
definitely completed as soon as we reach neon, but that the later
rings are not completed so quickly. For reasons which we explained
in Chapter III, the periods containing a great many elements in the
periodic table are best explained by assuming that the change from
one element to the next is not always in the outermost ring, but is
sometimes in the next ring, or even (in the case of the rare earths) in
the next but one. According to these principles, krypton, which is the
element, and so has 18 more electrons than argon, is not to
have the whole 18 in its outer ring. Only 8 are to be in the outer ring;
the remaining 10 are added to the third ring, which is to have
eighteen electrons, six in orbits like one previous group of four, six in
orbits like the other previous group of four, and six in circles. The
eight outer electrons are again divided into two groups of four, one
group exceedingly eccentric (more so than any in argon), and the
other group somewhat less so. Passing to xenon, the element
in the periodic table, the first three rings are as in krypton, the fourth
ring has 18 electrons instead of 8, six in each of the groups that
previously had four, and six in orbits that are not circles, but have
only a small eccentricity. As we saw in connection with hydrogen in
the previous chapter, as the total quantum number increases, the
number of possible orbits increases. When the total quantum
number is one, there is only one possibility (a circle); when 2, there
are two; when 3, there are three, and so on. This does not mean that
there can be only one orbit whose total quantum number is one; it
only means that any orbit whose total quantum number is one must
be a circle of a certain size. There may be (except in hydrogen there
are) two electrons moving in circles of this size, but in different
planes. Similarly in the other cases. As we travel up the series of
total quantum numbers, more and more eccentric orbits become
possible; circles always remain possible, but the number of possible
types of ellipses increases by one at each step. When the total
quantum number is three (third ring), the ratio of the breadth to the
height may be 3 or 2 or 1. (The ratio 1 corresponds to a circle.)
When it is four (fourth ring), the ratio may be 4 or 3 or 2 or 1; and so
on. When the breadth is very much greater than the height, the orbit
is very eccentric. Bohr holds that in each ring the more eccentric
orbits are filled first, and the less eccentric later; he bases this view
on considerations of stability, because we always have to account for
the fact that the system of electrons does not break down more often
than it does.
In accordance with this principle, the outer (fifth) ring in xenon is
to have eight electrons divided into two groups of four, the first group
having the most eccentric orbits possible at this stage (length five
times the breadth), the second group having the next most eccentric
orbits (length five times half the breadth). For convenience, we are
speaking as if the orbits of the electrons were still ellipses and
circles, but of course this is only very roughly true when we have to
deal with a crowd of electrons which all have to dodge each other. It
is only true to the same degree that a person walking along Oxford
Street in the afternoon walks in a straight line; a straight line gives
the general direction of his movement, but he is always deviating
from it to get out of people’s way. Similarly the electrons, when they
come close together, repel each other violently, and shove each
other out of the smooth circular or elliptical course. But for general
descriptive purposes it is convenient to ignore this. What we can
hope to find out about the electrons is the quantum-numbers of their
orbits, because these determine the spectral lines. But we cannot
hope with our present mathematical knowledge to calculate exactly
the orbit of an electron with two given quantum numbers, although
we can see in a general way what sort of orbit it must be. This is to
be borne in mind when, for brevity, we speak of ellipses and circles
in connection with atoms that have a great many electrons.
Between xenon and niton comes the period of 32 elements, so
that in constructing a model of the niton atom in its normal state we
have to find room for 32 new electrons. This is done as follows: the
first three rings remain unchanged; the fourth is augmented to
contain 32 electrons, 8) in each group that previously held 6, and 8
in circular orbits; the fifth ring is increased from 8 electrons to 18, of
which there are 6 in each group that previously held 4, and 6 in a
new group of slightly eccentric orbits; the sixth ring contains 8
electrons, four moving in very eccentric orbits (length six times
breadth), the other four in less eccentric orbits (length three times
breadth). It would of course be possible to go on constructing models
of atoms with larger numbers of electrons, but after niton only six
more elements are known, and they are breaking down through
radio-activity. It seems therefore that the series stops where it does
because heavier atoms would not be stable. However, since new
elements are discovered from time to time, we cannot be sure that
no element heavier than uranium will ever be discovered. It would
therefore be rash to get to work to prove that such elements are
impossible.
It must not be supposed that the above models of complicated
atoms have the same degree of certainty as the theory of the
hydrogen atom. They are as yet in part speculative. But it is in the
highest degree probable that the models give a more or less correct
general picture of the way the electrons behave when the atoms in
question are in their most stable state. The emission of light and X-
rays occurs when one electron makes a transition towards the most
stable configuration, which is the one intended to be described by
the models we have been considering. Absorption, on the contrary,
takes place when there is a transition away from the most stable
configuration under the influence of outside forces.
[8] 0p. cit. p. 113
IX.
X-RAYS
EVERYBODY knows something about X-rays, because of their
use in medicine. Everybody knows that they can take a photograph
of the skeleton of a living person, and show the exact position of a
bullet lodged in the brain. But not everybody knows why this is so.
The reason is that the capacity of ordinary matter for stopping the
rays varies approximately as the fourth power of the atomic number
of the elements concerned. Thus carbon, whose atomic number is 6,
is 1296 times as effective as hydrogen in stopping X-rays; oxygen,
whose atomic number is 8, is 4096 times as effective as hydrogen;
nitrogen, whose atomic number is 7, is 2401 times as effective as
hydrogen; calcium, whose atomic number is 20, is 160,000 as
effective as hydrogen. The human body consists mainly of carbon,
oxygen, nitrogen and hydrogen, but the bones consist mainly of
calcium. Consequently X-rays which go through the rest of the body
easily are stopped by the bones with the result that we get a
photograph of the skeleton. Lead, of which the atomic number is 82,
is about 45 million times as effective as hydrogen and about 280
times as effective as calcium; so it no wonder that bullets come out
clearly in X-ray photographs.
In this chapter we shall be concerned with the physical nature of
X-rays, not with their application to medicine.
When swiftly moving electrons strike ordinary matter, which
happens in the case of so-called “cathode-rays” and “ -rays,” they
give rise to X-rays, which were discovered by Roentgen in 1895. It
was not known until 10 years later whether these rays were
longitudinal or transverse; then Barkla showed that they are
transverse, like light, and it is now known that they only differ from
light by their very much greater frequency. When a body is hit by X-
rays, it gives out X-rays itself, which are called “secondary X-rays.”
These in turn give rise to “tertiary X-rays.” The X-rays emitted by a
body are of two sorts, partly mixed and having no particular relation
to the body which emits them, partly characteristic of the body. It is
only the latter that can be said to have a spectrum belonging to the
substance of which the body is composed. The characteristic X-rays
emitted by an element, when analyzed, are found to consist of only a
few sharp lines, giving a very simple spectrum, which varies in a
perfectly regular manner with the atomic number. Unlike the optical
spectra, the X-ray spectra of different elements are closely similar,
with an increase of frequency in corresponding lines as the atomic
number increases. Broadly speaking, there are three lines the K, L,
and M lines as they are called, which make up the X-ray spectra; but
technical difficulties make it impossible to observe more than two in
one element. None can be observed in very light elements; the K-
line cannot be observed in very heavy elements, and the M-line can
only be observed in very heavy elements. But this is fully accounted
for by the difficulties of observation. X-ray spectra can only be
observed by means of suitable crystals, and the observations are
limited by the crystals that are available. There is every reason to
believe that, if we could invent suitable apparatus, we should find
that all three lines exist throughout the series of elements. They are,
in fact, roughly the same as the principal lines in the hydrogen
spectrum, which in that case fall in the optical region. The frequency
of each line increases very nearly as the square of the atomic
number, as we pass from one element to another. Each line
corresponds to a transition from one ring of electrons to another.
What may be supposed to happen when X-rays are excited is
closely similar to what happens when visible rays are excited. An
electron, passing in the cathode stream (which consists of swiftly
moving electrons), penetrates into the inner rings of electrons, and
manages to knock out one of the electrons in an inner ring. The
resulting state of affairs is unstable, and presently the outer rings
supply an electron to the vacant place in the inner ring. The result is
that the atom loses energy, which spreads out in a wave just like a
light-wave. But when heavy atoms are concerned, the great charge
on the nucleus causes the time of revolution of the nearer electrons
to be much less than in the case of hydrogen. Roughly speaking, the
number of revolutions per second in an orbit having given quantum
numbers will increase as the square of the atomic number of the
element concerned. It follows that this applies also to the difference
of energy between two different rings, and therefore (by Planck’s
principle) to the frequency of the corresponding spectral line; for, by
Planck’s principle, when an electron jumps from one ring to another,
the frequency of the corresponding spectral line is obtained by
dividing the loss of energy by . Thus roughly speaking we should
expect X-ray spectra to give the same lines for different elements,
only with frequencies that increase as the square of the atomic
number; and in fact this is what we do find. It is because the
frequency increases so fast as we go up the periodic table that the
inner rings of the later elements give lines in the X-ray spectrum
instead of the optical spectrum.
X-ray spectra do not occur, as a regular thing, in the form of
absorption spectra, and in this they differ from optical spectra. It is
worth while to understand why this is. When ordinary light of a
frequency which an element is capable of emitting, passes through a
gas composed of the element, the element absorbs all or some of it,
though light of other frequencies passes through freely. The reason
is that light corresponding to a spectral line of the element supplies
just the quantum required to move an electron from an inner to an
outer ring. The energy of the light-wave is used up in doing this. The
electrons involved in optical spectra are only those in the outer ring;
in a case of absorption, they are moved still further out into an empty
region, from which they may return at some later time in a case of
fluorescence. But in X-ray spectra the electrons concerned are those
in the inner rings. When one of these is fetched out by a passing
electron, it cannot settle in an outer ring, because the outer rings are
already occupied by electrons. Each of the electrons that it passes
on the way out repels it, and gives it (so to speak) an extra shove.
The result is that it cannot rest in an outer ring, unless by some
exceptional stroke of luck, but has to go wandering off into space.
The energy involved in such a journey is not tied down to certain
amounts, like the energy involved in passing from one possible orbit
to another. Its place in the inside is taken by one of the outer
electrons, while the outer ring remains one electron short until it has
a chance to help itself from some other atom or by means of some
free electron.
We saw in Chapter II that what is called the atomic number of an
element is more important than the atomic weight. The atomic
number represents a fundamental property of the atom, namely the
positive charge on the nucleus; an atom with such-and-such an
atomic number has a charge on the nucleus which is such-and-such
a number of times the charge on the hydrogen nucleus, or the
opposite charge on the electron. It follows that an atom in its neutral
state, i.e. when it is unelectrified, has a number of electrons round
the nucleus which is the same as its atomic number. But atomic
weight had the prestige of tradition as the characteristic by which
atoms should be arranged in a series, and the few cases (four in all)
where the periodic table inverts the order of atomic weights were felt
to be annoying. X-ray spectra, however, have given a decisive
victory to the classification by atomic numbers. We saw that different
elements have very similar X-ray spectra, except that the
frequencies of corresponding lines increase as the square of the
atomic number (approximately) as we pass from element to element.
This law is fulfilled just as exactly in cases in which the atomic weight
would invert the order as it is in other cases. This is what theory
would lead us to expect, if each step up the periodic series makes an
increase of one in the positive charge on the nucleus; and on any
other hypothesis it seems scarcely possible. The X-ray spectra,
therefore, afford a very powerful argument in favour of Rutherford’s
general conception of the way atoms are constructed, as well as in
favour of the theory of quanta as the explanation of spectral lines.
The law of X-ray spectra is the same as the law of optical
spectra, namely that, if is the frequency of a line in the spectrum
(i.e. the number of waves per second), and is Planck’s quantum,
multiplied by is the energy lost by the atom in the transition which
gives rise to the line in question. There are three principal lines in X-
ray spectra, called, respectively, the K, L, and M lines. For any given
atom, the K line has the greatest frequency and the M line the least.
The K line represents a transition by an outer electron to the inmost
ring, the L line represents a transition to the second ring, and the M
line to the third. Each line, closely examined, is found not to be
single, but to consist of several neighbouring lines corresponding to
different starting-points for the electron, but all having the same end-
point. Since we can observe the frequencies of the different lines, we
can infer from the X-ray spectra what are the differences between
energies of electrons in different rings. Everything confirms the
theory of the structure of atoms which was suggested by the
hydrogen spectrum and the facts upon which the periodic table is
based.
Another very instructive fact which emerges from the study of X-
ray spectra concerns the “fine structure,” of which, as we saw in
Chapter VII, the explanation is to be sought in the substitution of
Einstein’s principles for Newton’s. In the case of hydrogen, the
different lines of the five structures are so near together that
accurate measurements of their distance apart are very difficult. But
the distance between them, as we pass to later elements, ought to
increase roughly as the fourth power of the atomic number, so that
measurements become much easier for high atomic numbers. On
this point, the empirical evidence obtained from X-ray spectra agrees
closely with the theory developed by Sommerfeld. This theory
depended, it will be remembered, on the fact that, according to the
doctrine of relativity, an electron which moves in an eccentric orbit
has to go rather more than once round its orbit before getting back to
the point at which it is nearest to the nucleus. The X-ray
observations establish this theory much more firmly than is possible
by the help of optical spectra alone.
It must be understood that, so far as quantum numbers are
concerned, the actual orbits of electrons in atoms that have many
rings are the same as the possible orbits of the one electron in the
hydrogen atom. The partial dimensions are not the same; the radius
of the minimum circle, roughly speaking, varies inversely as the
atomic number, so that in uranium it might be expected to be about
92 times smaller than in hydrogen. The velocity of the inside electron
in its minimum orbit varies roughly as the atomic number, and the
number of revolutions per second roughly as the square of the
atomic number. But the radius multiplied by the velocity is
independent of the atomic number. To a first approximation, the
mass of the electron multiplied by its velocity multiplied by the
circumference of its orbit (when it moves in a circle) will always be
in the inmost ring, in the second, in the third, and so on. The
important thing to know about an orbit is what are its quantum
numbers, i.e. what multiples of are involved. This is just as true in
regard to X-ray spectra as in regard to optical spectra.
It will be seen that the electron in a hydrogen atom has, in a
certain sense, more freedom than one of the many electrons in
heavier atoms. There is less overcrowding and more room for
migration. Under the influence of incident light, the hydrogen electron
can move out to a larger orbit; presently, when the light is gone, it
can return again. But an electron in one of the inner rings of a heavy
atom cannot remove at will to another orbit. If it is forced to leave its
orbit, it has to leave the atom altogether. The other paths which the
quantum-theory permits are occupied, until we get to a considerable
distance from the nucleus, whereas in hydrogen they are vacant.
Paths that have large quantum numbers, though possible in theory,
cannot occur in practice, at any rate in the laboratory, because they
are so large that they would cause the electron to get into the region
of other atoms. In certain nebulæ, where matter is almost
inconceivably tenuous, the spectrum shows that electrons can travel
round hydrogen nuclei in orbits whose total quantum number is as
large as 30. But even in the nearest approach to a vacuum that we
can create artificially there are still too many atoms for such large
orbits to be possible. That is why there is a limit, in practice, to the
number of lines in the spectrum of an element, although, in theory,
the number of possible lines is infinite.
X.
RADIO-ACTIVITY
SHORTLY after the discovery of X-rays, the world was startled by
the discovery of radio-activity. The discoverer was the French
physicist Becquerel. What first led him into the discovery was the
fact that a very sensitive photographic plate was put away in a dark
cupboard with a piece of uranium, and was found afterwards to have
photographed the uranium in spite of the complete darkness. On
investigating this remarkable phenomenon, Becquerel found that the
rays which produced the photograph came from the uranium itself,
and did not depend upon any previous exposure to light, as is the
case with fluorescent substances. Uranium was found to be able to
produce rays out of itself apparently indefinitely, and these rays were
very powerful. At first the discovery was upsetting. It seemed to go
against the conservation of energy, because the energy radiated by
the uranium was to all appearances created out of nothing. This
turned out not to be the case; the energy, as we shall see, comes out
of the nucleus of the uranium atom. But something equally
astonishing was found to happen: in radio-activity one element turns
into another. Throughout the middle ages, chemists had tried in vain
to transmute elements; the impossibility of doing so seemed to be
one of the most certain results of chemistry. This has proved to be a
mistake; in radio-activity atoms of one element throw out particles
from the nucleus and become atoms of another element.
Radio-activity is associated in popular thought with radium, but in
fact the discovery of radium was caused by that of radio-activity, not
vice versa. Monsieur and Madame Curie, who were working under
Becquerel, observed that pitchblende, from which uranium is
obtained, is more radio-active than pure uranium. They inferred that
it must contain some very radio-active constituent, much more active
than uranium. The search finally led Madame Curie to the new
element radium. Since then, a number of new radio-active elements
have been discovered. Sommerfeld (op. cit. p. 56) enumerates forty
of them, and there is no reason to suppose the list complete.
Before going into the process by which a radio-active atom
disintegrates, let us consider the rate at which different radio-active
substances decay. The atoms of radio-active substances are like a
population which has a certain death-rate; in a given time, a given
percentage of them die, and are born again as atoms of a different
substance. But they are not endowed, like human beings, with a
certain span of life. Some live a very short time, and some a very
long time; the old ones are no more liable to death than the young
ones. So far as we can tell, any population of atoms of a given radio-
active element will lose a certain proportion in a given time, quite
regardless of the question whether the atoms are old or young. It is
customary to measure the rapidity of disintegration by the length of
time that it takes for half of a given collection of atoms to die. This
period varies enormously from one substance to another. Uranium,
which is only very slightly radio-active, takes 4500 million years, in its
most stable form, for half its atoms to decay. The first product of their
disintegration is a substance of which half decays in just under 24
days; this breaks down into a substance for which the period is less
than a minute and a quarter; the next substance has an uncertain
period, estimated at two million years; at this stage, two different
products may be formed, one of which in turn becomes radium, of
which the period is 1580 years, while the other becomes
protactinium, of which the period is 12000 years, the next product
being actinium. Radium gives rise to the inert gas niton (also called
radium-emanation), for which the period is a little less than 4 days.
The end of both series is a form of lead, which, so far as we know, is
not radio-active at all. There is a separate family starting from
thorium (which has the atomic number 90); this also ends in a form
of lead (atomic number 82). Some radio-active products decay so
fast that half of them die in a tiny fraction of a second. The shortest
time is estimated at a hundred-thousandth of a millionth of a second,
but this is more or less conjectural.
It must not be supposed that, if half the atoms of a substance die
in a certain period, all will die in double that period. After half are
dead, only half as many are left to die; of these half will die in the
next period. Thus to take radium: Given a certain number of atoms of
radium, half decay in 1580 years, and half are left at the end of that
time. In the next 1580 years, half of that half will decay, and a quarter
of the original number will be left; at the end of a third period of 1580
years, an eighth of the original number will be left, and so on.
The exact circumstances which make a radio-active atom break
up are not known; we only know statistical averages. We have to
suppose that the nucleus is in more or less unstable equilibrium, and
may be disintegrated at any moment by some chance which comes,
on the average, to a certain proportion of the atoms in any given
period. We are in the same position as we should be in with human
populations if we could observe the death-rate, but were quite
unable to observe the various diseases of which people die. One
point in which radio-active substances differ from human populations
is that, at the beginning of the series, we have two substances,
uranium and thorium, which sometimes die but are never born, so far
as our knowledge extends, while at the other end we have three
kinds of lead, which are born but apparently never die. Thus the
heaviest elements in the periodic series are continually breaking
down, and no process is known by which they can be built up again.
There may at one time have been many elements with a structure
more complex than that of uranium, which have broken down so that
whatever traces of them are left in the universe have not been
discovered by us. Radio-activity is one of those processes of
degeneration (in a certain technical sense) to which no converse
process of regeneration is known. We see complex atoms breaking
up, and it is natural to suppose that there are (or have been)
circumstances under which they are put together out of simpler
atoms. But no trace of any such circumstances has been discovered.
In this respect, as in some others, the universe seems like a clock
running down, with no mechanism for winding it up again. All the
uranium in the world is breaking down, and we know of no source
from which new uranium can come. Under these circumstances it
seems strange that there should be any uranium. But if, like some
insects, we lived only for a single spring day, we should think it
strange that there should be any ice in the world, since we should
find it always melting and never being formed. Perhaps the universe
has long cycles of alternate winding-up and running-down; if so, we
are in the part of the cycle in which the universe (or at least our
portion of it) runs down. Everything pleasant is associated with this
running down, because it is only this process that liberates energy
for the purposes that we regard as useful. It is time, however, to
return from these speculations to the mechanism of radio-activity.
When a substance is radio-active, it emits one or more of three
kinds of rays, which are called respectively -rays, -rays and -
rays. It has been found that -rays consist of particles, each of
which is the nucleus of a helium atom; -rays also consist of
particles, but in this case they are electrons; -rays do not consist of
particles, but are of the nature of light-waves, only with a very much
higher frequency, higher even (sometimes 20 times higher) than that
of X-rays. We need not further consider the -rays, which do not
concern the transformations of the nucleus. It is the -rays and -
rays that produce the results in which we are interested. We will
begin with the -rays.
The -rays are compounded of -particles which are nuclei of
helium, and thus have a positive charge double that of the hydrogen
nucleus, and a mass (or weight) four times that of the hydrogen
nucleus. They are shot out with a velocity which may reach to nearly
a tenth of the velocity of light. Since they have a double positive
charge, they attract electrons, and therefore it is not surprising that
they tear away electrons from any atoms they may meet, and so
cause the matter on their path to become positively electrified. When
they have captured the two electrons that they desire, they become
ordinary unelectrified helium atoms. Being small and heavy and
swift, they have great power of penetration through ordinary matter.
They come from the nucleus of the atom, which thus loses two units
of positive electricity, and therefore is moved down two places in the
periodic series. At the same time the atomic weight diminishes by
four, because the helium nucleus is four times as heavy as the
hydrogen nucleus. If the -particle left the electrons of the atom
undisturbed, there would be an excess of two electrons in the atom
after its departure; but in fact it generally tears away at least two
electrons as it goes. If it loosens more than two, the atom will
become positively electrified until it can annex free electrons from its
surroundings. In the end it settles down into an ordinary unelectrified
atom of an element whose atomic number is less by two than that of
the original atom. Thus radium, which has the atomic number 88,
sends out -particles and becomes niton, with atomic number 86.
A substance may, however, be radio-active by sending out -rays
instead of -rays. Some substances send out one kind, some the
other; a very few can send out either, and can thus give rise to two
different products of disintegration. The -rays are simply very swiftly
moving electrons, the most swiftly moving matter known to us; they
attain velocities which reach very nearly the velocity of light. They
have been known to travel at the rate of about 297,000 kilometres a
second, while light covers 300,000 kilometres a second. (A kilometre
is about five-eighths of a mile.) The velocity of light is a theoretical
limit, which cannot be attained by anything material, so that we have
in -particles velocities about as great as we can ever expect to find
in nature.
Since radio-activity always gives rise to a new element, and since
the element is determined by its nucleus, the -particles as well as
the -particles must come out of the nucleus. Since the -particles
are electrons, this shows that the nucleus of a radio-active element
must contain electrons. This is to be expected in all elements,
because the atomic weight increases about twice as fast as the
atomic number, so that the atomic number (which is the net charge
in the nucleus) must be the result of a number of hydrogen nuclei
about twice as great as the atomic number and a number of
electrons about equal to the atomic number. This is not always
exactly true, but at any rate it is likely to be a first approximation.
There is therefore no reason to be surprised by the fact that
electrons come out of the nuclei of radio-active elements.
When an electron comes out of the nucleus of an atom, it
increases the net charge in the nucleus by one, and therefore
increases the atomic number by one. Thus it is possible for the
atomic number to be increased by the loss of something from the
nucleus, provided what is lost is an electron. But although the atomic
number is increased, the atomic weight is not. The electron weighs
so little that its loss makes no appreciable difference to the atomic
weight; moreover, since the net charge on the nucleus is increased
by one, the atom will secure another planetary electron as soon as
possible. Thus in the end the effect of a radio-active change by the
emission of -particles ought to be to leave the atomic weight
unchanged while increasing the atomic number by one. The result of
one emission of -particles followed by two of -particles is thus to
deprive the nucleus of a helium nucleus and two electrons, without,
in the end, changing the atomic number. Thus uranium has two very
stable forms, called uranium I and uranium II. Uranium I is the great-
grandfather of uranium II. Uranium I, by means of -rays, gives rise
to uranium , of which half decays in little less than 24 days.
Uranium gives rise to uranium by means of -rays; half of
Uranium decays in just over a minute. Uranium , by means of
-rays again, gives rise to uranium II. Uranium I and II both have
atomic number 92; uranium has atomic number 90, and uranium
has atomic number 91. Thus the two stable forms of uranium
have the same atomic number although they have different atomic
weights (238 and 234). Again, the various radio-active series all end
in some form of lead; the three forms are called respectively radium-
lead, actinium-lead, and thorium-lead, after their respective
ancestors. These all have the same atomic number as ordinary lead
(82), but their atomic weights differ. Ordinary lead has the atomic
weight 207.2; radium-lead, 206.0; thorium-lead, 207.9. It is probable,
however, that ordinary lead is a mixture of two or more kinds of lead,
and perhaps this is also the case with what counts as thorium-lead.
The reason for this view is that it is now probable that every perfectly
pure element has an atomic weight which is almost exactly an
integer.
When two elements have the same atomic number, they are
called “isotopes.” Apart from radio-activity, the only discoverable
property in which isotopes differ is atomic weight. They have the
same net charge in the nucleus, and therefore the same number of
planetary electrons, and the same possible orbits of the electrons.
Consequently their chemical properties are the same, their optical
spectra are the same, and even their X-ray spectra are the same. All
this is as it should be according to theory. It is no wonder that the
existence of isotopes remained so long unknown. They first became
known through observations of radio-active products. But it has lately
become known, through the work of F. W. Aston, that there are many
isotopes in regions of the periodic table where radio-activity can
hardly be supposed to take place. Aston found means, in a gas
containing atoms of different weights, by which he separated the
heavier and lighter atoms; he thus obtained two pure gases out of a
mixture which had hitherto been wrongly supposed to be pure. The
result was to show that atomic weights are very approximately
integers in many cases in which this was thought not to be the case.
Thus neon, which has the atomic weight 20.2, is found to consist of a
mixture of two gases, one having atomic weight 20, the other 22.
Chlorine, which has the atomic weight 35.46, is a mixture of two
kinds having atomic weights 35 and 37 respectively. Krypton turns
out to consist of as many as six isotopes; xenon, of seven, two of
which however are more or less doubtful.
It is a curious fact that in radio-activity the particles thrown off by
the nucleus consist always either of electrons or of helium nuclei.
Not only do we never find nuclei of heavier elements than helium
thrown off, but we never find hydrogen nuclei. This is surprising, and
as yet no adequate explanation has been found. What is to be said
on this subject belongs to our next chapter. The energy displayed in
radio-activity is colossal. It shows that within the nucleus of the atom
enormous forces are concentrated. This is not surprising when we
consider that an atom as a whole is very minute, and, that the
nucleus of an atom is enormously smaller than the whole atom; that
within the nucleus of uranium about 238 hydrogen nuclei and about
146 electrons are packed together; and that these attract or repel
each other with a force which increases as the square of the
distance diminishes. The energy involved is shown by the incredible
swiftness of -particles and -particles. To make a body move with
the velocity of light would require a strictly infinite amount of energy,
and is therefore impossible, not only in practice but in theory.
Therefore to make ever so tiny a body as an electron move with a
velocity 99 per cent, of that of light requires a very great amount of
energy. Before the theory of relativity, the kinetic energy of a moving
particle was taken to be half the mass multiplied by the square of the
velocity; now-a-days, this has to be changed to allow for the increase
of mass with velocity. In the case of a velocity 99 per cent, of that of
light, the mass is increased about seven-fold, and the kinetic energy
in the same proportion. The energy of the -particles, owing to their
greater mass, is even more than that of the -particles. As
Sommerfeld says:
“The sources of energy which are thus disclosed to the external
world are of quite a different order of magnitude from the energies of
other physical and chemical processes. They bear witness what
powerful forces are active in the interior of atoms (the nuclei). This
world of the interior of the atom is in general closed to the outer
world; it is not influenced by conditions of temperature and pressure
which hold outside; it is ruled by the law of probability, of
spontaneous chance which cannot be influenced. Only exceptionally
a door opens, which leads from the inner world of the atom into the
outer world; the or -rays which come out when this happens are
envoys from a world which is otherwise closed to us.”[9]
In the next chapter, we shall give an outline of the few facts which
can be ascertained about this small fierce world in the nucleus of the
atom. Optical spectra have told us about the outer electrons, X-rays
about the inner rings of electrons; about the nucleus itself we know
very little except what can be learnt from radio-activity.
[9] Op. cit. p. 109.
XI.
THE STRUCTURE OF NUCLEI
THE facts known about the structure of nuclei are not sufficient to
enable us to be very definite as to the way in which they are built up.
Let us begin by setting forth the facts, and then see what is to be
inferred in the way of theory.
The most important facts for our purpose are those of radio-
activity, which we consider in the previous chapter. We know from
these facts that the nuclei of certain heavy atoms contain helium
nuclei and electrons; that the loss of a helium nucleus diminishes the
atomic number by two and the atomic weight by four, while the loss of
an electron increases the atomic number by one and has no
appreciable effect upon the atomic weight. We know also that it is
possible for several different elements to exist with the same atomic
number, but different atomic weights; in radio-activity these can be
seen in process of formation, but they are found to exist among lighter
atoms which show no discoverable trace of radio-activity. It is possible
that radio-activity, in a very slight degree, exists among elements
which appear to us perfectly stable; the amount of it may be so small
that we cannot hope to detect it. This may be the reason for the
existence of isotopes; but there is at present no positive evidence in
favour of this view.
Another fact of immense importance has been experimentally
established by Rutherford. Some elements, but not others, when
submitted to a very intense bombardment by -particles, give off rays
which are found to be hydrogen. The element in which this result has
been established with the greatest certainty is nitrogen (atomic
number 17). But it is also fairly certain as regards a number of
elements—broadly speaking, those which have odd atomic numbers.
Rutherford is led to the conclusion that hydrogen nuclei can be
detached from the nuclei of other elements, unless their atomic weight
is a multiple of 4, which is the atomic weight of helium. This, together
with the fact that in radio-activity helium nuclei, but not hydrogen
nuclei, are thrown off, leads irresistibly to the view that every nucleus
is composed, as far as it can be, of helium nuclei. Thus, phosphorus,
which has the atomic weight 31, may be supposed to consist of seven
helium nuclei, each having atomic weight 4, and three hydrogen
nuclei, each having atomic weight 1. The three hydrogen nuclei could,
with luck, be detached by bombardment, but the helium nuclei are to
be regarded as incapable of being destroyed by an -particle, so that
if they are detached they are detached as wholes. Consequently,
when the atomic weight divides by 4, the nucleus can be supposed to
consist wholly of helium nuclei, and there will be no odd hydrogen
nuclei to be broken off. It is impossible to know whether Rutherford’s
bombardment breaks off helium nuclei, because they could not be
distinguished from his projectiles, which are also helium nuclei.
The atomic weight which we have hitherto found less important
than the atomic number, is of course of the greatest significance when
we are considering the structure of the nucleus. The weight of an
electron is so small as to be negligible in comparison with that of the
nucleus, even in the case of hydrogen, so that the weight of the atom
is, to all intents and purposes, the weight of the nucleus. If we take
the weight of the helium atom to be 4, the weight of the hydrogen
atom is just over 1. The explanation of the fact that it is not exactly 1
is very interesting, and we shall return to it shortly. The weight of
every other atom, in view of Aston’s work on isotopes, is apparently a
whole number, as nearly as our measurements can determine.
Roughly speaking, the atomic weight is about double the atomic
number. This is true exactly in the following cases (making, in some
cases, inferences allowed by Aston’s work):
Helium Carbon Oxygen Neon Sulphur Calcium
Atomic
2 6 8 10 16 20
number
Atomic
4 12 16 20 32 40
weight

You might also like