100% found this document useful (1 vote)
298 views52 pages

Pro ASP.NET Core 6: Develop Cloud-Ready Web Applications Using MVC, Blazor, and Razor Pages 9 (no TOC and Index) Edition Adam Freeman pdf download

The document is a promotional and introductory overview of the book 'Pro ASP.NET Core 6' by Adam Freeman, which focuses on developing cloud-ready web applications using various frameworks like MVC, Blazor, and Razor Pages. It discusses the evolution of ASP.NET Core, the importance of understanding different application frameworks, and the integration of tools like Entity Framework Core and ASP.NET Core Identity. The book aims to equip readers with the necessary skills for ASP.NET Core development, emphasizing practical examples and the software required to follow along.

Uploaded by

rudoiazahir47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
298 views52 pages

Pro ASP.NET Core 6: Develop Cloud-Ready Web Applications Using MVC, Blazor, and Razor Pages 9 (no TOC and Index) Edition Adam Freeman pdf download

The document is a promotional and introductory overview of the book 'Pro ASP.NET Core 6' by Adam Freeman, which focuses on developing cloud-ready web applications using various frameworks like MVC, Blazor, and Razor Pages. It discusses the evolution of ASP.NET Core, the importance of understanding different application frameworks, and the integration of tools like Entity Framework Core and ASP.NET Core Identity. The book aims to equip readers with the necessary skills for ASP.NET Core development, emphasizing practical examples and the software required to follow along.

Uploaded by

rudoiazahir47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Pro ASP.

NET Core 6: Develop Cloud-Ready Web


Applications Using MVC, Blazor, and Razor Pages
9 (no TOC and Index) Edition Adam Freeman pdf
download
https://ebookmeta.com/product/pro-asp-net-core-6-develop-cloud-
ready-web-applications-using-mvc-blazor-and-razor-pages-9-no-toc-
and-index-edition-adam-freeman/

Download more ebook from https://ebookmeta.com


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

Pro ASP.NET Core 6: Develop Cloud-Ready Web


Applications Using MVC, Blazor, and Razor Pages 9th
Edition Adam Freeman

https://ebookmeta.com/product/pro-asp-net-core-6-develop-cloud-
ready-web-applications-using-mvc-blazor-and-razor-pages-9th-
edition-adam-freeman/

Pro Entity Framework Core 2 for ASP.NET Core MVC 1st


Edition Adam Freeman

https://ebookmeta.com/product/pro-entity-framework-core-2-for-
asp-net-core-mvc-1st-edition-adam-freeman/

Beginning gRPC with ASP.NET Core 6: Build Applications


using ASP.NET Core Razor Pages, Angular, and Best
Practices in .NET 6 1st Edition Anthony Giretti

https://ebookmeta.com/product/beginning-grpc-with-asp-net-
core-6-build-applications-using-asp-net-core-razor-pages-angular-
and-best-practices-in-net-6-1st-edition-anthony-giretti/

The Complete Peanuts 1950 2000 v26 1st Edition Charles


M. Schulz

https://ebookmeta.com/product/the-complete-
peanuts-1950-2000-v26-1st-edition-charles-m-schulz/
Italian Colonial Units 1882 1960 1st Edition Gabriele
Esposito Giuseppe Rava

https://ebookmeta.com/product/italian-colonial-
units-1882-1960-1st-edition-gabriele-esposito-giuseppe-rava/

Principles of Electronic Communication Systems 5th


Edition Louis Frenzel

https://ebookmeta.com/product/principles-of-electronic-
communication-systems-5th-edition-louis-frenzel/

Physical Disability and Sexuality Stories from South


Africa 1st Edition Xanthe Hunt

https://ebookmeta.com/product/physical-disability-and-sexuality-
stories-from-south-africa-1st-edition-xanthe-hunt/

Cosmopolitanism Between Ideals and Reality 1st Edition


Lorena Cebolla Sanahuja

https://ebookmeta.com/product/cosmopolitanism-between-ideals-and-
reality-1st-edition-lorena-cebolla-sanahuja/

Technology Feats Failures Stephanie Paris

https://ebookmeta.com/product/technology-feats-failures-
stephanie-paris/
Japanese American Millennials 1st Edition Michael Omi
Dana Y Nakano Jeffrey Yamashita

https://ebookmeta.com/product/japanese-american-millennials-1st-
edition-michael-omi-dana-y-nakano-jeffrey-yamashita/
CHAPTER 1

Putting ASP.NET Core in Context

ASP.NET Core is Microsoft’s web development platform. The original ASP.NET was introduced in 2002, and
it has been through several reinventions and reincarnations to become ASP.NET Core 6, which is the topic of
this book.
ASP.NET Core consists of a platform for processing HTTP requests, a series of principal frameworks for
creating applications, and secondary utility frameworks that provide supporting features, as illustrated by
Figure 1-1.

Figure 1-1. The structure of ASP.NET Core

© Adam Freeman 2022 3


A. Freeman, Pro ASP.NET Core 6, https://doi.org/10.1007/978-1-4842-7957-1_1
Chapter 1 ■ Putting ASP.NET Core in Context

UNDERSTANDING .NET CORE, .NET FRAMEWORK, AND .NET


If you have never worked for a large corporation, you might have the impression that Microsoft is a
disciplined organization with a clear strategy and an army of programmers working together to deliver
complex products like ASP.NET Core.
In reality, Microsoft is a chaotic collection of dysfunctional tribes that are constantly trying to undermine
each other to get prestige and promotions. Products are released during lulls in the fighting, and
successes are often entirely unexpected. This isn’t unique to Microsoft—it is true of any large
company—but it has a particular bearing on ASP.NET Core and the naming confusion that Microsoft has
created.
Several years ago, the part of Microsoft responsible for ASP.NET created its own version of the .NET
platform, allowing ASP.NET to be updated more often than the rest of .NET. ASP.NET Core and .NET
Core were created, allowing cross-platform development, and using a subset of the original .NET APIs,
many of which were specific to Windows. It was a painful transition, but it meant that web development
could evolve independently of the “legacy” Windows-only development, which would continue under the
renamed .NET Framework.
But no one wants to be in the “legacy” tribe because there is no glory in keeping the lights on at
Microsoft. .NET Core was clearly the future and, one by one, the.NET groups at Microsoft argued that
their technology and APIs should be part of .NET Core. The .NET Core APIs were gradually expanded,
and the result was an incoherent mess, with half-hearted attempts to differentiate .NET Core and .NET
Framework and standardize the APIs.
To clean up the mess, Microsoft has merged .NET Core and .NET Framework into .NET, dropping the
Core part of the name. “.NET” is a name I like to think was chosen on the way out of the office on a
holiday weekend but which I suspect is the result of many months of heated argument.
The problem with dropping Core from the name is that it cannot be carried out consistently. The name
ASP.NET Core originally denoted the .NET Core version of ASP.NET, and going back to that name would
be even more confusing.
The result is that even Microsoft can’t decide what name to use. You will see the term ASP.NET Core 6
in a lot of the developer documentation—and that’s the name I use in this book—but you will also see
ASP.NET Core in .NET 6, especially in press releases and marketing material. It is not clear which name
will win out, but until there is clarity, you should take care to determine whether you are using .NET
Framework, .NET Core, or .NET.

Understanding the Application Frameworks


When you start using ASP.NET Core, it can be confusing to find that there are different application
frameworks available. As you will learn, these frameworks are complementary and solve different problems,
or, for some features, solve the same problems in different ways. Understanding the relationship between
these frameworks means understanding the changing design patterns that Microsoft has supported, as I
explain in the sections that follow.

4
Chapter 1 ■ Putting ASP.NET Core in Context

Understanding the MVC Framework


The MVC Framework was introduced in the early ASP.NET, long before .NET Core and .NET 6 were
introduced. The original ASP.NET relied on a development model called Web Pages, which re-created the
experience of writing desktop applications but resulted in unwieldy web projects that did not scale well.
The MVC Framework was introduced alongside Web Pages with a development model that embraced the
character of HTTP and HTML, rather than trying to hide it.
MVC stands for Model-View-Controller, which is a design pattern that describes the shape of an
application. The MVC pattern emphasizes separation of concerns, where areas of functionality are defined
independently, which was an effective antidote to the indistinct architectures that Web Pages led to.
Early versions of the MVC Framework were built on the ASP.NET foundations that were originally
designed for Web Pages, which led to some awkward features and workarounds. With the move to .NET
Core, ASP.NET became ASP.NET Core, and the MVC Framework was rebuilt on an open, extensible, and
cross-platform foundation.
The MVC Framework remains an important part of ASP.NET Core, but the way it is commonly used
has changed with the rise of single-page applications (SPAs). In an SPA, the browser makes a single HTTP
request and receives an HTML document that delivers a rich client, typically written in a JavaScript client
such as Angular or React. The shift to SPAs means that the clean separation that the MVC Framework was
originally intended for is not as important, and the emphasis placed on following the MVC pattern is no
longer essential, even though the MVC Framework remains useful (and is used to support SPAs through web
services, as described in Chapter 19).

PUTTING PATTERNS IN THEIR PLACE


Design patterns provoke strong reactions, as the emails I receive from readers will testify. A substantial
proportion of the messages I receive are complaints that I have not applied a pattern correctly.
Patterns are just other people’s solutions to the problems they encountered in other projects. If you
find yourself facing the same problem, understanding how it has been solved before can be helpful.
But that doesn’t mean you have to follow the pattern exactly, or at all, as long as you understand the
consequences. If a pattern is intended to make projects manageable, for example, and you choose to
deviate from that pattern, then you must accept that your project may be more difficult to manage. But a
pattern followed slavishly can be worse than no pattern at all, and no pattern is suited to every project.
My advice is to use patterns freely, adapt them as necessary, and ignore zealots who confuse patterns
with commandments.

Understanding Razor Pages


One drawback of the MVC Framework is that it can require a lot of preparatory work before an application
can start producing content. Despite its structural problems, one advantage of Web Pages was that simple
applications could be created in a couple of hours.
Razor Pages takes the development ethos of Web Pages and implements it using the platform features
originally developed for the MVC Framework. Code and content are mixed to form self-contained pages;
this re-creates the speed of Web Pages development without some of the underlying technical problems
(although the issue of scaling up complex projects can still be an issue).

5
Chapter 1 ■ Putting ASP.NET Core in Context

Razor Pages can be used alongside the MVC Framework, which is how I tend to use them. I write the
main parts of the application using the MVC Framework and use Razor Pages for the secondary features,
such as administration and reporting tools. You can see this approach in Chapters 7–11, where I develop a
realistic ASP.NET Core application called SportsStore.

Understanding Blazor
The rise of JavaScript client-side frameworks can be a barrier for C# developers, who must learn a different—
and somewhat idiosyncratic—programming language. I have come to love JavaScript, which is as fluid and
expressive as C#. But it takes time and commitment to become proficient in a new programming language,
especially one that has fundamental differences from C#.
Blazor attempts to bridge this gap by allowing C# to be used to write client-side applications. There are
two versions of Blazor: Blazor Server and Blazor WebAssembly. Blazor Server is a stable and supported part
of ASP.NET Core, and it works by using a persistent HTTP connection to the ASP.NET Core server, where the
application’s C# code is executed. Blazor WebAssembly is an experimental release that goes one step further
and executes the application’s C# code in the browser. Neither version of Blazor is suited for all situations, as
I explain in Chapter 33, but they both give a sense of direction for the future of ASP.NET Core development.

Understanding the Utility Frameworks


Two frameworks are closely associated with ASP.NET Core but are not used directly to generate HTML
content or data. Entity Framework Core is Microsoft’s object-relational mapping (ORM) framework, which
represents data stored in a relational database as .NET objects. Entity Framework Core can be used in any
.NET application, and it is commonly used to access databases in ASP.NET Core applications.
ASP.NET Core Identity is Microsoft’s authentication and authorization framework, and it is used to
validate user credentials in ASP.NET Core applications and restrict access to application features.
I describe only the basic features of both frameworks in this book, focusing on the capabilities required
by most ASP.NET Core applications. But these are both complex frameworks that are too large to describe in
detail in what is already a large book about ASP.NET Core.

TOPICS FOR FUTURE EDITIONS


I don’t have space in this book to cover every ASP.NET Core, Entity Framework Core, and ASP.NET
Core Identity feature, so I have focused on those aspects that most projects require. If there are topics
you think I should include in the next edition or in new deep-dive books, then please send me your
suggestions at [email protected].

Understanding the ASP.NET Core Platform


The ASP.NET Core platform contains the low-level features required to receive and process HTTP requests
and create responses. There is an integrated HTTP server, a system of middleware components to handle
requests, and core features that the application frameworks depend on, such as URL routing and the Razor
view engine.
Most of your development time will be spent with the application frameworks, but effective ASP.NET
Core use requires an understanding of the powerful capabilities that the platform provides, without which
the higher-level frameworks could not function. I demonstrate how the ASP.NET Core platform works in
detail in Part 2 of this book and explain how the features it provides underpin every aspect of ASP.NET Core
development.

6
Chapter 1 ■ Putting ASP.NET Core in Context

I have not described two notable platform features in this book: SignalR and gRPC. SignalR is used to
create low-latency communication channels between applications. It provides the foundation for the Blazor
Server framework that I describe in Part 4 of this book, but SignalR is rarely used directly, and there are
better alternatives for those few projects that need low-latency messaging, such as Azure Event Grid or Azure
Service Bus.
gRPC is an emerging standard for cross-platform remote procedure calls (RPCs) over HTTP that was
originally created by Google (the g in gRPC) and offers efficiency and scalability benefits. gRPC may be the
future standard for web services, but it cannot be used in web applications because it requires low-level
control of the HTTP messages that it sends, which browsers do not allow. (There is a browser library that
allows gRPC to be used via a proxy server, but that undermines the benefits of using gRPC.) Until gRPC
can be used in the browser, its inclusion in ASP.NET Core is of interest only for projects that use it for
communication between back-end servers, for which many alternative protocols exist. I may cover gRPC in
future editions of this book but not until it can be used in the browser or becomes the dominant data-center
protocol.

Understanding This Book


To get the most from this book, you should be familiar with the basics of web development, understand how
HTML and CSS work, and have a working knowledge of C#. Don’t worry if you haven’t done any client-side
development, such as JavaScript. The emphasis in this book is on C# and ASP.NET Core, and you will be able
to pick up everything you need to know as you progress through the chapters. In Chapter 5, I summarize the
most important C# features for ASP.NET Core development.

What Software Do I Need to Follow the Examples?


You need a code editor (either Visual Studio or Visual Studio Code), the .NET Core Software Development
Kit, and SQL Server LocalDB. All are available for use from Microsoft without charge, and Chapter 2 contains
instructions for installing everything you need.

What Platform Do I Need to Follow the Examples?


This book is written for Windows. I used Windows 10 Pro, but any version of Windows supported by Visual
Studio, Visual Studio Code, and .NET Core should work. ASP.NET Core is supported on other platforms, but
the examples in this book rely on the SQL Server LocalDB feature, which is specific to Windows. You can
contact me at [email protected] if you are trying to use another platform, and I will give you some
general pointers for adapting the examples, albeit with the caveat that I won’t be able to provide detailed
help if you get stuck.

What If I Have Problems Following the Examples?


The first thing to do is to go back to the start of the chapter and begin again. Most problems are caused by
missing a step or not fully following a listing. Pay close attention to the emphasis in code listings, which
highlights the changes that are required.
Next, check the errata/corrections list, which is included in the book’s GitHub repository. Technical
books are complex, and mistakes are inevitable, despite my best efforts and those of my editors. Check the
errata list for the list of known errors and instructions to resolve them.

7
Chapter 1 ■ Putting ASP.NET Core in Context

If you still have problems, then download the project for the chapter you are reading from the book’s
GitHub repository, https://github.com/apress/pro-­asp.net-­core-­6, and compare it to your project. I
create the code for the GitHub repository by working through each chapter, so you should have the same
files with the same contents in your project.
If you still can’t get the examples working, then you can contact me at [email protected] for help.
Please make it clear in your email which book you are reading and which chapter/example is causing the
problem. Please remember that I get a lot of emails and that I may not respond immediately.

What If I Find an Error in the Book?


You can report errors to me by email at [email protected], although I ask that you first check the
errata/corrections list for this book, which you can find in the book’s GitHub repository at https://github.
com/apress/pro-­asp.net-­core-­6, in case it has already been reported.
I add errors that are likely to cause confusion to readers, especially problems with example code, to
the errata/corrections file on the GitHub repository, with a grateful acknowledgment to the first reader
who reported them. I keep a list of less serious issues, which usually means errors in the text surrounding
examples, and I fix them when I write a new edition.

ERRATA BOUNTY
Apress has agreed to give a free ebook to readers who are the first to report errors that make it onto
the GitHub errata list for this book. Readers can select any Apress ebook available through Springerlink.
com, not just my books.
This is an entirely discretional and experimental program. Discretional means that only I decide which
errors are listed in the errata and which reader is the first to make a report. Experimental means Apress
may decide not to give away any more books at any time for any reason. There are no appeals, and this
is not a promise or a contract or any kind of formal offer or competition. Or, put another way, this is a
nice and informal way to say thank you and to encourage readers to report mistakes that I have missed
when writing this book.

What Does This Book Cover?


I have tried to cover the features that will be required by most ASP.NET Core projects. This book is split into
four parts, each of which covers a set of related topics.

Part 1: Introducing ASP.NET Core


This part of the book—which includes this chapter—introduces ASP.NET Core. In addition to setting up your
development environment and creating your first application, you’ll learn about the most important C#
features for ASP.NET Core development and how to use the ASP.NET Core development tools. But most of
Part 1 is given over to the development of a project called SportsStore, through which I show you a realistic
development process from inception to deployment, touching on all the main features of ASP.NET Core and
showing how they fit together—something that can be lost in the deep-dive chapters in the rest of the book.

8
Chapter 1 ■ Putting ASP.NET Core in Context

Part 2: The ASP.NET Core Platform


The chapters in this part of the book describe the key features of the ASP.NET Core platform. I explain how
HTTP requests are processed, how to create and use middleware components, how to create routes, how
to define and consume services, and how to work with Entity Framework Core. These chapters explain the
foundations of ASP.NET Core, and understanding them is essential for effective ASP.NET Core development.

Part 3: ASP.NET Core Applications


The chapters in this part of the book explain how to create different types of applications, including RESTful
web services and HTML applications using controllers and Razor Pages. These chapters also describe the
features that make it easy to generate HTML, including the views, view components, and tag helpers.

Part 4: Advanced ASP.NET Core Features


The final part of the book explains how to create applications using Blazor Server, how to use the
experimental Blazor WebAssembly, and how to authenticate users and authorize access using ASP.NET Core
Identity.

What Doesn’t This Book Cover?


This book doesn’t cover basic web development topics, such as HTML and CSS, and doesn’t teach basic
C# (although Chapter 5 does describe C# features useful for ASP.NET Core development that may not be
familiar to developers using older versions of .NET).
As much as I like to dive into the details in my books, not every ASP.NET Core feature is useful in
mainstream development, and I have to keep my books to a printable size. When I decide to omit a feature, it
is because I don’t think it is important or because the same outcome can be achieved using a technique that
I do cover.
As noted earlier, I have not described the ASP.NET Core support for SignalR and gRPC, and I note other
features in later chapters that I don’t describe, either because they are not broadly applicable or because
there are better alternatives available. In each case, I explain why I have omitted a description and provide a
reference to the Microsoft documentation for that topic.

How Do I Contact the Author?


You can email me at [email protected]. It has been a few years since I first published an email
address in my books. I wasn’t entirely sure that it was a good idea, but I am glad that I did it. I have received
emails from around the world, from readers working or studying in every industry, and—for the most part
anyway—the emails are positive, polite, and a pleasure to receive.
I try to reply promptly, but I get a lot of email, and sometimes I get a backlog, especially when I have my
head down trying to finish writing a book. I always try to help readers who are stuck with an example in the
book, although I ask that you follow the steps described earlier in this chapter before contacting me.
While I welcome reader emails, there are some common questions for which the answers will always be
no. I am afraid that I won’t write the code for your new startup, help you with your college assignment, get
involved in your development team’s design dispute, or teach you how to program.

9
Chapter 1 ■ Putting ASP.NET Core in Context

What If I Really Enjoyed This Book?


Please email me at [email protected] and let me know. It is always a delight to hear from a happy
reader, and I appreciate the time it takes to send those emails. Writing these books can be difficult, and those
emails provide essential motivation to persist at an activity that can sometimes feel impossible.

What If This Book Has Made Me Angry and I Want to Complain?


You can still email me at [email protected], and I will still try to help you. Bear in mind that I can only
help if you explain what the problem is and what you would like me to do about it. You should understand
that sometimes the only outcome is to accept I am not the writer for you and that we will have closure only
when you return this book and select another. I’ll give careful thought to whatever has upset you, but after 25
years of writing books, I have come to understand that not everyone enjoys reading the books I like to write.

Summary
In this chapter, I set the scene for the rest of the book. I provided a brief overview of ASP.NET Core, explained
the requirements for and the content of this book, and explained how you can contact me. In the next
chapter, I show you how to prepare for ASP.NET Core development.

10
CHAPTER 2

Getting Started

The best way to appreciate a software development framework is to jump right in and use it. In this chapter,
I explain how to prepare for ASP.NET Core development and how to create and run an ASP.NET Core
application.

UPDATES TO THIS BOOK


Microsoft has an active development schedule for .NET and ASP.NET Core, which means that there may
be new releases available by the time you read this book. It doesn’t seem fair to expect readers to buy
a new book every few months, especially since most changes are relatively minor. Instead, I will post
free updates to the GitHub repository for this book (https://github.com/apress/pro-­asp.net-­
core-­6) for breaking changes.
This kind of update is an ongoing experiment for me (and for Apress), and it continues to evolve—not
least because I don’t know what the future major releases of ASP.NET Core will contain—but the goal is
to extend the life of this book by supplementing the examples it contains.
I am not making any promises about what the updates will be like, what form they will take, or how
long I will produce them before folding them into a new edition of this book. Please keep an open mind
and check the repository for this book when new ASP.NET Core versions are released. If you have
ideas about how the updates could be improved, then email me at [email protected] and let
me know.

Choosing a Code Editor


Microsoft provides a choice of tools for ASP.NET Core development: Visual Studio and Visual Studio Code.
Visual Studio is the traditional development environment for .NET applications, and it offers an enormous
range of tools and features for developing all sorts of applications. But it can be resource-hungry and slow,
and some of the features are so determined to be helpful they get in the way of development.
Visual Studio Code is a lightweight alternative that doesn’t have the bells and whistles of Visual Studio
but is perfectly capable of handling ASP.NET Core development.
All the examples in this book include instructions for both editors, and both Visual Studio and Visual
Studio Code can be used without charge, so you can use whichever suits your development style.

© Adam Freeman 2022 11


A. Freeman, Pro ASP.NET Core 6, https://doi.org/10.1007/978-1-4842-7957-1_2
Chapter 2 ■ Getting Started

If you are new to .NET development, then start with Visual Studio. It provides more structured support
for creating the different types of files used in ASP.NET Core development, which will help ensure you get the
expected results from the code examples.

■■Note This book describes ASP.NET Core development for Windows. It is possible to develop and run ASP.
NET Core applications on Linux and macOS, but most readers use Windows, and that is what I have chosen to
focus on. Almost all the examples in this book rely on LocalDB, which is a Windows-only feature provided by
SQL Server that is not available on other platforms. If you want to follow this book on another platform, then you
can contact me using the email address in Chapter 1, and I will try to help you get started.

Installing Visual Studio


ASP.NET Core 6 requires Visual Studio 2022. I use the free Visual Studio 2022 Community Edition, which can be
downloaded from www.visualstudio.com. Run the installer, and you will see the prompt shown in Figure 2-1.

Figure 2-1. Starting the Visual Studio installer

12
Chapter 2 ■ Getting Started

Click the Continue button, and the installer will download the installation files, as shown in Figure 2-2.

Figure 2-2. Downloading the Visual Studio installer files

When the installer files have been downloaded, you will be presented with a set of installation options,
grouped into workloads. Ensure that the “ASP.NET and web development” workload is checked, as shown in
Figure 2-3.

Figure 2-3. Selecting the workload

Select the “Individual components” section at the top of the window and ensure the SQL Server Express
2019 LocalDB option is checked, as shown in Figure 2-4. This is the database component that I will be using
to store data in later chapters.

13
Chapter 2 ■ Getting Started

Figure 2-4. Ensuring LocalDB is installed

Click the Install button, and the files required for the selected workload will be downloaded and
installed. To complete the installation, a reboot may be required.

Installing the .NET SDK


The Visual Studio installer will install the .NET Software Development Kit (SDK), but it may not install the
version required for the examples in this book. Go to https://dotnet.microsoft.com/download/dotnet-­
core/6.0 and download the installer for version 6.0.0 of the .NET SDK, which is the long-term support
release at the time of writing. Run the installer; once the installation is complete, open a new PowerShell
command prompt from the Windows Start menu and run the command shown in Listing 2-1, which displays
a list of the installed .NET SDKs.

Listing 2-1. Listing the Installed SDKs

dotnet --list-sdks

Here is the output from a fresh installation on a Windows machine that has not been used for .NET:

6.0.100 [C:\Program Files\dotnet\sdk]

If you have been working with different versions of .NET, you may see a longer list, like this one:

3.1.101 [C:\Program Files\dotnet\sdk]


5.0.100 [C:\Program Files\dotnet\sdk]
5.0.401 [C:\Program Files\dotnet\sdk]
6.0.100 [C:\Program Files\dotnet\sdk]

Regardless of how many entries there are, you must ensure there is one for the 6.0.1xx version, where
the last two digits may differ.

14
Chapter 2 ■ Getting Started

Installing Visual Studio Code


If you have chosen to use Visual Studio Code, download the installer from https://code.visualstudio.
com. No specific version is required, and you should select the current stable build. Run the installer and
ensure you check the Add to PATH option, as shown in Figure 2-5.

Figure 2-5. Configuring the Visual Studio Code installation

Installing the .NET SDK


The Visual Studio Code installer does not include the .NET SDK, which must be installed separately. Go to
https://dotnet.microsoft.com/download/dotnet-­core/6.0 and download the installer for version 6.0.0
of the .NET SDK, which is the long-term support release at the time of writing. Run the installer; once the
installation is complete, open a new PowerShell command prompt from the Windows Start menu and run
the command shown in Listing 2-2, which displays a list of the installed .NET SDKs.

Listing 2-2. Listing the Installed SDKs

dotnet --list-sdks

Here is the output from a fresh installation on a Windows machine that has not been used for .NET:

6.0.100 [C:\Program Files\dotnet\sdk]

15
Chapter 2 ■ Getting Started

If you have been working with different versions of .NET, you may see a longer list, like this one:

3.1.101 [C:\Program Files\dotnet\sdk]


5.0.100 [C:\Program Files\dotnet\sdk]
5.0.401 [C:\Program Files\dotnet\sdk]
6.0.100 [C:\Program Files\dotnet\sdk]

Regardless of how many entries there are, you must ensure there is one for the 6.0.1xx version, where
the last two digits may differ.

Installing SQL Server LocalDB


The database examples in this book require LocalDB, which is a zero-configuration version of SQL Server
that can be installed as part of the SQL Server Express edition, which is available for use without charge from
https://www.microsoft.com/en-­in/sql-­server/sql-­server-­downloads. Download and run the Express
edition installer and select the Custom option, as shown in Figure 2-6.

Figure 2-6. Selecting the installation option for SQL Server

16
Discovering Diverse Content Through
Random Scribd Documents
The Project Gutenberg eBook of Villars and Its
Environs
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: Villars and Its Environs

Author: G. Flemwell

Release date: October 30, 2018 [eBook #58193]

Language: English

Credits: Produced by The Online Distributed Proofreading Team at


http://www.pgdp.net (This file was produced from images
generously made available by The Internet Archive)

*** START OF THE PROJECT GUTENBERG EBOOK VILLARS AND ITS


ENVIRONS ***
VILLARS: THE GRAND AND THE PETIT MUVERAN

Beautiful Switzerland
VILLARS
AND ITS ENVIRONS

Painted and Described by


G. FLEMWELL
Author of “Lucerne” “Chamonix” “Lausanne”
“Alpine Flowers and Gardens” &c.

BLACKIE AND SON LIMITED


LONDON GLASGOW AND BOMBAY
1914
Beautiful Switzerland
In this series have already appeared:

LUCERNE
CHAMONIX
VILLARS AND CHAMPÉRY
LAUSANNE

Painted and Described by


G. FLEMWELL
Other volumes in preparation
LIST OF ILLUSTRATIONS
Page
Villars: The Grand and the Petit Muveran Frontispiece
St. Maurice: The Château and the Rock of Dailly 8
Bex: The Croix de Javernaz and the Dent de Morcles 14
Les Plans: Avalanche falling from the Grand Muveran 20
Leysin, seen from Les Ecovets 24
The Chamossaire, seen from Villars 30
In the Village of Chesières 36
Mont Blanc and the Aiguille Verte, from Bretaye 40
The Dent du Midi, from Villars 46
Villars: The Mountains of Savoy 50
Villars: A Peep of the Dent de Morcles 54
Champéry: The Dent du Midi 60
VILLARS
AND ITS ENVIRONS
There is no more interesting district in the Rhone valley, perhaps even
in the whole of Switzerland, than that which lies around the north-
western entrance to the upper and main portion of the Canton of Valais
—that impressive, narrow entrance formed by the buttress cliffs of the
Dent de Morcles and the Dent du Midi, just inside of which nestles the
ancient town of St. Maurice. For this district is compact of great variety.
It holds examples of all that goes to the making of Switzerland’s
fascination. It holds the fertile plain with its broad, rushing river, the
Rhone; it holds, in Aigle and St. Maurice, two châteaued towns with long
and active histories of their own; it holds, in Bex, one of the most
delightful spots imaginable for spring and autumn; in Leysin, a world-
known mountain health resort; popular mountain pleasure resorts in
Villars, Chesières, Gryon, Les Plans, Champéry and Morgins; and, in the
natives of the Val d’Illiez, it holds a distinctive race with a distinctive
tongue. Moreover, it contains, in the huge erratic blocks near Monthey
and near Bex, remarkable vestiges of the great glacier which one time
filled this valley and flowed on over what is now Lac Léman;[1] it has
noble peaks in number and of no mean order for the climber; it
possesses at least three glaciers which, though small, are full of
individual interest and beauty; and it harbours a flora so rich as to have
become renowned. And yet all of this, and more besides, is packed
within a comparatively restricted area. One reason for this great variety
in so small a compass is the curiously striking fact of the Rhone dividing
Vaud from Valais, and thus at the same time dividing to a marked extent
what is wild and truly Alpine circumstance from what is relatively tame
and rural. For Champéry, although at some 650 feet lower altitude than
Villars,[2] its vis-à-vis across the valley of the Rhone, partakes of the
rude Alpine character of Valais, whilst Villars has what may be called the
civilized setting so generally characteristic of Vaud. The difference may
be noted in their respective vegetations—in the trees and flowers. For
instance, at Champéry the bell-gentian (Gentiana excisa) and the yellow
pea (Lathyrus luteus) can be found within a few minutes of the hotels,
whereas at Villars one must walk at least an hour and a half higher up
to find the gentian, and the pea I have not found there at all. Or again,
Villars possesses fine deciduous trees in quantity and its pines are
perfect park-like specimens; whilst at Champéry deciduous trees are
inconspicuous and the pines are of the rugged Alpine order. Villars
possesses the finer panorama—one of the finest in Switzerland,
particularly in winter—but Champéry provides the truer Alpine pictures,
especially in summer.
Indeed the very variety of this district—historically, geographically,
botanically sets a difficult task before so slight a volume as this present.
However, an attempt must be made towards adequacy. No time can be
wasted, and we had best start at St. Maurice and work diligently round
in a circle by way of Bex, Les Plans, and Villars, thence to Aigle and
Leysin, ending up with Monthey, Morgins, and Champéry, meanwhile
knitting the whole district together with general and comparative facts.
ST. MAURICE

ST. MAURICE: THE CHÂTEAU AND THE ROCK OF DAILLY

The scene as one approaches St. Maurice from the north-west is


among the most noted in Valais. The old castle hugging the cliff to the
right and dominating the swift and troubled Rhone rushing low beneath
the ancient stone bridge, with the great sheer Rock of Dailly to the left—
it is a memorable picture, particularly in spring, when the wild
wallflowers and laburnum deck the castle cliffs, and the young tints of
spruce and larch soften the stern aspect of the fortress. Fortress? Yes,
the Rock of Dailly, buttress of the Dent de Morcles, is a veritable
Gibraltar, designed to stop and crush all invasion by way of the Simplon
and the Grand St. Bernard. From an arrant civilian’s standpoint it would
seem an absolute impossibility for an invading army to live to pass the
narrow defile of St. Maurice. Those innumerable and mighty guns
hidden in the face of that grim precipice are apparently able to
overwhelm all intruders, and the defile of St. Maurice would seem as
safe to-day as when in olden times it was closed by a great gate. One
has only to watch at nighttime the firing practice, illuminated by
searchlights and directed against the forests and cliffs high upon the
Dent du Midi, to be impressed with the awful deadliness of this rock-
fortress. It seems, of course, a sacrilege so to insult the lovely, peaceful
Alps; it seems a gross, insensate outrage upon a land pre-eminently
designed to wean men from the cult of war.[3] But of its practical
effectiveness in case of need there can be no manner of doubt.
Napoleon to-day would have to go round some other way to get to Italy;
he could not now use Switzerland as a convenient passage. And yet, and
yet, it seems to me a shame when I remember the delightful months I
spent upon the summit of the Rock of Dailly some five-and-twenty years
ago, and think that now it is closed to mere civilians, that the
magnificent prospect, with a sheer drop down upon the Baths of Lavey,
is now only examined by the trainer of far-reaching cannon, and that the
exquisite carpet of Alpine flowers around the Dent de Morcles is
trampled under foot by companies and battalions. It is sometimes hard
to reconcile one’s quiet ideals with the stern exigencies of life, and
perhaps this is particularly so in Switzerland. It was on the slopes high
above Dailly, now a vast manœuvre ground for troops, that I once fled
hurriedly in the front of a stampeding herd of cattle driven mad by flies,
and that I only just escaped destruction by scrambling on to the roof of
a friendly cheese châlet. Needless to say, I do not rank such incidents
among my quiet ideals.[4]
St. Maurice can boast of as long a history as any town in the country.
Looking backwards it is lost in the mists of Time, and it only reveals
itself with real distinctness when the Romans made the town the centre
of their activities in Valais, and Julius Cæsar threw up walls and
fortifications around it and gave it the name of Tarnade or Ager
Tarnadensis. The well-known savant and archæologist, Dean Bourban,
of the Abbey of St. Maurice, says that the road which crosses the bridge
and runs beside the Rhone, through the defile, through the town and on
to Martigny and the Grand St. Bernard, is the selfsame road used by the
Gauls on their way to Italy, and by the Romans on their way to Gaul and
Germany. There is at Bourg St. Pierre, the last village on the road to the
Grand St. Bernard, an ancient milestone, marking the twenty-fourth mile
between Aosta and Martigny on the great military route which ran from
Milan, through St. Maurice, to Mayence in Germany. On the front of the
old town hall of St. Maurice is an inscription saying: “I am Christian
since the year 58”. According to tradition St. Peter crossed the Grand St.
Bernard and preached Christianity throughout Valais, and if this be fact,
then he must of necessity have been to St. Maurice. But the town’s
present name was not then in existence; it is derived from the massacre
in 302 of the Theban Legion commanded by Maurice. The massacre is
said to have occurred in what is now the Bois Noir, about two miles out
along the road to Martigny—a wild sparse forest of stunted pines
beneath which the lovely rosy springtime heather (Erica carnea)
luxuriates. This forest was the scene, too, of the terrible rockfall in 1835
from the summit of the Dent du Midi, which mountain, in its grandest
and most gaunt aspect, dominates this part of the valley, having as vis-
à-vis the Dent de Morcles.[5] The old Abbey of St. Maurice, built upon
pagan foundations, was for centuries a spoilt child of the Church.
Endowments and gifts were showered upon it by Charlemagne and
other kings and princes, and its actually existing treasure is priceless,
including as it does specimens of gold and silversmiths’ art from the
sixth to the seventeenth centuries.[6] High up on the side of the
precipitous cliffs at the back of the abbey is an ancient hermitage. As
one looks at it from the town there appears no sign of a path or even of
a ledge for the chapel; but on closer inspection one finds a steep and
stony way up, bordered at intervals throughout its length by Stations of
the Cross. When I visited it some years ago the hermit was absent, but
there were rats in abundance. Pilgrimages to this chapel used to be
frequent (I believe that it is closed at present), and I understand that on
these occasions freshly broken stone was strewn about the path, and
that those who felt their consciences in need of drastic measures went
up the whole way on their hands and knees.
Ten minutes’ climb above the Château of St. Maurice (now the
gendarmerie and prison) is the beautiful Fairies’ Grotto, one of the
natural wonders of this district. It is noted locally as having been the
residence of Frisette, the good fairy, after her troubles and vexations
with the bad fairy, Turlure, who, if my memory serves me, frequented
the woods and pastures around Bex. The Canton of Valais is remarkably
rich in legend. If we accept the result of the patient and exhaustive
researches of Mme F. Byse, Milton must have made himself familiar with
certain of these fairy tales when he was at Bex on his way from Italy;
for L’Allegro is held to contain conceits and fancies gathered from this
district. Emile Javelle, the famous author-alpinist (his title for himself
was clubiste inutile!), in writing of his first ascent of the Dent du Midi,
tells of his guide’s fear of the dreadful, fiery, devastating dragon that for
ages had inhabited the very district through which they must pass that
of Bonaveau and the vallon of Susanfe, above Champéry. I myself have
had narrated to me at midnight creepy hair-lifting stories of the doings
of malevolent spirits doomed since ages to frequent certain old châlets
around Champéry, notably those on the high plateau of Barmaz—upon
which châlets I involuntarily keep one careful eye whenever I am in their
neighbourhood. On another occasion at Champéry, in early morning, a
hurrying man, with awe in his eyes, breathlessly gave me to understand
that a boy, whilst sound asleep, had been transported on a blanket in
the dead of the previous night from his bed in a châlet high above the
village to the bed of the torrent far below the village, and that he had
awakened to find himself lying among the boulders with the icy water all
but dashing over him.
But we must be moving on. To reach Bex we may either cross the
bridge, the other side of which is the territory of Vaud, and follow the
road that winds along the base of wooded cliffs, or else after crossing
the bridge turn to the left up a path that leads through the earthwork
fortifications and then through vineyards to the sweet-chestnut woods of
Chiètres and the timbered hill crowned by the remnants of the castle of
Duin; or, if we are game for a long, delightful Alpine walk, we may leave
St. Maurice by the south-eastern exit, cross the Rhone to the Baths of
Lavey—boasting of evil-smelling but curative waters—past a picturesque
waterfall, then up the ever-ascending road to the village of Morcles
(taking its name from the great Dent which towers above it), thence a
path leads up through the forest and across the pasture-slopes to the
famous Croix de Javernaz[7]—famous for its grand view down the Rhone
valley to Lac Léman and the Jura Mountains, and for its wonderfully rich
Alpine flora; from there the descent is continuous until the highroad is
struck at Bévieux, whence a tram runs in a few minutes to
BEX

BEX: THE CROIX DE JAVERNAZ AND THE DENT DE


MORCLES

As a town Bex is somnolent; a sort of old-world slumber which is


scarcely dissipated even when the hotels are at their fullest. Perhaps
that mood agrees best with the eminently dream-like landscape. I know
no scene in Switzerland that is more suggestive of the studied and
bewitching pose of stageland than that from the slopes of Montet
immediately at the back of the town. On the left the Croix de Javernaz
and the Dent de Morcles, with steep woods flowing to the plain; on the
right the gaunt Cime de l’Est of the Dent du Midi, its base enveloped in a
filmy blue haze; and just in the centre of the picture the chestnut groves
on the hill of Chiètres, topped by the old Tour de Duin cleanly defined
against the opening in the cliffs at St. Maurice—an opening cut as if on
purpose to disclose the snows and ice of the Aiguille du Tour and the
glaciers of Trient and Des Grands. Seen in spring, when cherry blossom
powders the woods, or when the apple trees are rosy-white and the
fields all starred with flowers; seen in autumn, when the year’s last burst
of life fires the beech and cherry and burnishes the larch and chestnut;
seen at sunset, when the whole broad foreground is in cool-grey
shadow and the sun’s red glow rests only on the glaciers beyond St.
Maurice; seen at such moments as these this landscape is truly one of
fairyland, one of which one can never tire, and which surely will bring to
Bex an ever-increasing popularity. At present this easy-going little town
(except when the foehn[8] sets its châlets ablaze—as has happened
three times recently—or when its river, the Avançon, rising in vernal
wrath, throws down the bridges and floods the streets!) is mostly
renowned for its salt mines and baths. These salt mines are in the
abrupt cliffs beyond Bévieux, and are said to have been discovered by a
goat, which was noticed to be licking the rocks with most persistent
relish. As goats are notoriously fond of salt, this tale may be quite true.
To those who do not mind a rather damp scramble within the bowels of
the cliff, these mines are well worth a visit.
But Bex is also renowned for its wild flowers. It was whilst director of
the salt mines that Haller wrote his Histoire des Plantes de la Suisse.
Milton could have been no keen observer of such things if he saw only
fields of daisies! The hepatica (red, white, but mostly blue) in the woods
about Bévieux are simply marvellous, relieved as they are by the carpet
of dead beech leaves and by innumerable clumps of primroses, blue,
white, and lilac violets, rich crimson and peacock-blue vernal vetch,
yellow-and-white boxleaved polygala, and the lovely profusion of white
and blush-tinted wood anemones. There are fields, too, of Star of
Bethlehem on the plain towards the Rhone, where also the rare yellow
tulip may be found. The brilliant-orange Lilium croceum and the curious
and very local Snake’s-head Lily are to be found in the neighbourhood,
but I had better not say where. The gorge of the River Gryonne, at the
back of the hill of Montet, is crowded in early spring with the beautiful
Snowflake. Astrantia major and Trollius europæus (the Globe Flower)
luxuriate together by the hill of Chiètres. But perhaps the hill of Montet
is the paradise par excellence of the botanist and flower lover. Here are
orchids in abundance and variety—the Frog, Fly, Bee, Spider, and the
yellowish-white Helleborine among others; Gentiana verna carpets the
short turf with heavenly blue; the tall yellow gentian is on the open
summit; Erica carnea grows on the steep hillside beyond the forest, and
the shady woods that descend upon Bévieux are simply packed with
Lily-of-the-Valley; the gem of this hill, however, is the mass of bright-
blue Lithospermum, in colour almost rivalling the vernal gentian; why its
Latin Christian name should be purpurea I really cannot tell.
This, then, is what Voltaire, in his love of town life and society, was
pleased to look upon as being buried alive in the “caverns of Bex”![9]
Can we really be at a loss with Nature as she is at Bex? It would seem
impossible. That Nature has shortcomings is only natural, and I think we
may say, as says the inspired Bengali poet, Rabindranath Tagore, in The
Gardener:

“Infinite wealth is not yours, my patient and dusky mother dust!


The gift of gladness that you have for us is never perfect.
The toys that you make for your children are fragile.
You cannot satisfy all our hungry hopes, but should I desert you for
that?”

Nature at Bex may not be perfect, but certainly in very many respects
she is as perfect as she can be, and we are by no means deserting her
though necessity obliges us to pass on to
LES PLANS
For Nature in most lavish mood accompanies us. No matter at what
season, the two and a half hours road from Bex to Les Plans is full of
beauty for the eye and mind, but if there is one season above the others
when this beauty is the more bewitching it is that of spring. Oh, why—a
thousand times why!—is spring in the Alps so neglected by travellers
seeking charm and pleasure? Why are the Kursaals crowded in spring by
those who, at Custom’s bidding, are waiting for a later, more healthy
and resplendent season? Time will come when Custom in this matter will
surely be sent to the rightabout, and Alpine spring will be as sought
after as now is Alpine winter. It is only about twelve years ago that we
who wintered on the Alps were looked upon as mere eccentrics; yet
these few short years have proved that we were in truth the favoured
pioneers of a season that is actually becoming prime rival to that of
summer. In very faith I feel that so it shall be with spring, and that a few
years hence a new and fascinating experience will have revealed itself to
a hitherto indifferent world.[10]
As one emerges from the timbered gorge, one is confronted at once
by the jagged mountains of the chain of the Grand Muveran; not as they
appear in summer, with bare, forbidding precipice and scree, but as they
can appear in springtime only, clothed about in winter’s dissipating
snows and gladdened by an immediate foreground of glistening
crocuses on the brown orchard slopes of Frenière. At this point, looking
back, one has a splendid view of the giant hill that carries Villars upon
its breast; but the village that one sees with its old church tower clinging
to the side at a height of 1133 metres, and seemingly in difficulty to
restrain itself from slipping into the gulf, is Gryon, where Juste Olivier,
one of Switzerland’s most tuneful poets, spent his last years and sang
imperishable songs—songs that have found a place in the heart and life
of the people, particularly when the theme is the mi-été festivities at
Anzeindaz and Taveyannaz. These midsummer fêtes are held annually in
connection with the cattle and cheese industry: they are delightfully
typical of old-world custom, and the poet has done much to render them
impervious to the destructive note of modern sophistication. Both
pasturages lie on the mountains between Villars and Les Plans, and are
easy excursions from either of these places and from Gryon. Anzeindaz
is the more wild and romantic of the two, its surroundings lending
themselves admirably to these picturesque timeworn merrymakings; for
the pasturage lies at the foot of the rugged Diablerets, at the foot, too,
of a glacier, and at the base of a wild col which, although this is a closed
district against hunters, is a spot that knows well the poachers of
eagles. There can be little doubt of which way Juste Olivier would cast
his vote with regard to the railway that it is proposed shall desecrate
these fascinating wilds, dissipating their guileless, primitive associations.
He would be on the side of the angels; and the angels are on the side of
the Heimatschutz or League for the Preservation of Natural Beauty.
LES PLANS: AVALANCHE FALLING FROM THE GRAND
MUVERAN

Les Plans lies snug upon a verdant, watered plateau surrounded on all
sides but one by lofty mountains. To the west rises the steep glacier of
Plan Névé and the massive form of the Grand Muveran, beloved of
Eugène Rambert, famous alpinist-author-botanist, whose name,
together with those of Juste Olivier and Jean Muret, is graven upon the
Muveran’s sheer precipice at romantic Pont de Nant. At this latter place
—only a brief walk from Les Plans—there is a most interesting Alpine
garden belonging to the University of Lausanne; it is especially charming
in spring, with floral gems of purest hues backed by the translucent ice
and snow of the Glacier de Martinet and the Dent de Morcles.
We must now return to Bex and there take the mountain railway up to
Villars. It is an exceedingly picturesque line, winding about through
woods and pastures, and providing at each turn a changing, ever-
widening prospect. The mountains to which we have become
accustomed in the plain take upon themselves superior proportions, and
their increasing majesty and mystery come as an inevitable, surprised
delight. But, for the journey, I will confide you, without apology, to the
tender care of a versatile and well-known devotee of this lovely
neighbourhood, my friend Mr. D. R. Kelleher, who in his own quaint way
will transport you to
VILLARS IN WANING SUMMER
“The incident occurred in a mountain train carrying slowly, as is its
wont, up the wooded slope, a ‘conducted’ party of English tourists. A
little grey-eyed man was sitting in the corner, opposite a prosperous-
looking woman dressed in a black dolman and clinging with traditional
awe to her umbrella. Both were manifestly thrilled by the scenes
through which they were passing, and not a little bewildered by the
profusion of wonders in Alp, tree, and sky. At last the lady, devastated
by her curiosity, broke silence in the following scene:—

The Lady (looking anxiously through window at clump of pine trees


rich with yellow cones): “John, look at yon trees with
the fruit on.”
The Man: “Eh, but they look like bananas.”
The Lady (lighting up with a bright idea): “Ask guide, John.”
The Man (turning to guide, a sad person, long stricken by stupid
questions). “Mister, are thoose things bananas?”
The Guide (unable to rouse himself): “I don’t know.”
The Man (confidentially to his wife): “He says he don’t know.”
The Lady: “It makes no odds, John, they’re ower-ripe
anyhow—but the place is grand!”

And ‘the place is grand’ so truly defines the scene en route to Villars, the
phrase is so simple and comprehensive and so true, that we have been
lucky to get it from the lady frae Lancashire even at the tail of her lazy
mental attitude. In one sense it is the highest tribute that has ever been
paid to our fairy fastness of Villars-sur-Ollon—this conception of the fir
trees magic-laden with golden tropic fruit. If you do not believe it, take
the train at Bex, in the little Rhone valley town of wooden houses where
one dare not smoke ‘en cas de vent’ for fear that a spark flying loose
should ignite the street and render you liable to a fine of six francs and
confiscation of your pipe. And surely, if you want the most thrilling of all
personal adventure-stories with which to startle your own village on
your return from a daring holiday, this will suffice:—
“‘Strange places? Yes, I reckon I’ve seen some! I remember one night
I lost a two-franc piece in a street in Bex. I struck a match to find it.
Suddenly a wind blew out the light, and a policeman came rushing
round the corner and arrested me. I was fined six francs for striking a
match in a gale—the wind was no more than a draught from a window—
and in the dark the policeman himself picked up the two-franc piece and
walked off with it.’
“But I must not keep you too long with the fantastic, for already your
train is passing Gryon, built like a bird’s nest in the hill, and soon Villars
itself is reached. There get out, and having drunken of the panoramic
ecstasy from the Diablerets round to the mountains of Savoy, walk down
the road towards Chesières, snugly sleeping a hundred feet below Les
Ecovets. You must not go as far as Chesières however, for having
crossed the viaduct over the deep ravine a little beyond Villars I want
you to turn round quickly and tell me your candid opinion of the picture
—as soon as you can get your breath. For here, surely, if ever you are
sensitive to your environment, Beauty will take you to her breast. The
clustering fir trees, framed about with velvet plots of green under a
clear, blue-grey sky; the suggestion of the infinite in the peaks tossing in
the heat-haze like a wild sea beyond the verge of a far-away coast; the
chastening awe of the Glacier of Trient and the undertone of the gorge-
water below rising like the spirit of reflection bred of the dense solitude
of hill and sky—all these fine miracles about you! For this is the charm of
Villars, that it lies a kind of lagoon of quiet beauty amid the circling
terror of pitiless frost and snow. ‘Domestic felicity’ best describes the
atmosphere of this little hill-town, the wrath and terror of rock and
glacier mellowed by distance and yet near enough to heighten by
contrast the soft rapture of Villars reposing in the arms of its hills. Go up
another day to Les Ecovets, and, looking across to Leysin and the Tours
d’Aï and away to Lac Léman and the dim-blue Jura mountains, say if
ever ruler of the world claimed more glittering conquest than this of
yours. For whether you are mountaineer or one of the people who
‘never walk’, the groves of Les Ecovets will always lure you. Painter,
poet, rhapsodist or mere plain, blunt man, you there will find inspiration
such as is not written in any book. It must indeed have been at Les
Ecovets that the little English child, waking suddenly from a noonday
sleep, wished that he were always ‘with Christmas’; for the magic of all
pines that ever mimicked an Alpine glade on paper, the glamour of all
the berries that made your long-ago December a lustrous time in hearth
and hall, and the mystery of all Christmas memories of other climes is
here consummated in Nature’s own most ideal, most artistic scheme. I
know no place like Villars for health and holiness: the high health of
crystal air and shining peak, the strange holiness of solitude and the
silent eloquence of the sky-embracing mountains; for there in the
palpable hush are the mystic pipes of Pan that charm us on with tunes
played ‘not to the sensual ear’ but are ever making for the spirit ‘ditties
of no tone’.”

LEYSIN, SEEN FROM LES ECOVETS

I scarce know what more to say of Villars after the moving eloquence
of my friend; I am at a loss for simile and dainty word. And yet, more
must be said. Not of Villars in the spring and summer—though the
secretive little pine-surrounded lake of Chavonnes above Bretaye, and
the steep slopes of the Chamossaire, glorious with purple viola and blue
gentian, call insistently for notice—but of Villars in its sun-drenched robe
of snow; for in winter Villars is amazingly transformed and its panorama
need fear no rivals in the Alps. There is a grander and more Alpine note
in winter; there is greater mystery, austerity, sublimity in the wonderful
alignment of peak and col and glacier; there is, too, a greater
suggestion of power and vastness in the open landscape than there is in
summer; and yet, the while one admires this wide-flung, steely
grandeur, one is bathed the livelong day in glorious sunshine, there
being no hours of shadow as at many winter resorts in the Alps. A
cloudless day at Bretaye on the Chamossaire slopes, where ski-jumping
is organized and whence Mont Blanc and his attendant Aiguilles are seen
quite intimately, is a revelation in Alpine winter scenery—the deep
ultramarine forests, the crisp and radiant snow, the intense warm-blue
shadows, over the whole of which reigns a purity that is dazzling. But I
must make way for a keen and skilful all-round sportsman, well known
as a leader at
VILLARS IN WINTER
“A few years ago Villars in winter was wrapped in slumber as far as
the outside world was concerned. St. Moritz, Grindelwald, and Château
d’Oex had long been known to winter sportsmen, but Villars and its vast
possibilities from the point of view of sun worship and sport could not
long remain unknown to the ever-increasing army of winter revellers in
the Alps. In 1906 the tide set in and one hotel opened its doors for a
few weeks, and in spite of the long sleigh drive from Aigle, the
diminutive rink, and other drawbacks incidental to the first opening of a
new winter centre, the few score visitors were so delighted with their
experience that the name of Villars was fairly launched upon the flood of
popular esteem. The railway from Bex was run in winter for the first
time in 1909, and since then the development of this sunny sports-place
has been astonishing. Not only are all the hotels crowded, but numerous
châlets and private pensions have sprung up, and the neighbouring
resorts of Chesières, Arvèyes, Gryon, and even the diminutive village of
Huémoz—a few miles farther west—now look upon the winter season as
more important than that of summer. This result is in great part due to
the wonderful natural position of this centre, unsurpassed by any in the
Alps. Sheltered from the north by the range of the Chamossaire, and on
the east by that of the Grand and Petit Muveran, the Dent Favre and the
Dent de Morcles, there is a magnificent view towards the south on the
Dent du Midi, the Glacier du Trient and the Aiguilles Verte and Dru, and
the horizon is wide and open enough to allow a minimum of seven
hours’ sunshine in December, and the absence of wind enables skaters
and curlers to lunch on the rink without wrapping up in mufflers and
overcoats. But the situation is only entitled to part of the credit for the
prominent place taken by Villars in the list of Alpine winter resorts. A
great deal is due to the wonderful organization of the sports and the
bold policy of those responsible in spending large sums in making and
equipping one of the finest skating rinks in Switzerland and the finest
toboggan run outside the Engadine. The icemen are the most skilled in
their profession; the skating instructors are past masters in their
respective styles; and the ski-ing professional attached to the Sports
Club is one of the most distinguished runners and jumpers in the
country. But besides these paid professors, Villars has the advantage of
having a committee of organization, every member of which is an adept
in one or more branches of sport.
“Sport is indeed an amusement but also a business at Villars. Visitors
coming out from the fog and gloom of an English winter are satisfied for
the first few days to revel in the glorious air and sunshine, to potter
about on skates or skis, or to toboggan in desultory fashion, but when
they have got their ski-ing and skating legs and have learned to take the
rink corner of the ice-run without failing, they become filled with
enthusiasm to go for a long ski expedition, to do the ice-run against
time, or pass one of the skating tests in either English or International
style, or perhaps they are tempted by the array of silver bowls or
challenge cups. This is where the work of the committee comes in. Each
Sunday afternoon a body of athletic, serious-looking men—presumably
taking their pleasures sadly like true traditional Englanders—may be
seen in earnest deliberation in a remote corner of a certain smoking
lounge. It is the Villars Parliament, and the result of its protracted sitting
is anxiously awaited by the hundreds of visitors who crowd around the
‘Programme for the Week’ posted on notice boards in each hotel. For
ski-ers there may be a run to Bovonnaz, a gymkhana at Bretaye or a
competition for the Villars Golden Ski or Villars Ski-ing Cup, or perhaps a
test of the B.S.A. For skaters there may be an ice carnival, a hockey
match or an ice gymkhana, or an N.S.A. test. Tobogganers may perhaps
be able to risk their limbs in a race against time on the perfectly
engineered but rather appalling-looking ice-run, and curlers may
perhaps note that they have a chance of getting even with the Morgins
or Montana Curling Clubs, against whom each year out and home
matches are arranged. And when the day’s work is over, and ski-ers,
skaters, curlers, and tobogganers are back in their respective hotels,
feeling ‘splendidly fit’ after a bath and a meal, think you that they settle
down to an armchair and a pipe or a novel? Not they!—the winter
sportsman and sportswoman work hard during the day, but the evening
finds them still restless for amusement. The programme must therefore
show a succession of fancy-dress balls and cotillons, bridge drives and
bowling matches, or the committee will be called a band of slackers, or
perhaps they may receive a deputation of fascinating young ladies who
wish to know why there has been only one masked ball during the week
in such and such hotel, or perhaps some charming old ladies want to
know why they have not been catered for in the matter of bridge or
whist. Nor does the rush and movement slacken throughout the season.
No matter whether one arrives in December or February one always
feels that the season is at its height. And so it goes on until the ice
begins to get soft and the rink has to be closed for a couple of hours in
the middle of the day, and the ice-run is only open till ten o’clock, and
ski-ers have to start out betimes to make sure of good snow, and at
last, say towards the end of the first week in March, the ice is no longer
skateable, the snow is too soft for long expeditions, and the first flowers
appear upon the Chamossaire. Spring has come, and the winter
sportsman, if he is not also a botanist or flower lover but is a child of
Custom, will turn his face towards his home, thinking that the Alps are
‘done for’ until July.
THE CHAMOSSAIRE, SEEN FROM VILLARS

“The only sport which Villars has hitherto lacked is bobsleighing, and
this has now been remedied by the construction of a bob-run nearly
three miles long. The new railway from Villars to Bretaye enables
bobbers to take full advantage of this run, and also gives a great
impetus to ski-running, as it brings the ski-runner to a height of 6000
feet, and he is then fresh for the Chamossaire—the classic run and the
scene of the Villars Golden Ski race—or the Chaux Ronde, whence there
is a wonderful view of both the Oberland and the Mont Blanc chain. He
can also more easily do the long day’s trip to Château d’Oex by way of
Lac Chavonnes, La Forclaz[11], and the Col des Mosses, which is one of
the most interesting of expeditions, though it should only be undertaken
by a fairly expert runner.
“The snow on the Chamossaire is generally in fine condition until the
middle of January, but it is exposed to the full heat of the sun, and the
Chaux Ronde on the opposite side of the valley affords better running
except after a fresh fall of snow. Among other ski-runs to the north of
Villars are La Truche (5886 feet) and the Plan Chamois (6194 feet),
which may be done in two and a half or three hours with one hour for
the descent. The route lies through Chesières and Les Ecovets, where
there are some excellent north slopes for practice. The snow on this run
is best after a fresh fall or late in the season, when the sun has changed
the hard crust into the watery surface on which the expert can run
almost as well as on powdery snow. The Chaux de Traveyannaz is one
of the best runs in the neighbourhood and can be done in three and a
half or four hours, with descent to Gryon in about one and a half hours.
The best day’s expedition is that to Bovonnaz, and the easiest way to do
it is to take the early train to Gryon, thence to the top in two and three-
quarter hours, and back to Gryon in about one and a half hours. The
snow on this run is nearly always in perfect condition and the country is
distinctly more Alpine than that on the Chamossaire side. Chamois are
nearly always to be seen on the other side of the ridge separating
Bovonnaz from the Grand Muveran, and on one occasion a ski-runner
got a good snapshot of a herd of these shy animals lazing in the sun
just on the other side of the ridge, quite unaware of his presence until
they heard the click of the shutter. What a relief it must have been to
them to find afterwards that it was only a snapshot!
“Villars, whose rink is the second largest in Switzerland, is now
regarded as the most important centre of English figure skating.[12] The
English Figure Skating Club has a portion of the rink reserved for its
members, and tests of the N.S.A. are held weekly, there being nearly
always available a number of first-class judges. Mr. E. F. Benson, the
well-known novelist, has made Villars his winter quarters for several
years. He is a gold-medallist of the N.S.A. and has done a great deal for
the encouragement of English figure skating. His advice and assistance

You might also like