100% found this document useful (4 votes)
135 views

Design Patterns in C#: A Hands-On Guide With Real-World Examples 2nd Edition Vaskaran Sarcar 2024 Scribd Download

Examples

Uploaded by

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

Design Patterns in C#: A Hands-On Guide With Real-World Examples 2nd Edition Vaskaran Sarcar 2024 Scribd Download

Examples

Uploaded by

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

Download the full version of the textbook now at textbookfull.

com

Design Patterns in C#: A Hands-on Guide with


Real-world Examples 2nd Edition Vaskaran
Sarcar

https://textbookfull.com/product/design-patterns-
in-c-a-hands-on-guide-with-real-world-
examples-2nd-edition-vaskaran-sarcar/

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


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

Java Design Patterns: A Hands-On Experience with Real-


World Examples 2nd Edition Vaskaran Sarcar

https://textbookfull.com/product/java-design-patterns-a-hands-on-
experience-with-real-world-examples-2nd-edition-vaskaran-sarcar/

textbookfull.com

Java Design Patterns A tour of 23 gang of four design


patterns in Java 1st Edition Vaskaran Sarcar

https://textbookfull.com/product/java-design-patterns-a-tour-
of-23-gang-of-four-design-patterns-in-java-1st-edition-vaskaran-
sarcar/
textbookfull.com

Java design patterns a tour of 23 gang of four design


patterns in Java 1st Edition Vaskaran Sarcar

https://textbookfull.com/product/java-design-patterns-a-tour-
of-23-gang-of-four-design-patterns-in-java-1st-edition-vaskaran-
sarcar-2/
textbookfull.com

The War on Kids How American Juvenile Justice Lost Its Way
Cara H. Drinan

https://textbookfull.com/product/the-war-on-kids-how-american-
juvenile-justice-lost-its-way-cara-h-drinan/

textbookfull.com
Principles of Tensor Calculus Tensor Calculus First
Edition Taha Sochi

https://textbookfull.com/product/principles-of-tensor-calculus-tensor-
calculus-first-edition-taha-sochi/

textbookfull.com

Directing for Animation Everything You Didn t Learn in Art


School With Interviews by Legendary Animation Directors
1st Edition Tony Bancroft
https://textbookfull.com/product/directing-for-animation-everything-
you-didn-t-learn-in-art-school-with-interviews-by-legendary-animation-
directors-1st-edition-tony-bancroft/
textbookfull.com

The Boundary Element Method for Engineers and Scientists


Theory and Applications 2nd Edition John T. Katsikadelis

https://textbookfull.com/product/the-boundary-element-method-for-
engineers-and-scientists-theory-and-applications-2nd-edition-john-t-
katsikadelis/
textbookfull.com

The Oxford Handbook of Health Care Management 1st Edition


Ewan Ferlie

https://textbookfull.com/product/the-oxford-handbook-of-health-care-
management-1st-edition-ewan-ferlie/

textbookfull.com

Desires for Reality Radicalism and Revolution in Western


European Film 1st Edition Benjamin Halligan

https://textbookfull.com/product/desires-for-reality-radicalism-and-
revolution-in-western-european-film-1st-edition-benjamin-halligan/

textbookfull.com
Internal Gravity Waves in the Shallow Seas 1st Edition
Stanis■aw R. Massel (Auth.)

https://textbookfull.com/product/internal-gravity-waves-in-the-
shallow-seas-1st-edition-stanislaw-r-massel-auth/

textbookfull.com
Vaskaran Sarcar

Design Patterns in C#
A Hands-on Guide with Real-world Examples
2nd ed.

Foreword by Priya Shimanthoor


Vaskaran Sarcar
Garia, Kolkata, West Bengal, India

Any source code or other supplementary material referenced by the


author in this book is available to readers on GitHub via the book’s
product page, located at www.​apress.​com/​978-1-4842-6061-6. For
more detailed information, please visit http://​www.​apress.​com/​
source-code.

ISBN 978-1-4842-6061-6 e-ISBN 978-1-4842-6062-3


https://doi.org/10.1007/978-1-4842-6062-3

© Vaskaran Sarcar 2020

This work is subject to copyright. All rights are reserved by the


Publisher, whether the whole or part of the material is concerned,
specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other
physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

Distributed to the book trade worldwide by Springer Science+Business


Media New York, 233 Spring Street, 6th Floor, New York, NY 10013.
Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-
ny@springer-sbm.com, or visit www.springeronline.com. Apress Media,
LLC is a California LLC and the sole member (owner) is Springer
Science + Business Media Finance Inc (SSBM Finance Inc). SSBM
Finance Inc is a Delaware corporation.
This book is dedicated to all the unsung heroes and volunteers who are
continuously fighting at the frontlines of the COVID-19 battle to save
humanity and this beautiful world.
Foreword
Written programs need to be flexible, easily maintainable, and reusable.
How do we know that a program is as elegant as it can be? The answer
is that a successful programmer must use two primary tools: a good
programming language (here it is C#) and design patterns.
When working on a problem, it is unusual to tackle it by inventing a
new solution that is completely dissimilar from the existing ones. One
often recalls a similar problem and reuses the essence of its solution to
solve the new problem. This kind of thinking in problem-solving is
common to many different domains, such as software engineering.
Design patterns are important building blocks for designing and
modeling applications on all platforms. Design patterns help us
understand, discuss, and reuse applications on a specific platform. The
most common reasons for studying patterns are the reuse of solutions
and the establishment of common terminology. By reusing established
designs, a developer gets a headstart on the problem and avoids
common mistakes. The benefit of learning from the experience of
others’ results is that the developer does not have to reinvent solutions
for recurring problems. The other reason for using patterns is that
common terminology brings a common base of vocabulary and
viewpoint of the problem for developers. It provides a common point of
reference during the analysis and design phase of a project.
Vaskaran Sarcar, who has worked with me for several years now, has
been a Most Valuable Professional over the years in C#. He is
enthusiastic, knowledgeable, talented, curious, analytical, and a teacher
of others. He gets to the root of any problem he is trying to resolve in a
well-defined and organized way. He is very committed and works hard
until he gets to the solution. He gets involved and is deeply focused
while working on any problem.
And that is also why I am excited about this book. The book brings
the frequently complex world of design patterns into sharp focus with
the approach used: the definition, the core concept, a real-life example,
a computer-world example, and a sample program with output. In this
edition, Vaskaran has provided asynchronous programming patterns
usage using C#.
I look forward to seeing where developers can go with this easy
approach and language, and the useful patterns they can build into the
infrastructure of other languages.

—Priya Shimanthoor

Test Architect

Managed Print Services Team

Bangalore, India

June 3, 2020
Preface
Welcome to your journey through Design Patterns in C# Second Edition.
This book is an introductory guide to the design patterns that you
want to use in C#. You probably know that the concept of design
patterns became extremely popular with the Gang of Four’s famous
book Design Patterns: Elements of Reusable Object-Oriented Software
(Addison-Wesley, 1994). That book was primarily focused on C++, but
these concepts still apply in today’s programming world.
C# had its first major release (C# 2.0) in 2005. Since then, it has
become rich with new features and is now a popular programming
language. In 2015, I wrote the book Design Patterns in C#: Computer
Science Interview Series. In 2018, Design Patterns in C#: A Hands-on
Guide with Real-World Examples was born. In these books, my core
intention was to implement each of the 23 Gang of Four (GoF) design
patterns with C# implementations. I wanted to present each pattern
with simple examples. One thing was always on my mind when writing:
I wanted to use the most basic constructs of C# so that the code would
be compatible with both the upcoming version and the legacy version
of C#. I have found this method helpful in the world of programming.
In the last few years, I got a lot of constructive feedback from my
readers. This fully revised and updated version was created with that
feedback in mind. I took the opportunity to update the formatting and
correct some typos from the previous version of the book and add new
content to this new edition. In this book, I focus on another important
area; I call it the “doubt-clearing sessions.” I knew that if I could add
more information, such as alternative ways to write the
implementations, the pros and cons of the patterns, when to choose one
approach over another, and so on, readers would find this book even
more helpful.
In this updated version of the original, the “Q&A Session” sections in
each chapter are further enhanced. These sessions can help you learn
about each pattern in more depth. In addition, you see more code
explanations for all the programs, and in many cases, the programs are
further simplified, and new programs are added for the patterns. To
learn about the most important enhancements in this edition, refer to
Appendix D at the end of this book.
How Is the Book Organized?
This book has three major parts.
Part I consists of the first 23 chapters, which discusses and
implements all the GoF design patterns.
In the world of programming, there is no shortage of patterns, and
each has its own significance. Part II discusses some additional design
patterns (Simple Factory, Null Object, and MVC) that are equally
important in today’s world of programming. In this second edition, I
dropped discussions of memory leaks, but I include several patterns
from asynchronous programming. In modern applications, these
patterns are very common.
Part III discusses the criticism of design patterns and overviews
antipatterns, which are important when you implement the concepts of
design patterns in your applications.
Each chapter is divided into six major parts: a definition (which is
basically the intent in the GoF book), a core concept, a real-world
example, a computer/coding–world example, a sample program with
various output, and the “Q&A Session” section. These sections help you
learn about each pattern in more depth.
Please remember that you have just started this journey. As you
learn the concepts, try to write your own code; only then will you
master an area.
You will be able to download all the book’s source code from the
Apress website. I plan to maintain the errata, and if necessary, I will
also make updates and announcements there.

Prerequisite Knowledge
This book’s target readers are those who are familiar with C# basic
language constructs and pure object-oriented concepts, like
polymorphism, inheritance, abstraction, encapsulation, and most
importantly, how to compile or run a C# application in Visual Studio.
This book does not invest time in easily available topics, such as how to
install Visual Studio on your system, or how to write a “Hello World”
program in C#, or how can you use an if-else statement or a while loop,
and so forth. This book was written using the most basic features of C#,
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
so for most of the programs in this book, you do not need to be familiar
with C# advanced topics. The examples are simple and straightforward.
I believe that the examples are written in such a way that even if you
are familiar with another popular language, such as Java or C++, you
can still easily grasp the concepts in this book.
Who Is This Book For?
In short, you want this book if your answer is “yes” to all of the
following questions.
Are you familiar with basic constructs in C# and object-oriented
concepts like polymorphism, inheritance, abstraction, and
encapsulation?
Do you know how to set up your coding environment?
Do you want to explore the design patterns in C# step by step?
Do you want to explore GoF design patterns?
Are you interested in learning about Simple Factory, Null Object,
MVC, and asynchronous programming patterns?
Do you want to know how the core constructs of C# work behind
these patterns?
You probably don’t want this book if the answer is “yes” to any of
the following questions.
Are you new to C#?
Are you looking for advanced concepts in C#, excluding the topics
mentioned previously?
Are you interested in exploring a book where the focus is on GoF
patterns (and the patterns listed in the previous section)?
Do you dislike a book that uses Q&A sessions?
“I do not like Windows, Visual Studio, and .NET Core. I want to learn
and use C# without them.” Is this statement true for you?

Guidelines for Using This Book


Here are some suggestions to help you use this book more effectively.
I assume that you have some knowledge of GoF design patterns. If
you are new to design patterns, I suggest you quickly go through
Appendix A, which helps you become familiar with the basic concepts
of design patterns.
If you are confident with what Appendix A covers, you can start with
any part of the book. But I suggest you go through the chapters
sequentially. The reason is that some fundamental design techniques
may have been discussed in the Q&A Session of a previous chapter,
and I do not repeat those techniques in later chapters.
There is only one exception to the previous suggestion. There are
three factory patterns: Simple Factory, Factory Method, and Abstract
Factory. These three patterns are closely related, but the Simple
Factory pattern does not directly fall into the GoF design catalog, so it
appears in Part II of the book. Therefore, of the three patterns, I
suggest that you begin with the Simple Factory.
Except for a few programs in Chapter 27, all programs were executed
and tested in .NET Core 3.1. The remaining programs were executed
in .NET Framework 4.7.2 because .NET Core doesn’t support certain
functionalities. The specific reasons are discussed in Chapter 27.
I used Visual Studio Community edition 2019 (version 16.3.9) in a
Windows 10 environment. This Community edition is free. If you do
not use the Windows operating system, you can use Visual Studio
Code, which is a source code editor developed by Microsoft to
support Windows, Linux, or macOS operating systems. This
multiplatform IDE is free. When I started writing this book, I used the
latest versions of C# available. In this context, it is useful to know
that the C# language version is automatically selected based on your
project’s target framework(s) so that you always have the highest
compatible version by default. In the most recent versions, Visual
Studio doesn’t support the UI to change the value, but you can change
it by editing the .csproj file. The Visual Studio 2019 compiler and the
.NET Core 3.0 SDK follow this rule. Therefore, you can simply say that
when your target framework is .NET Core 3.x (or newer), you’ll get
C# 8.0(and higher) by default. If you are interested in C# language
versioning, go to https://docs.microsoft.com/en-
us/dotnet/csharp/language-reference/configure-
language-version .
Version updates are continuous, but I strongly believe that the
versions should not matter much to you because I use the
fundamental constructs of C# in this book. The code should execute
smoothly in the upcoming versions of C#/Visual Studio as well.
Although I believe that the results should not vary in other
environments, you know the nature of a software-it can be naughty.
So, I recommend that if you want to see the same output, it is best to
mimic the same environment.
You can download and install Visual Studio IDE from
https://visualstudio.microsoft.com/downloads/ . You
should see what’s shown in Figure P-1.

Figure P-1 Download link for Visual Studio 2019 and Visual Studio Code

Note At the time of this writing, this link works fine, and the
information is correct. But the link and policies may change in the
future.

I installed the class designer component in Visual Studio 2019 to


draw class diagrams for my programs. I needed to edit some of these
diagrams for better readability (for example, to show composition,
aggregation, etc.). I added some valuable notes to these diagrams so
that you can better understand them. These additional efforts were
required because UML designers are removed in Visual Studio 2017.
For more information, visit
https://blogs.msdn.microsoft.com/devops/2016/10/1
4/uml-designers-have-been-removed-layer-designer-
now-supports-live-architectural-analysis/ .
In the first edition of this book, I drew a few directed graph
documents (DAGs) using an older version of Visual Studio (Ultimate
2013). To make the book more concise, the DAGs were dropped for
the second edition. Now there are modified class diagrams and
additional code explanations, which are sufficient for you to
understand the code.

Conventions Used in This Book


First, in many places, I use the word his. Please treat it as his or her,
whichever applies to you.
Second, the output and code in this book follow the same font and
structure. To draw your attention, I use bold in some places. For
example, consider the following output fragment (from Chapter 21) and
the lines in bold.

...
[Joseph] posts: How are you? Last message posted
15-05-2020 11:30:52
Amit has received a message from Joseph
saying: How are you?

An outsider named Todd of


[MediatorPatternModifiedDemo.Friend] is trying to
send a message to Joseph.

Amit, at this moment, you cannot send a message to


Todd because he is either not a registered user,
or he is currently offline.

An outsider named Jack of


[MediatorPatternModifiedDemo.Stranger] is trying
to send a message to Joseph.
Sohel is going offline now.
...

Final Words
You are showing interest in a subject that can assist you throughout
your career. If you are a developer/programmer, you need these
concepts. If you are an architect at a software company, you need these
concepts. If you are a college student, you need these concepts, not only
to score well on exams, but to enter the corporate world. Even if you are
a tester who needs to take care of white-box testing, or needs to know
the code paths of a product, knowing these concepts will help you. So, I
suggest that you should not demotivate yourself, if in the first attempt,
you do not understand everything in a particular chapter. It’s perfectly
natural. Based on your C# knowledge, you may find one pattern easier
than other. In that case, move on to the next chapter, learn from it, gain
confidence, and come back to the old chapter.
This book is designed to help you develop an adequate knowledge
of design patterns in C#, and more importantly, help you learn how to
go further. I hope that this book will help you and you will value the
effort.
Acknowledgments
First, I thank the Almighty. I sincerely believe that I could complete this
book only with His blessings. I extend my deepest gratitude and thanks
to the following people.
Ratanlal Sarkar and Manikuntala Sarkar: My dear parents, only
with your blessings could I complete this work.
Indrani, my wife; Ambika, my daughter; Aryaman, my son:
Sweethearts, once again, without your love, I could not proceed at all. I
know that we need to limit many social gatherings and invitations to
complete my books on time, and each time I promise you that I’ll take a
long break and spend more time with you.
Sambaran, my brother: Thank you for your constant
encouragement.
Carsten: I know that whenever I was in need, your support was
there. Thank you once more.
Sekhar: I know this time you helped only in the incremented
version of the book, but thank you once more.
Ankit, my technical advisor in the first edition of this book: I always
acknowledge your contribution and help. I know that your valuable
comments were some of the key foundations for this enhanced edition.
Priya, my ex-colleague cum senior: A special thanks to you for
investing your time to write the forewords for both editions of this
book. When experts like you agree to write for me, I get the additional
motivation to enhance the quality of my work.
Celestin, Laura, Smriti: Thanks for giving me another opportunity
to work with you and Apress.
Shrikant: Thank you for your exceptional support to beautify my
work.
The production team—Krishnan Sathyamurthy, Sherly, Ramraj,
Selvakumar, and MathaRajamohan: Thank you guys; your efforts are
extraordinary.
Lastly, I extend my deepest gratitude to my publisher, the editorial
board members, and everyone who directly or indirectly supports this
book.
Table of Contents
Part I: Gang of Four Design Patterns
Chapter 1:​Singleton Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Analysis
Q&​A Session
Alternative Implementation
Analysis
Q&​A Session
Chapter 2:​Prototype Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Modified Implementation
Class Diagram
Demonstration 2
Output
Analysis
Q&​A Session
Shallow Copy vs.​Deep Copy
Demonstration 3
Output from a Shallow Copy
Analysis
Output from Deep Copy
Analysis
Q&​A Session
Demonstration 4
Output
Analysis
Chapter 3:​Builder Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Analysis
Q&​A Session
An Alternative Implementation
Class Diagram
Solution Explorer View
Demonstration 2
Output
Analysis
Q&​A Session
Chapter 4:​Factory Method Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Modified Implementation 1
Partial Demonstration 1
Output
Analysis
Q&​A Session
Modified Implementation 2
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Partial Demonstration 2
Output
Chapter 5:​Abstract Factory Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Q&​A Session
Chapter 6:​Proxy Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Q&​A Session
Demonstration 2
Output
Chapter 7:​Decorator Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration
Output
Q&​A Session
Chapter 8:​Adapter Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Analysis
Types of Adapters
Object Adapters
Class Adapters
Q&​A Session
Demonstration 2
Output
Analysis
Q&​A Session
Chapter 9:​Facade Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration
Output
Q&​A Session
Chapter 10:​Flyweight Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Analysis
Q&​A Session
Demonstration 2
Output
Analysis
Chapter 11:​Composite Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration
Output
Q&​A Session
Chapter 12:​Bridge Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Additional Implementation
Class Diagram
Demonstration 2
Output
Q&​A Session
Chapter 13:​Visitor Pattern
GoF Definition
Concept
Real-World Example
Computer-World Example
Implementation
Class Diagram
Solution Explorer View
Demonstration 1
Output
Q&​A Session
Using Visitor Pattern and Composite Pattern Together
Step 1
Step 2
Step 3
Step 4
Step 5
Demonstration 2
Output
Chapter 14:​Observer Pattern
GoF Definition
Concept
Random documents with unrelated
content Scribd suggests to you:
SPHENOPHYLLUM
(Plate 2)
The name Sphenophyllum refers to both stems and leaves of this
extinct genus, which was related to the scouring rushes—note its
resemblance to Annularia.

A small herbaceous plant, Sphenophyllum formed much of the


swampy undergrowth of the Pennsylvanian Period and is abundant
among Illinois fossils. It had a slender, ribbed stem bearing whorls of
delicate, wedge-shaped leaves, generally less than three-fourths of
an inch long, attached around the stem in multiples of three.

The cones of this group also are slender, delicate structures, bearing
a number of sporangia, and are correctly called Bowmanites,
although they also have been called Sphenophyllostachys. These
fossil cones frequently are found in Illinois.

Sphenophyllum first appeared during the Devonian Period, some 300


million years ago, but did not become abundant until Pennsylvanian
time. The genus continued through the Permian but died out in
Triassic time.

14
FERNS
(Plates 1 and 3)
True ferns, like those living in today’s woodlands, were common in
the Pennsylvanian forests. Some species attained heights of 30 to 40
feet. Their fronds (compound leaves divided into segments or
leaflets) commonly were five to six feet long.

Portion of fern frond showing sori on lower side of leaflets

True ferns do not produce cones or seeds, but spores, which develop
in cases called sporangia. The sporangia frond showing are attached
in clusters (sori) to the lower side or margins of the leaves. In
modern ferns the sporangia may also occur on fertile spikes.
The shape and position of the sori are used to identify modern ferns,
but because leaves that bear sori (“fertile” leaves) are rare among
fossil specimens, the number, shape, and attachment of the leaflets
and the pattern of the veins are more commonly used for
identification.
Reconstruction of Megaphyton
(after Hirmer)
Because fossils of complete fern plants have not yet been found,
separate names have been adopted for detached leaves, stems, and
other parts. For example, the fossil stems of some Pennsylvanian
ferns found in Illinois have been referred to two genera,
Megaphyton, whose leaf attachment scars are arranged in two
vertical rows, one on either side of the stem, and Caulopteris, 15
whose leaf scars are arranged in a steep spiral that becomes
progressively flatter upward until near the top they appear to be
whorled. When the stem is a petrifaction, with internal structures
preserved, it is called Psaronius. The fronds are referred to a number
of genera, but those most commonly found in Illinois are Pecopteris,
Asterotheca, and Ptychocarpus.

Venation of seed fern leaflets

Pecopteris
Asterotheca
Ptychocarpus
SEED FERNS
(Plate 4)
Seed ferns resembled true ferns in general, but they produced
seeds, borne on modified leaves. Where spore sacs and seeds are
absent, the leaves of seed ferns are difficult to distinguish from
those of spore ferns, although individual seed fern leaflets, called
pinnae, are somewhat larger.
Medullosa Reconstruction and original drawing by Wilson N. Stewart
Seed ferns included vinelike plants in the undergrowth and trees
such as Medullosa. Some tree genera were very tall, with 16
trunks more than two feet in diameter. Unlike the true ferns,
still living today, seed ferns declined steadily after the close of the
Pennsylvanian Period and finally became extinct during Jurassic time.
During Pennsylvanian time, however, they were much more
numerous and varied than true ferns.

Venation of seed fern leaflets

Alethopteris
Odontopteris
Mariopteris
Neuropteris
Linopteris

Most of the common seed ferns found as fossils in Illinois can be


referred to the following leaf genera: Alethopteris, Neuropteris,
Odontopteris, Linopteris, Mariopteris (which may be a true fern),
Cyclopteris, and Spiropteris. Cyclopteris includes circular leaves that
occurred at the base of leaves referable to Neuropteris. Spiropteris
includes young leaves that had not yet uncoiled and may belong to
either true ferns or seed ferns.
CORDAITES
(Plates 1 and 2)
Reconstruction of Cordaites
(after Hirmer)
Cordaitean trees, forerunners of modern conifers such as pine and
spruce, were important during the Pennsylvanian Period for 17
they were distributed throughout the world. These trees,
among the tallest plants of the time, sometimes grew more than 100
feet high.

The cordaitean trunk was unbranched for three-fourths of the height


of the tree and was topped by dense branches bearing large, simple,
straplike leaves spirally arranged. The leaves had closely set parallel
veins and measured from half an inch to three feet or more long.

Internally, the structure of the trunks was similar to that of modern


pine trunks. Casts of the pith are referred to the genus Artisia. The
seeds were borne in clusters on branches in leaf axils.

The Cordaites were major contributors to some coal beds.


FRUITING BODIES
(Plate 5)
Fossils representing many kinds of plant reproductive structures are
found in Pennsylvanian rocks, but unfortunately most of them are
not attached to any identifiable part of the parent plant and they
cannot be assigned definitely to a particular plant. Such fossils are
referred to genera and species solely on the basis of their own
characteristics, although, as in other fossil classifications, such “form
genera” are presumed to be parts of, or related to, the plants with
which they are found in habitual association.

A few such fossils, fairly common in Illinois, are illustrated on plate 5


to show their general shape and size. When attached to an
identifiable leaf or leaflet, the seed is referred to as the seed of that
leaf genus.

For example, Holcospermum, a radially symmetrical seed with ribs


and grooves, Codonotheca, a stalked, spore-bearing, lobed “cup,”
and Neuropterocarpus, a flask-shaped seed with longitudinal ribs
and grooves, all have been associated with Neuropteris, a leaf
genus.

18
Mazon Creek Strip Mine Area Showing Distribution of Spoil Heaps. The small
circular areas represent waste from underground mines.

Trigonocarpus, commonly found as a cast of the internal part 19


of a seed, is a trimerously symmetrical body frequently
associated with Alethopteris. Pachytesta includes preserved
structures and outer layers of a seed. Carpolithes is a catch-all
“genus” functioning as a general term for seeds and seedlike forms
whose plant group affinities cannot be determined.
COLLECTING AREAS FOR PENNSYLVANIAN
PLANTS
Northern Illinois
Plant fossils can be found in almost any northern Illinois area where
Pennsylvanian rocks are exposed (see back cover), but in some
places they are much better preserved and more numerous than in
others. Most of the well known collecting areas and a few of the
lesser known ones are discussed below. Even though some of the
localities were discovered many years ago, they may indicate areas
that are still favorable for collecting.

Mazon Creek Area

Of all the fossils that have been found in Illinois, the most famous
are the plant remains from the world-renowned Mazon Creek area in
the northeastern part of the state. In this area in Grundy and Will
Counties, plant fossils are found in ironstone concretions in the lower
part of the Francis Creek Shale directly overlying the Colchester (No.
2) Coal.

Fossils were discovered in outcrops along Mazon Creek more than a


century ago and collections later were made from scores of conical
spoil heaps at underground mines. After coal stripping began in the
1920’s, great numbers of specimens were collected.

In the stripping operations, the concretion-bearing beds are


commonly the last to be placed on the spoil heap. Weathering
softens and removes the shales and leaves the nodules concentrated
on the surface. Each season brings a new crop of concretions to the
surface.
20
Plate 1

Calamites ⅓×
Stigmaria ⅖×
Lepidodendron ⅖×
Calamites ¹/₁₀×
Fern Stem ⅔×
Caulopteris ¼×
Sigillaria ⅖×
Megaphyton ⅗×
Calamites ⅗×
Artisia ⅗×
Sigillaria sub-bark ⅗×

21

The concretions generally are oval to elongate and range from less
than an inch to a foot or more in maximum dimension. Only about
one nodule in ten contains plant remains.

Approximately 25 to 30 species have been found in this region. The


productivity of the area was shown by George Langford, Sr., a well
known midwestern fossil collector. He and his son split about 250
thousand concretions during a 140-day period and obtained some 25
thousand plant specimens. Fine specimens still can be collected in a
few hours.

The plant collecting localities in Will and Grundy Counties along


Mazon Creek, four to six miles southeast of the town of Morris, were
the first to be well known. Ferns are especially abundant. Fossils of
insects, crustaceans, worms, and salamanders also have been found.
Collecting conditions vary considerably from season to season, and
fossils are not as easily obtained there as from the strip-mine spoil
heaps.

Fossiliferous concretions may be found in a number of the strip


mines in the area, although probably most have come from the
Northern Illinois Coal Corporation mine between the towns of
Braidwood and Wilmington.

In earlier years good collections were made from the spoil heaps of
underground mines. Especially notable are the mine dumps of the
Wilmington Star No. 7 mine, 2¼ miles west of Coal City, and Skinner
No. 2 mine, two miles northeast of Braidwood.

In the vicinity of Morris on the northwest edge of the Mazon Creek


area, fossil ferns have been found along the north side of the Illinois
River and in the banks of the Illinois-Michigan Canal. About a mile
north in an area of strip mining, fossil-bearing concretions have been
found in shale and irregular sandstone layers.
22
Plate 2

Sphenophyllum ⅗×
Lepidostrobophyllum ⅗×
Annularia ⅗×
Sphenophyllum 1×
Lycopodites ⅗×
Cordaites ⅗×
Asterophyllites ⅓×

Fossils in concretions also have been collected from a shaly 23


limestone at the south end of the Kankakee River bridge along
the Grundy and Will county line.

Bureau County

Some 40 miles downstream from Morris on the Illinois River, plant


fossils have been discovered in waste from the Spring Valley Coal
Co. mine 1. They also are found in black shale below the LaSalle
Limestone in a small gully in the southwest part of town, but at
neither place are they plentiful.

Knox County

A notable number and variety of well preserved plant fossils have


been produced from a locality along Court Creek in East Galesburg.
The Rock Island (No. 1) Coal is mined in the area and the fossils
appear to have come from the shale overlying it.
Fossil plants also have been found in shales above the Colchester
(No. 2) Coal in the vicinity of DeLong and with the Herrin (No. 6)
Coal in mines southeast of Victoria.

Mercer and Warren Counties

In northern Warren and southern Mercer Counties the sandstone


underlying the Rock Island (No. 1) Coal is termed the “Stigmarian”
sandstone because of numerous siliceous casts found in the bed.
Many of the fossils have been collected from an old mine dump and
from ravines along the Edwards River northeast of Aledo.

A number of representatives of Sphenophyllum, Neuropteris, and


Annularia have been collected from ironstone concretions occurring
in shale that overlies the Colchester (No. 2) Coal about three miles
southwest of Alexis. They were found in a gully about a third of a
mile southeast of Center School.
24
Plate 3

Pecopteris 1×
Ptychocarpus ⅗×
Pecopteris ⅗×
Mariopteris ⅗×
Asterotheca ⅗×
Spiropteris ⅗×
Pecopteris ⅗×

In the same general area but about three miles due south of 25
Alexis, fossil plants also may be found in the clay pits of the
Hydraulic-Press Brick Company and the Northwestern Clay
Manufacturing Company.

Fulton County

Although there are numerous isolated occurrences of plant fossils


throughout the extensive strip mines and outcrops in Fulton County,
no exceptionally good collecting localities have been discovered.

Fern and cordaitean leaves have been collected along Mill Creek
about a mile northeast of Pleasantview where the fossils occur in the
shale overlying the Babylon Coal. In the same general area,
impressions and casts of Stigmaria, Lepidodendron, and Cordaites
have been found in the Babylon Sandstone.
Three miles north of Pleasantview, a quarter of a mile northwest of
Union School, several species of leaves have been collected from the
Browning Sandstone where it is exposed in a roadcut.

Farther east, there is a fairly good locality in the stream bluff of


Kerton Creek about 3¼ miles north and a quarter of a mile west of
Bluff City. There the plants are found about 18 feet below a coal
bed.

Numerous fern impressions also are found in shale beds above the
Herrin (No. 6) Coal along the Middle Branch of Copperas Creek, six
miles west of Glasford. Other specimens may be found in these beds
elsewhere in the area.

McDonough County
In some of the small underground mines near Colchester, the shale
overlying the Colchester (No. 2) Coal contains ironstone concretions
similar to those from northeastern Illinois. More than 50 species of
plant fossils have been reported, but they were collected many years
ago from spoil heaps at the mines. Beds of the same age crop out
widely in other localities in western Illinois and may contain plant
fossils.

26
Plate 4

Sphenopteris ⅗×
Linopteris ⅗×
Neuropteris ½×
Odontopteris ⅗×
Cycopteris ½×
Alethopteris ⅗×
Alethopteris ⅗×
Odontopteris ½×
Alethopteris ⅗×

27
Vermilion County

In outcrops about three miles below Georgetown on the Little


Vermilion River, a number of fossil plant species and one insect
species have been collected from shales overlying the Herrin (No. 6)
Coal, locally called the Grape Creek Coal. The fossils occur in
concretions much like those from Mazon Creek.

An occasional stem replacement or impression is found in the


concretionary shale above the No. 7 Coal in the strip mine area west
of Hillery. In fact, isolated fragmentary plant specimens are fairly
common in the Danville mining area, but no especially productive
localities have come to light.

Other Northern Illinois Localities

In addition to the counties listed above, a number of others have


produced plant fossils. For example, there are records of plant fossils
found southeast of Franklin in Morgan County, at Neelys in Peoria
County, and at a number of places in the southern and western parts
of Rock Island County. Local exploration is certain to turn up
numerous other collecting places at present unknown.
28

You might also like