Asynchronous Programming with SwiftUI and Combine 1st Edition Peter Friese - The full ebook version is ready for instant download
Asynchronous Programming with SwiftUI and Combine 1st Edition Peter Friese - The full ebook version is ready for instant download
https://ebookmass.com/product/asynchronous-programming-in-rust-1st-
edition-carl-fredrik-samson/
https://ebookmass.com/product/pro-iphone-development-with-swiftui-
design-and-manage-top-quality-apps-4th-edition-wallace-wang/
Readings from Programming with C++ 1st Edition Kyla
Mcmullen
https://ebookmass.com/product/readings-from-programming-with-c-1st-
edition-kyla-mcmullen/
https://ebookmass.com/product/readings-from-programming-with-c-1st-
edition-kyla-mcmullen-2/
https://ebookmass.com/product/beginning-iphone-development-with-
swiftui-exploring-the-ios-sdk-7th-edition-wallace-wang/
https://ebookmass.com/product/r-programming-for-actuarial-science-
peter-mcquire/
Peter Friese
Asynchronous Programming with SwiftUI and Combine: Functional
Programming to Build UIs on Apple Platforms
Peter Friese
Hamburg, Germany
Foreword������������������������������������������������������������������������������������������xvii
Preface����������������������������������������������������������������������������������������������xix
Acknowledgments�����������������������������������������������������������������������������xxi
Part 1�������������������������������������������������������������������������������������������1
Chapter 1: SwiftUI: A New Beginning���������������������������������������������������3
Why a New UI Framework?�����������������������������������������������������������������������������������5
SwiftUI Principles��������������������������������������������������������������������������������������������������7
Declarative vs. Imperative�������������������������������������������������������������������������������7
State Management������������������������������������������������������������������������������������������8
Composition over Inheritance��������������������������������������������������������������������������9
Everything Is a View—Except That It Isn’t�����������������������������������������������������10
UIs Are a Function of Their State�������������������������������������������������������������������10
A Quick Tour of SwiftUI����������������������������������������������������������������������������������������11
Prerequisites�������������������������������������������������������������������������������������������������11
Creating a New SwiftUI App��������������������������������������������������������������������������11
Adding Some Interaction to Your App������������������������������������������������������������19
v
Table of Contents
vi
Table of Contents
vii
Table of Contents
Styling���������������������������������������������������������������������������������������������������������������134
List Styles����������������������������������������������������������������������������������������������������135
Headers and Footers�����������������������������������������������������������������������������������137
List Cells������������������������������������������������������������������������������������������������������139
Separators���������������������������������������������������������������������������������������������������140
Actions��������������������������������������������������������������������������������������������������������������143
Swipe-to-Delete������������������������������������������������������������������������������������������144
Moving and Deleting Items Using EditMode������������������������������������������������145
Swipe Actions����������������������������������������������������������������������������������������������147
Managing Focus in Lists�����������������������������������������������������������������������������������154
How to Manage Focus in SwiftUI�����������������������������������������������������������������154
How to Manage Focus in Lists���������������������������������������������������������������������156
Handling the Enter Key��������������������������������������������������������������������������������158
What About MVVM?�������������������������������������������������������������������������������������159
Eliminating Empty Elements������������������������������������������������������������������������163
Summary����������������������������������������������������������������������������������������������������������165
viii
Table of Contents
Part 2���������������������������������������������������������������������������������������205
Chapter 7: Getting Started with Combine�����������������������������������������207
What Is Functional Reactive Programming?�����������������������������������������������������207
Publishers���������������������������������������������������������������������������������������������������������209
Subscribers�������������������������������������������������������������������������������������������������������211
Operators����������������������������������������������������������������������������������������������������������213
Composing Operators���������������������������������������������������������������������������������������215
Combining Publishers���������������������������������������������������������������������������������������220
Summary����������������������������������������������������������������������������������������������������������223
ix
Table of Contents
x
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
Table of Contents
xi
Table of Contents
Part 3���������������������������������������������������������������������������������������361
Chapter 14: Getting Started with async/await���������������������������������363
Synchronous Programming with Functions������������������������������������������������������367
Asynchronous Programming with Closures������������������������������������������������������371
Asynchronous Programming with async/await������������������������������������������������377
Defining and Calling Asynchronous Functions��������������������������������������������377
Calling Asynchronous Functions in Parallel�������������������������������������������������381
Summary����������������������������������������������������������������������������������������������������������383
xii
Table of Contents
Index�������������������������������������������������������������������������������������������������423
xiii
About the Author
Peter Friese is a software engineer with over
30 years of experience in building software for
a wide range of platforms—from Windows,
J2EE, the Web, Android, to iOS and the Mac. He
works as a Senior Developer Advocate on the
Firebase team at Google, where he is in charge
of making sure iOS developer have a great
experience using the Firebase SDK on iOS and
Apple’s other platforms.
Peter writes about SwiftUI, Swift, and Firebase development on his
blog, peterfriese.dev, and can be found on Twitter as @peterfriese.
xv
Foreword
I’ve been developing iOS apps for a while and started learning SwiftUI
almost as soon as it was released back in 2019. I remember that I couldn’t
wait to start using it because it just seemed so much more intuitive for me
than UIKit.
There wasn’t much SwiftUI documentation at first and those of us who
jumped straight in had to figure out a lot of things for ourselves. So I started
sharing what I learned while building apps with SwiftUI on a blog.
Just a few months later, the SwiftUI team at Apple reached out to me to
join them in working on the framework. It was an invaluable experience
and it gave me a great perspective on the inner workings of SwiftUI and
the decisions behind the APIs. Sure, SwiftUI is not perfect and still needs
time to mature, but it’s already making many developers happier and more
excited about building apps for Apple platforms. A lot of thought goes into
making SwiftUI APIs as simple and as streamlined as they are, so that we
can get the right behavior for the platform by default.
I left Apple in April 2022 and joined Nil Coalescing as a cofounder and
a software engineer. Though I’m a little sad that I don’t get to contribute
to the SwiftUI framework directly anymore, I’m really happy that I’m
now able to use the APIs I helped to develop and to share my SwiftUI
knowledge with other iOS developers.
Seeing how much Apple is betting on SwiftUI by introducing new
frameworks that require using it like WidgetKit and Swift Charts, I believe
it has a great potential. It’s also nice to see how many more developers are
starting to use SwiftUI and how much more great SwiftUI-related content is
now available both from Apple and from the community.
xvii
Foreword
xviii
Preface
I started developing for iPhone OS (as it was called back then) in 2009.
I had just upgraded from an iPhone 3 to an iPhone 3GS, and I was
super excited to kick the tires and build my first app—using Xcode and
Objective-C!
I already had practice using a variety of other IDEs, languages,
and operating systems: starting out with GW-BASIC on MS-DOS, to
Visual Basic and Delphi on Windows, to Java with Jbuilder, Websphere
Application Developer, and Eclipse (for building J2EE and Spring
applications for enterprise customers).
But using Xcode and Objective-C was a bit of a shock. All the other
IDEs that I’d used before were a lot more powerful (e.g., they all offered
refactoring support), and Objective-C with all its square brackets looked a
bit strange to me.
Looking back at all the years of building software, Delphi was one of
the most productive environments I’ve used to build software. It combined
a mature, object-oriented language (Object Pascal) and a powerful IDE
that allowed developers to quickly put together UIs for Windows apps.
Plus, the tagline “Rapid Application Development” certainly had a
ring to it.
But Xcode and Objective-C were the future, so I buckled up and
continued my journey to learn how to use them.
Fast forward ten years—I had just watched WWDC 2019 and was
thrilled by SwiftUI and its ease of use. Building UIs with SwiftUI felt so
snappy, and reminded me of Delphi in many ways. I started thinking about
how amazing it would be to combine SwiftUI with a framework that makes
building backend systems easier.
xix
Preface
When the Firebase team at Google was looking for a person to join
their Developer Relations team to specifically focus on the iOS developer
ecosystem, I realized the opportunity this meant for me: bring together
a language I love (Swift), a UI toolkit that enables developers to quickly
build great-looking UIs (SwiftUI), and an SDK that makes developers more
efficient by removing the need to run and operate your own backend
system (Firebase). With all these tools, I could help people build better
apps, faster.
On day one after joining the Firebase DevRel team as a Developer
Advocate, I started building demos to showcase the features of the Firebase
iOS SDK. And I quickly learned that writing demos using SwiftUI was so
much easier than using UIKit. This ease of use meant that I could focus on
what I actually wanted to teach: how to use the Firebase SDK and its APIs.
SwiftUI’s declarative approach to building UIs is a lot more
opinionated about how your code should be structured when building UIs
programmatically, making it a lot easier for other developers to understand
what your code is supposed to do.
And thanks to using a state management model that is based on
functional reactive programming, SwiftUI and Combine make it a lot easier
to build UIs that are in sync with the underlying data model and other
parts of your app all of the time. I’m pretty sure we all know of apps for
which this is not the case and can attest to the terrible UX this means.
The goal of this book is to introduce you to building applications with
SwiftUI, Combine, and async/await. I also aim to provide some guidance
that helps you architect apps that reap the benefits of using declarative
and functional reactive approaches for building UI-heavy applications that
interface with asynchronous backend systems, such as Firebase.
Thanks for buying this book! I hope it turns out to be useful for you,
and I would love to hear from you. You can tweet me (I am @peterfriese on
Twitter), or leave a comment on the GitHub repo1 of this book.
1
https://github.com/peterfriese/SwiftUI-Combine-Book/issues
xx
Acknowledgments
Writing a book is a cross-functional effort, and the result of contributions
from many different people, and this book is no different.
First and foremost, I must thank Todd Kerpelman for believing in me
and giving me the opportunity to join the Firebase Developer Relations
team and become the resident iOS expert.
Additionally, I’d like to thank the many people who provided feedback,
encouragement, guidance, and technical expertise for the topics covered
in this book, including Heiko Behrens, Paul Beusterien, Bas Broek,
Marina Coelho, David East, Rosário Fernandes, Todd Kerpelman, Shai
Mishali, Rachel Myers, Laurence Moroney, Natalia Panferova, Donny
Wals, and Ryan Wilson. The conversations with you were invaluable input
to this book and helped inform my thinking about SwiftUI, Combine,
asynchronous programming, and how to present these topics in a
written form.
This book simply wouldn’t have been possible without the various
teams at Apress/Springer who guided me through the process and helped
shape this book into what it is now. I am particularly grateful to Aaron
Schwarz for convincing me to write this book in the first place, Clement
Wilson for helping me stay on track, and Jessica Vakili for shaping the
content into great teaching material.
I also owe a huge debt of gratitude to all the reviewers who provided
feedback along the way, including Tunde Adegoroye, Paul Beusterien,
Marcus Ficner, Adam Fordyce, Dominik Hauser, Rachel Saunders,
Florian Schweizer, and Ryan Wilson. They did an amazing job at finding
inconsistencies, typos, grammatical issues, and coding errors that the
compiler didn’t spot. Any remaining errors and mistakes are entirely mine.
xxi
Acknowledgments
If you spot any, I would be grateful if you filed an issue1 on this book’s
GitHub repository, so I can fix them for any future editions.
Finally, my deepest thanks go to my wife Anne and my sons Sören,
Lennart, and Jonas. You endured the time I put into creating this book and
its companion code, and my focus when writing it. Your encouragement
and company is what kept me going—I couldn’t have done this
without you!
1
https://github.com/peterfriese/Asynchronous-Programming-with-
SwiftUI-and-Combine/issues
xxii
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
Other documents randomly have
different content
In der folgenden Woche wurde der Tote begraben, der Sohn ging
dicht hinter dem Sarge her und konnte nun den guten Vater nicht
mehr zu sehen bekommen, der ihn so sehr geliebt hatte. Er hörte,
wie sie die Erde auf den Sarg hinunterwarfen und sah noch die letzte
Ecke desselben, aber nach der nächsten Schaufel Erde, welche
hinabgeworfen wurde, war auch die verschwunden, da war es, als
wolle sein Herz in Stücke zerspringen, so betrübt war er. Ringsherum
sangen sie einen Psalm; es waren schöne, heilige Klänge, und die
Tränen traten dem Johannes in die Augen, er weinte, und das tat
ihm in seiner Trauer wohl. Die Sonne beschien herrlich die grünen
Bäume, als wolle sie sagen: „Du darfst nicht mehr betrübt sein,
Johannes! Siehst du, wie schön der Himmel ist? Dort oben ist nun
dein Vater und bittet den lieben Gott, daß es dir allezeit wohl
ergehen möge!“
„Ich will auch immer gut sein,“ sagte Johannes, „dann komme ich
in den Himmel zu meinem Vater, und was wird das für eine Freude
werden, wenn wir einander wiedersehen! Wieviel werde ich ihm
dann nicht erzählen können, und er wird mir so viele Dinge zeigen,
mir die Herrlichkeit des Himmels erklären, ebenso wie er mich hier
auf Erden unterrichtete. Oh, was für eine Freude wird das werden!“
Er dachte sich das so deutlich, daß er dabei lächelte, während die
Tränen ihm noch über die Wangen liefen. Die kleinen Vögel saßen
oben in den Kastanienbäumen und zwitscherten: „Quivit, Quivit!“ Sie
waren froh und munter, obgleich sie mit bei dem Begräbnisse
gewesen: aber sie wußten wohl, daß der tote Mann nun im Himmel
wäre, Flügel hätte, schöner und größer als die ihrigen, daß er nun
glücklich sei, weil er hier auf Erden gut gewesen, und darüber waren
sie vergnügt. Johannes sah, wie sie von den grünen Bäumen weit in
die Welt hinausflogen, da bekam er auch Lust, mitzufliegen. Aber
zuerst schnitt er ein großes Holzkreuz, um es auf seines Vaters Grab
zu setzen, und als er es am Abend dahin brachte, war das Grab mit
Sand und Blumen geschmückt, das hatten fremde Leute getan, denn
sie hielten alle viel von dem lieben Vater, der nun tot war.
Früh am nächsten Morgen packte Johannes sein kleines Bündel
zusammen und verwahrte in seinem Gürtel sein ganzes Erbteil,
welches fünfzig Taler und ein paar Silberschillinge betrug, damit
wollte er in die Welt hinaus wandern. Aber zuerst ging er nach dem
Kirchhofe zu seines Vaters Grabe, betete ein Vaterunser und sagte:
„Lebe wohl!“
Draußen auf dem Felde, wo er ging, standen alle Blumen frisch
und schön in dem warmen Sonnenscheine, sie nickten im Winde, als
wollten sie sagen: „Willkommen im Grünen! Ist es hier nicht schön?“
Aber Johannes wendete sich noch einmal zurück, um die alte Kirche
zu betrachten, in der er als ein kleines Kind getauft und wo er jeden
Sonntag mit seinem Vater zum Gottesdienst gewesen war und
seinen Psalm gesungen hatte; da sah er hoch oben in einer der
Öffnungen des Turmes den Kirchenkobold mit seiner kleinen, roten,
spitzen Mütze stehen, wie er sein Gesicht mit dem gebogenen Arme
beschattete, da ihm sonst die Sonne in die Augen schien. Johannes
nickte ihm Lebewohl zu, und der kleine Kobold schwenkte seine rote
Mütze, legte die Hand auf das Herz und warf ihm viele Kußhändchen
zu, um zu zeigen, wie gut er es mit ihm meine, und daß er ihm eine
recht glückliche Reise wünsche.
Draußen auf dem Kirchhofe waren viele Gräber und auf einigen
wuchs hohes Gras. Da dachte er an seines Vaters Grab, welches am
Ende auch so aussehen würde wie diese, da er es nicht jäten und
schmücken konnte. Er setzte sich also nieder und riß das Gras ab,
richtete die Holzkreuze auf, welche umgefallen waren und legte die
Kränze, die der Wind vom Grabe fortgerissen hatte, wieder auf ihre
Stelle, indem er dachte: vielleicht tut jemand dasselbe an meines
Vaters Grabe, da ich es nicht tun kann!
Draußen vor der Kirchhofstüre stand ein alter Bettler und stützte
sich auf seine Krücke. Johannes gab ihm die Silberschillinge, die er
hatte, und ging dann glücklich und vergnügt weiter fort in die weite
Welt hinein.
„Das wäre gut bezahlt!“ sagte die Alte und nickte ganz eigen mit
dem Kopfe. Sie wollte die Ruten nicht gern hergeben, aber es war
auch nicht angenehm, mit gebrochenem Beine dazuliegen. So gab
sie ihm denn die Ruten, und sowie er nur die Salbe auf das Bein
gerieben hatte, erhob sich auch die alte Mutter und ging viel besser
denn zuvor. Solches konnte die Salbe bewirken. Aber die war auch
nicht in der Apotheke zu haben.
„Was willst du mit den Ruten?“ fragte Johannes nun seinen
Reisekameraden.
„Das sind drei schöne Kräuterbesen,“ sagte der, „die liebe ich sehr,
denn ich bin ein närrischer Patron!“
Dann gingen sie noch ein gutes Stück.
„Sieh, wie der Himmel sich umzieht,“ sagte Johannes und zeigte
geradeaus. „Das sind schrecklich dicke Wolken!“
„Nein,“ sagte der Reisekamerad, „das sind keine Wolken, das sind
Berge — die herrlichen großen Berge, wo man hinauf über die
Wolken und in die frische Luft gelangt! Glaube mir, da ist es herrlich!
Morgen sind wir sicher weit in der Welt.“
Das war aber nicht so nahe, wie es aussah, sie hatten einen
ganzen Tag zu gehen, bevor sie die Berge erreichten, wo die
schwarzen Wälder gegen den Himmel aufwuchsen und wo es Steine
gab, fast so groß als eine große Stadt. Das mochte wahrlich eine
schwere Anstrengung werden, da hinüberzukommen, aber darum
gingen auch Johannes und sein Reisekamerad in das Wirtshaus
hinein, um sich gut auszuruhen und Kräfte zum morgenden Marsche
zu sammeln.
Unten in der großen Schenkstube im Wirtshause waren viele
Menschen versammelt, denn dort war ein Mann, der gab
Puppenkomödie. Er hatte soeben sein kleines Theater aufgestellt,
und die Leute saßen ringsumher, um die Komödie zu sehen. Aber
vorn hatte ein dicker Schlächter Platz genommen, und zwar den
allerbesten; sein großer Bullenbeißer — der sah sehr bissig aus! —
saß an seiner Seite und machte große Augen, so, wie alle andern.
Nun begann die Komödie, und das war eine niedliche Komödie mit
einem Könige und einer Königin, die saßen auf dem schönsten
Throne, hatten goldene Kronen auf dem Haupte und lange
Schleppen an den Kleidern, denn ihre Mittel erlaubten das. Die
niedlichsten Holzpuppen mit Glasaugen und großen Schnurrbärten
standen an allen Türen und machten auf und zu, damit frische Luft
in das Zimmer kommen konnte. Es war eine recht niedliche
Komödie. Aber als die Königin aufstand und über den Fußboden
hinging, machte der große Bullenbeißer — Gott mag wissen, was er
sich dachte — da der dicke Schlächter ihn nicht hielt, einen Sprung
stracks hinein in das Theater und packte die Königin mitten um ihre
Taille, daß es knackte. Es war schrecklich!
Der arme Mann, der die Komödie gab, war sehr erschrocken und
betrübt über seine Königin! Denn es war die allerniedlichste Puppe,
die er hatte, und nun hatte der häßliche Bullenbeißer den Kopf
abgebissen. Aber als die Leute später fortgingen, sagte der Fremde,
der mit Johannes gekommen war, daß er sie schon wieder zurecht
machen würde, und dann nahm er seine Büchse hervor und
schmierte die Puppe mit der Salbe, womit er der alten Frau
geholfen, als sie das Bein gebrochen hatte. Sowie die Puppe
geschmiert worden, war sie wieder ganz, ja sie konnte sogar alle
ihre Glieder selbst bewegen, man brauchte nicht mehr an der Schnur
zu ziehen. Die Puppe war wie ein lebendiger Mensch, nur daß sie
nicht sprechen konnte. Der Mann, der das kleine Puppentheater
hatte, war sehr froh, nun brauchte er diese Puppe nicht mehr zu
halten, die konnte ja von selbst tanzen. Das konnte keine der
andern.
Als es später Nacht wurde und alle Leute im Wirtshause zu Bett
gegangen waren, war jemand da, der so schrecklich tief seufzte und
solange damit fortfuhr, daß alle aufstanden, um zu sehen, wer es
wäre. Der Mann, der die Komödie gegeben hatte, ging nach seinem
kleinen Theater hin, denn dort war es, wo jemand seufzte. Alle
Holzpuppen lagen untereinander: der König und alle Trabanten, und
die waren es, die so jämmerlich seufzten und mit ihren Glasaugen
stierten, denn sie wollten so gern wie die Königin ein wenig
geschmiert werden, damit sie sich auch von selbst bewegen
könnten. Die Königin legte sich sofort auf die Knie und streckte ihre
prächtige Krone in die Höhe, während sie bat: „Nimm mir diese,
aber schmiere meinen Gemahl und meine Hofleute!“ Da konnte der
arme Mann, der das Theater und die Puppen besaß, nicht
unterlassen zu weinen, denn es tat ihm wirklich ihretwegen leid. Er
versprach sogleich dem Reisekameraden, ihm alles Geld zu geben,
was er am nächsten Abend für seine Komödie erhalten würde, wenn
er nur vier bis fünf von seinen niedlichen Puppen schmieren wolle.
Aber der Reisekamerad sagte, daß er durchaus nichts weiter
verlange, als den Säbel, den jener an seiner Seite habe, und als er
den erhielt, beschmierte er sechs Puppen, die sogleich tanzten und
zwar so niedlich, daß alle die lebenden Menschenmädchen, die es
sahen, alsbald mittanzten. Der Kutscher und die Köchin tanzten, der
Diener und das Stubenmädchen, alle die Fremden und die
Feuerschaufel und die Feuerzange, aber die fielen um, als sie die
ersten Sprünge machten. — Ja, das war eine lustige Nacht!
Aber die Prinzessin war ja noch eine Hexe und mochte Johannes gar
nicht leiden. Das fiel dem Reisekameraden ein, und deshalb gab er
Johannes drei Federn aus den Schwanenflügeln und eine kleine
Flasche mit einigen Tropfen darin und sagte ihm dann, daß er ein
großes Faß mit Wasser gefüllt vor das Bett der Prinzessin setzen
lassen solle, und wenn die Prinzessin hineinsteigen wolle, sollte er
ihr einen kleinen Stoß geben, so daß sie in das Wasser hinunterfalle,
wo er sie dreimal untertauchen müsse, nachdem er vorher die
Federn und die Tropfen hineingeschüttet habe, dann werde sie ihre
Zauberei verlieren und ihn recht lieb haben.
Johannes tat alles, was der Reisekamerad ihm geraten hatte. Die
Prinzessin schrie laut, als er sie unter das Wasser tauchte, und
zappelte ihm unter den Händen wie ein großer, schwarzer Schwan
mit funkelnden Augen. Als sie das zweitemal wieder über das Wasser
herauf kam, war der Schwan weiß, bis auf einen schwarzen Ring um
den Hals. Johannes betete fromm zu Gott und ließ das Wasser das
drittemal über den Vogel zusammenschlagen, und in demselben
Augenblick wurde dieser in die schönste Prinzessin verwandelt. Sie
war noch schöner als zuvor und dankte ihm mit Tränen in ihren
herrlichen Augen, daß er den Zauber von ihr gelöst habe.
Am nächsten Morgen kam der alte König mit seinem ganzen
Hofstaate, da gab es ein Gratulieren bis spät in den Tag hinein.
Zuletzt kam der Reisekamerad, er hatte seinen Stock in der Hand
und das Ränzel auf dem Rücken. Johannes küßte ihn viele Mal und
sagte, er dürfe nicht fortreisen, er solle bei ihm bleiben, denn er
wäre ja die Ursache seines Glücks. Aber der Reisekamerad schüttelte
mit dem Kopfe und sagte mild und freundlich: „Nein, nun ist meine
Zeit um. Ich habe nur meine Schuld bezahlt. Erinnerst du dich des
toten Mannes, dem die bösen Menschen Übles tun wollten? Du gabst
alles, was du besaßest, damit er Ruhe in seinem Grabe haben
konnte. Der Tote bin ich!“
In demselben Augenblicke war er verschwunden. —
Die Hochzeit währte nun einen ganzen Monat. Johannes und die
Prinzessin liebten einander innig, und der alte König erlebte manche
frohe Tage und ließ ihre kleinen Kinderchen auf seinen Knien reiten
und mit seinem Zepter spielen. Aber Johannes wurde König über das
ganze Land.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookmass.com