Professional Documents
Culture Documents
Volker Buzek
Bielefeld, Germany
This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.
The publisher, the authors, and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress
Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
This book is dedicated to all open source developers out there. Your
contributions have a significant impact on the world, and they inspire us.
Keep going strong!
Volker would like to thank his wife Stella for her support throughout
the writing process – ad astra, Puzzlestück! – and his kids for making
time when needed (although they now know more audio books than
they should).
Foreword
Are you currently facing the challenge of making technology decisions
for your project? If not, you’ve likely encountered this situation before
or will do so in the future. As the chief architect at SAP for the SAP UI
technologies OpenUI5/SAPUI5, UI5 Web Components, and
Fundamental Library Styles, I often assist teams and customers in their
UI technology decisions. It often comes down to personal preference,
skills, requirements, and environment. That’s why books like this one
are invaluable for making independent technological decisions. They
provide a quick overview and help you dive into technologies because
there’s nothing more important than forming your own impression.
I met Volker Buzek for the first time in 2018 at UI5con, the
conference dedicated to UI5. Since then, we’ve stayed in close contact
and occasionally meet up for hackathons. Together we started the UI5
ecosystem showcase to demonstrate the openness and extensibility of
the UI5 Tooling and to provide several examples for the UI5 community.
At around the same time, I also connected with Marius Obert, who
worked as a UI developer and Developer Advocate in cloud
programming for SAP. Due to his proximity to UI, we had several
connection points in the past and especially with the start of the easy-
ui5 project, a project generator for UI5.
Last year, Volker approached me with the idea of authoring a book
serving as a practical guide about the various SAP UI technologies and
how to use them to build enterprise-grade web applications that follow
the SAP Fiori design guidelines. I really liked the idea because there are
hardly any books that compare these UI technologies and highlight
their differences. In my opinion, it’s essential to understand these
differences, their value propositions, and the target environments
they’re designed for. Each SAP UI technology is tailored for specific use
cases: Fundamental Library Styles, for example, is a lightweight
presentation layer to style web pages and applications, whereas UI5
Web Components is a library providing independent and reusable UI
elements. Both technologies are based on web standards and can
therefore be used with any framework of your choice.
Frameworks themselves are coming with distinct feature sets and
different levels of abstraction to shield developers from complexities
and let them focus on their work: in OpenUI5/SAPUI5, you mainly work
with predefined layouts and controls that you stitch together and share
through views or components. The framework offers built-in data
binding, allowing easy connection to backend services via dedicated
models – a convenient solution to quickly build business applications.
On top, you find SAP Fiori elements, which uses a template- and
metadata-driven approach. With this framework, developers can easily
create SAP Fiori applications based on OData services and annotations
that don't need JavaScript UI coding at all.
As you can see, each of these technologies has advantages and
disadvantages. Higher abstraction levels offer more convenience but
less freedom. Unfortunately, there is no “one technology to rule them
all,” but it’s essential to know which use cases each UI technology excels
in.
Now it’s your turn to dive into this book. Despite my own
background and experience with these technologies, this book has
provided me with valuable insights from an external perspective.
Reading the chapters and following the concise and clear examples in
this book has even inspired me with ideas on how to enhance these
technologies to better meet your needs as consumers of the SAP UI
technologies.
Finally, it’s on you to decide: learn carefully, explore deeply, and
choose wisely!
Peter Muessig
Introduction
Over the past decade, we’ve worked on countless projects that involved
SAP UI technologies. And there was one constant throughout all the
projects: the developers had the feeling that they needed to fight
against the stigma that an SAP user interface cannot look nice and have
a great user experience. While there are undoubtedly user interfaces
with an unintuitive user experience, there are many examples of great
user interfaces built with modern web technology suited for the task at
hand. With the right tools and technologies for your use case, you can
build the user interfaces your customer will love.
Chapter 1 of this book will introduce you to the user experience
concept of SAP Fiori, which can be implemented with several state-of-
the-art web technologies. Each following chapter will provide an
overview of one of these popular technologies and explain in which
situations this technology is beneficial. The hands-on tutorials in each
will help you kick-start your development journey, from setting up your
coding editor to building your first application with SAPUI5, SAP Fiori
elements, UI5 Web Components, or Fundamental Library Styles. We
know that technology, especially UI technology, can change rapidly.
Hence, Chapter 5 will introduce you to new technologies that we
already see on the horizon today and put them in the larger context of
industry-wide trends. For trends beyond the horizon, Chapter 6 will
point you to resources on the Web and communities in real life that will
help you stay on top of future innovations. After reading this book, you
will be able to build intuitive applications with appealing user
interfaces that are SAP Fiori conform. Modern web technologies and
enterprise user interfaces can go hand in hand.
Whom This Book Is For
This book is suitable for both junior and experienced developers. For
junior developers, it serves as an introduction to enterprise software
development and provides a comprehensive understanding of the
requirements for building intuitive user interfaces for SAP applications.
For experienced developers, the book covers new and emerging
technologies in the past decade, as well as those on the horizon.
Ultimately, the book is a comprehensive guide to building intuitive and
visually appealing user interfaces for SAP applications using modern
web technologies.
Any source code or other supplementary material referenced by the
author in this book is available to readers on GitHub
(github.com/apress). For more detailed information, please visit
http://www.apress.com/source-code.
Acknowledgments
We would like to express our appreciation to all those who have
patiently guided us in learning programming, whether in the classroom,
at work, online, or elsewhere. This book owes much to your
contributions, and we hope that it can serve as our humble offering to
the community by sharing our knowledge.
A virtual wave goes to the global UI5 community! We hope that this
book fosters it as the friendly, curiosity-driven place it was from the
beginning.
We also extend our sincere gratitude to the Apress team for their
valuable assistance and cooperation in the making of this book.
Table of Contents
Chapter 1:Enterprise User Interfaces
The SAP Journey in a Nutshell
To a Hammer, Everything Looks like a Nail
Consumer-Grade vs.Enterprise Readiness
Enterprise Software – Today and in the Future
A Note on Development Environments
Characteristics of an Enterprise-Grade Development
Environment
Production Boosters
Looking Through the Frontend Lens
The SAP Fiori Design System
Summary
Chapter 2:Dual:SAPUI5 and OpenUI5
What Is SAPUI5?
Setting Up Your Workspace
Learning by Doing
Bootstrap the Project
Enrich the UI with More Controls
Build a Reusable and Consistent Header
Navigate to New Views
Show a List of Beers
Validate User Input
Debug the Code
Translate the User Interface
Build the Project
Make the App Robust
Unit Tests
Integration Tests
End-to-End Tests
Deploy Continuously
The Road from Here
UI5 for Enterprise Applications
Chapter 3:Colossal:SAP Fiori Elements
What Is SAP Fiori Elements?
Introducing the Open Data Protocol
SAP Fiori Elements Configuration
Learning by Doing
Bootstrap the Project
Give It a Test Run
Filter the Data
Hide Irrelevant Columns
Autoload Data
A Header for Details
A Custom Fragment
Inspecting the Changes
Make the App Robust
Deploy Continuously
Include Parts of SAP Fiori Elements in UI5 Freestyle Apps
The Road from Here
SAP Fiori Elements for Enterprise Applications
Chapter 4:Standard:UI5 Web Components
What Are Web Components?
Setting Up Your Workspace
Learning by Doing
Bootstrap the Project
Install the UI5 Web Components Dependencies
Add More Components
Display Sample Data
Handle Form Submissions
Build
A Note on Debugging, Testing, and Deployment
Usage with SPA Frameworks
Usage in UI5
Usage in React
The Road from Here
UI5 Web Components for Enterprise Applications
Chapter 5:Elementary:Fundamental Library Styles
What Are Fundamental Library Styles?
Extending CSS
Setting Up Your Workspace
Learning by Doing
Copy the Existing Project
Add HTML Elements with Fundamental Styles
Integrate Fundamental Library Styles in Your Project
Clear the List
Bring the Form Back
Use Sass Mixins
Build and Deployment
The Road from Here
Fundamental Library Styles for Enterprise Applications
Chapter 6:Industry Trends Impacting SAP UI Technologies
Visual UI Development
Type Safety in the Frontend
Micro Frontends
GraphQL
Next-Gen Full-Stack Web Frameworks
Chapter 7:Staying on Top of the Ball
Meeting the Community in Real Life
SAP TechEd
SAP User Group Events
UI5con
SAP Stammtisch
SAP Inside Tracks
Joining the Community Virtually
SAP Community
YouTube
OpenSAP
Twitter &Co
Slack &Co
Stack Overflow
Mailing Lists
GitHub
The Journey Just Started
Index
About the Authors
Marius Obert
started his software development career
as a UI developer in sunny California at
SAP Labs. During this time, he learned to
love web technologies in general, such as
JavaScript, and the entire Node.js
ecosystem in particular.
After many ugly fights against CSS, he
relocated to Munich, working as a
Developer Evangelist. In this role, he
tries to inspire his peer developers
around the globe to build cloud-native
apps with excellent customer
engagement.
Besides his day job, Marius tries to
keep current with Web 3.0 technologies.
Volker Buzek
works as a development architect in the
SAP web/mobile cosmos, often at the
boundary of SAP/non-SAP. As an SAP
Mentor, he fosters the adoption of open
source within the SAP ecosystem and is
actively involved in the SAP community.
In his spare time, the trained scuba
instructor enjoys spending time at and in
the ocean with his family.
About the Technical Reviewer
Peter Muessig
, chief architect at SAP, is responsible for
several UI technologies such as SAPUI5,
UI5 Web Components, Fundamental
Library, and Luigi. His journey started in
2005 in SAP NetWeaver development. In
2008, he played a key role in evaluating
different UI technology options. This
evaluation led to the birth of Project
Phoenix in 2009, an ambitious initiative
to develop a modern, responsive,
enterprise-grade web UI framework for
business applications, ultimately
resulting in SAPUI5.
Since then, Peter has made significant
contributions across various areas within the SAPUI5 framework and
its accompanying tools. His unwavering passion for change and
innovation has kick-started projects such as SAP Web IDE, UI5
Evolution, UI5 Web Components, UI5 Tooling, and its open source
ecosystem. Peter likes to explore other frameworks and technologies,
finding value in both their practical application and their ability to
inspire him with fresh ideas. In addition to his passion for UI, he deeply
cares about the development experience and enjoys full-stack end-to-
end development.
In 2022, Peter took on additional responsibilities for Fundamental
Library and Luigi, focusing on aligning the different technology options
to ensure compatibility and avoid redundancy. His goal is to provide an
interoperable and complementary UI technology offering to cover all
kinds of scenarios.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer
Nature 2023
M. Obert, V. Buzek, SAP UI Frameworks for Enterprise Developers
https://doi.org/10.1007/978-1-4842-9535-9_1
Characteristics of an Enterprise-Grade
Development Environment
What sets the development environment in an enterprise apart from
your next-door startup are the requirements “the” corporate IT
department imposes on the developers. It can range from a locked-
down computer with minimal user rights to web proxies that restrict
access to a selected few websites only, up to more than one virus
scanner running at the same time. From the corporate view, all of this
represents countermeasures against the fear of being hacked or
becoming a victim of ransomware. In these cases, a malicious actor
gains access to the internal infrastructure of a company via a vulnerable
client computer located in the company network, then steals sensitive
data or encrypts network shares, offering decryption for a ransom only.
Yet at this time, the question that must be allowed to ask is, how
likely is the preceding threat scenario to be initiated via a developer
machine as opposed to an average office work computer? If people
from middle management answer this truthfully, they have to
acknowledge that the chances of an attack happening by opening
malicious Microsoft Office attachments or by social engineering far
outweigh those of a compromised programming tool. Why impose the
same security restrictions on computers intended for (UI) development
as on those for regular office work?
That’s precisely why we recommend enterprises regarding SAP UI
development to give developers the permissions they need. Allow
them a free choice for their work environments by minimizing
technical constraints that sabotage productive development
processes.
What is the cost of an impaired development environment? It
prevents developers from getting in the flow, which means reduced
creativity and even less productivity. And it will foster developers’ urge
to cut corners and circumvent the hindrances by experiments better
not conducted. Overall, an impaired development environment will
drain your development force of energy and require significant self-
control from them to continue working, resulting in a downward spiral
of team morale. Ultimately, everybody loses.
How can that be avoided?
Production Boosters
There’s no one true cookbook for this. Still, specific measures should be
Restrict virus scanning to machine idle times: Only trigger scans
centrally at times when client computers have been idle for a certain
amount of time. Additionally, exclude specific I/O-heavy directories
(such as /**/*/node_modules) from scanning altogether.
Otherwise, programming routines might be severely impeded.
Don’t restrict access to new top-level domains: Just because
stackoverflow.com8 lives as a .com domain doesn’t mean that other
resources are available as .com, .org, or .net only. A prime
example is the new .dev top-level domain: Google states “.dev is a
secure domain for developers and technology. From tools to
platforms, programming languages to blogs, .dev is a home for all
the interesting things that you build.” (https://get.dev)
Don’t force-proxy all Internet-facing traffic: In the Node.js world,
which plays a large role in UI development, installing modules
requires traffic to central repositories such as npmjs.com. If proxied,
cache-related side effects tend to occur, preventing module
installation and thus hindering development work. So instead of
proxying all traffic, only do that for heavily used sites, like
stackoverflow.com,9 where caching really pays off.
Don’t force “always online” at edit time: Web-based editors tend to
solve two main purposes. First, they provide a quick way to set up a
development environment. Second, they live on the Web and are thus
less of a liability for corporate networks. While both aspects remain
true, a web-based editor imposes an “always online” paradigm on
your developers, introducing a single point of failure. If Internet
connectivity is lost, no developer can work anymore, and
productivity grinds to a halt. Additionally, “always online” prevents
any mobility for your workforce. Neither Wi-Fi nor cellular reception
has perfect coverage in any country. Thus, laptops are merely
reduced to static workstations from a programming perspective.
Instead, allow for offline development capabilities: with your tech
stack working in flight mode, a boost in production for your
programming force is imminent. Feedback loop speed increases, as
the overhead for network roundtrips is removed. Thus, the
development environment responds faster, gets the developer in the
flow, and fosters creativity.
Don’t shut off central development resources: Getting work done in the
programming world doesn’t always happen during regular 9-to-5
hours. Programming has artistic influences and requires creativity.
That muse might come to the developer at odd hours, allowing them
a mighty productive coding session – which cannot happen when
centrally managed resources such as servers or network access,
including virtual private networks (VPNs), are shut off for
maintenance. The option to further ignite that creativity spark into
becoming a full-on blaze should be supported by the development
environment. To accomplish this, refrain from stopping development
resources in favor of their quality assurance (QA) counterparts. Testing
usually happens at times that can be well planned for. Keep things in
your testing or QA landscape running at the required hours, and stop
them at off-peak times to save money and environmental strain.
But the ultimate productivity boost is to trust your developers
– because a locked-down developer computer not only represents a
futile attempt against external threats but also constitutes a
subconscious mistrust against the developers themselves. It’s like
asking them, “are you really capable of properly using this machine?”
Instead of giving in to fear and mistrust, allow your developers to
use their tools of choice. Developers are digital craftspeople. And only
when a craftsperson is allowed to use the tools they are most
comfortable with, a true productivity gain can happen. If you force
tooling upon the craftsperson, only habituation will take place, with the
person getting adjusted to the utensils – but a rise in productivity will
not materialize. Or would you tell your hired carpenter what tools to
use?
Development managers will be able to speed up the feedback loop
and accelerate the path to a successful product. Development
environments, with creative headroom for your developers, will foster
useful experiments and allow them to get in the flow. This results in
increased morale, quicker feature delivery, and little work incentive
needed: your developer productivity will escalate.
Our recommendation to all developers is to accompany any
management effort for a fast development environment. Support them
by explaining your tool choice properly. Don’t just say you “like”
software tooling, but illustrate why it’s helpful to you and even how
your colleagues might benefit when the entire team tries using it. If you
make tool choices comprehensible, chances are that you’re properly
supported in return by getting the best tool for the buck.
Oh, and by the way, don’t be afraid of the command line. The future
was and is terminal. If the most important parts of your development
environment and tech stack, in general, can be accessed via the
command line, there will be little friction between developing locally
and doing DevOps work for Continuous Integration and Delivery. For
the modern SAP UI frameworks in this book, many tasks will be done in
your terminal. Embrace and use it properly!
2. Adaptive: SAP Fiori apps are designed to adapt to the needs and
preferences of individual users and to work seamlessly across
various devices and screen sizes.
3. Coherent: SAP Fiori apps are designed to have a consistent look and
feel, with similar navigation and design elements, to provide a
cohesive user experience.
4. Simple: SAP Fiori apps are designed to be easy to use, with a clear
and intuitive user interface and minimal steps to complete tasks.
EL AUCTOR Á LERIANO
Asi, señor, querria ser discreto
para alabar tu seso como
poderoso para remediar tu mal,
porque fueses alegre como yo
deseo y loado como tú mereces.
Digo esto por el sabio sofrimiento
que en tal tiempo muestras, que
como viste tu iuyzio enbargado de
pasion conociste que seria lo que
obrases no segund lo que sabes
mas segund lo que sientes, y con
este discreto conocimiento
quesiste antes errar por mi
conseio sinple y libre que acertar
por el tuyo natural y enpedido.
Mucho he pensado sobre lo que
en esta tu grande fortuna se deue
hazer y hallo segund mi pobre
iuyzio que lo primero que se
cunple ordenar es tu reposo, el
qual te desuia el caso presente.
De mi voto el primer acuerdo que
tomaste sera el postrero que
obres, porque como es gran cosa
la que as de enprender, assi
como gran pesadunbre se deue
determinar; sienpre de lo dubdoso
se ha de tomar lo mas seguro, y
si te pones en matar á Persio y
librar á Laureola deues antes ver
si es cosa con que podras salir,
que como es de mas estima la
onrra della que la vida tuya, sino
pudieses acabarlo dexarias a ella
condenada y a ti desonrrado.
Cata que los onbres obran y la
ventura iuzga; si a bien salen las
cosas son alabadas por buenas, y
si a mal auidas por desuariadas.
Si libras a Laureola dirase que
heziste osadia y sino que
pensaste locura; pues tienes
espacio daqui a nueue dias que
se dara la sentencia prueua todos
los otros remedios que muestran
esperança, y si en ellos no la
hallares dispornas lo que tienes
pensado, que en tal demanda
avnque pierdas la vida la daras a
tu fama. Pero en esto ay una cosa
que deue ser proueyda primero
que lo cometas y es esta:
estemos agora en que as forçado
la prision y sacado della a
Laureola. Si la traes a tu tierra es
condenada de culpa; donde
quiera que allá la dexes no la
librarás de pena. Cata aqui mayor
mal que el primero. Pareceme a
mi, para sanear esto obrando tú
esto otro, que se deue tener tal
forma: yo llegaré de tu parte a
Galio, hermano de la reyna, que
en parte desea tanto la libertad de
la presa como tú mismo, y le dire
lo que tienes acordado, y le
suplicaré, por que sea salva del
cargo y de la vida, que esté para
el dia que fueres con alguna
gente, para que si fuere tal tu
ventura que la puedas sacar, en
sacandola la pongas en su poder
a vista de todo el mundo, en
testimonio de su bondad y tu
linpieça; y que recebida, entre
tanto que el rey sabe lo vno y
provee en lo otro, la ponga en
Dala fortaleza suya donde podra
venir el hecho a buen fin. Mas
como te tengo dicho, esto se ha
de tomar por postrimero partido.
Lo que antes se conuiene
negociar es esto: yo yre a la corte
y iuntaré con el cardenal de
Gausa todos los caualleros y
perlados que ay se hallaren, el
qual con voluntad alegre suplicará
al rey le otorgue a Laureola la
vida; y si en esto no hallare
remedio suplicaré a la reyna que
con todas las onestas y
principales mugeres de su casa y
cibdad le pida la libertad de su
hija, á cuyas lagrimas y peticion
no podrá, a mi creer, negar
piedad. Y si aqui no hallo
esperança dire a Laureola que le
escriua certificandole su
inocencia; y quando todas estas
cosas me fueren contrarias
proferirme al rey que daras vna
persona tuya que haga armas con
los tres maluados testigos; y no
aprouechando nada desto
probarás la fuerça en la que por
ventura hallarás la piedad que en
el rey yo buscaua. Pero antes que
me parta me parece que deues
escreuir a Laureola esforçando su
miedo con seguridad de su vida la
qual enteramente le puedes dar.
Que pues se dispone en el cielo
lo que se obra en la tierra, no
puede ser que Dios no reciba sus
lagrimas inocentes y tus
peticiones iustas.
EL AUCTOR
Solo vn punto no salio Leriano de
mi parecer porque le parecio
aquél propio camino para
despachar su hecho mas
sanamente, pero con todo esso
no le aseguraua el coraçon,
porque temia, segund la fama del
rey, mandaria dar antes del plazo
la sentencia, de lo qual no me
maravillaua, porque los firmes
enamorados lo mas dudoso y
contrario creen mas ayna, y lo
que mas desean tienen por
menos cierto. Concluyendo él
escriuió para Laureola con mucha
duda que no querria recebir su
carta, las razones de la cual
dezian assi:
CARTA DE LERIANO Á
LAUREOLA
Antes pusiera las manos en mí
para acabar la vida que en el
papel para començar a escreuirte,
si de tu prision uvieran sido causa
mis obras como lo es mi mala
fortuna. La qual no pudo serme
tan contraria que no me puso
estado de bien morir segund lo
que para saluarte tengo
acordado; donde si en tal
demanda muriese tú serás libre
de la prision y yo de tantas
desauenturas: assi que será vna
muerte causa de dos libertades.
Suplicote no me tengas enemiga
por lo que padeces, pues como
tengo dicho no tiene la culpa dello
lo que hize, mas lo que mi dicha
quiere. Puedes bien creer por
grandes que sean tus angustias,
que siento yo mayor tormento en
el pensamiento dellas que tú en
ellas mismas. Pluguiera a Dios
que no te uviera conocido, que
avnque fuera perdidoso del mayor
bien desta vida que es averte
visto, fuera bienauenturado en no
oyr ni saber lo que padeces.
Tanto he vsado beuir triste que
me consuelo con las mismas
tristezas por causallas tú. Mas lo
que agora siento, ni recibe
consuelo, ni tiene reposo porque
no deja el coraçon en ningun
sosiego. No acreciente la pena
que sufres la muerte que temes,
que mis manos te saluarán della.
Yo he buscado remedios para
templar la ira del rey; si en ellos
faltare esperança, en mí la
puedes tener, que por tu libertad
haré tanto que será mi memoria,
en quanto el mundo durare,
exemplo de fortaleza. Y no te
parezca gran cosa lo que digo,
que sin lo que tú vales la iniusticia
de tu prision haze iusta mi osadia.
¿Quien podra resistir mis fuerças
pues tú las pones? qué no osará
el corazon enprender estando tú
en él? Solo vn mal ay en tu
saluacion, que se compra por
poco precio segund lo que
mereces. Avnque por ella pierda
la vida, no solamente esto es
poco; mas lo que se puede
desear perder no es nada.
Esfuerça con mi esperança tu
flaqueza, por que si te das a los
pensamientos della, podria ser
que desfallecieses, de donde dos
grandes cosas se podrian
recrecer. La primera y mas
principal, seria tu muerte; la otra
que me quitarias a mi la mayor
onrra de todos los onbres no
podiendo saluarte. Confia en mis
palabras, espera en mis
pensamientos, no seas como las
otras mugeres que de pequeñas
causas reciben grandes temores.
Si la condicion mugeril te causare
miedo, tu discrecion te dé
fortaleça la qual de mis
seguridades puedes recebir, y
porque lo que haré será prueua
de lo que digo, suplicote que lo
creas. No te escribo tan largo
como quisiera por proueer lo que
a tu vida cunple.
EL AUCTOR
En tanto que Leriano escreuia
ordené mi camino y recebida su
carta partime con la mayor priesa
que pude; y llegado á la corte
trabaié que Laureola la recibiese,
y entendi primero en dargela que
ninguna otra cosa hiziesse por
dalle algun esfuerço; y como para
vella me fuese negada licencia,
informado de vna camara donde
dormia vi una ventana con vna
rexa no menos fuerte que
cerrada; y venida la noche,
doblada la carta muy sotilmente
pusela en vna lança y con mucho
trabaio echela dentro en su
camara. Y otro dia en la mañana
como disimuladamente por alli me
anduuiese, abierta la ventana vila,
y vi como vido, como quiera que
por la espesura de la rexa no la
pude bien deuisar. Finalmente ella
respondio: y venida la noche
quando sintio mis pisadas echó la
carta en el suelo, la qual recebida,
sin hablarle palabra por el peligro
que en ello para ella auia, acordé
de yrme; y sintiendome yr dixo:
cata qui el gualardon que recibo
de la piedad que tuve. Y porque
los que la guardauan estauan
iunto comigo no le pude
responder. Tanto me lastimó
aquella razon que me dixo, que si
fuera buscado, por el rastro de
mis lagrimas pudieran hallarme.
Lo que respondio á Leriano fue
esto.
CARTA DE LAUREOLA Á
LERIANO
No sé, Leriano, qué te responda
sino que en las otras gentes se
alaba la piedad por virtud y en mi
se castiga por vicio. Yo hize lo
que deuia segund piadosa y
tengo lo que merezco segund
desdichada. No fue por cierto tu
fortuna ni tus obras causa de mi
prision, ni me querello de tí ni de
otra persona en esta vida, sino de
mí sola que por librarte de muerte
me cargué de culpa, como quiera
que en esta compasion que te
uve mas ay pena que cargo, pues
remedié como inocente y pago
como culpada. Pero todavia me
plaze mas la prision sin yerro que
la libertad con él, y por esto
avnque pene en sofrilla, descanso
en no merecella. Yo soy entre las
que biuen la que menos deuiera
ser biua. Si el rey no me salua
espero la muerte, si tú me
delibras la de tí y de los tuyos, de
manera que por vna parte o por
otra se me ofrece dolor. Si no me
remedias he de ser muerta; si me
libias y lieuas sere condenada; y
por esto te ruego mucho te
trabaies en saluar mi fama y no
mi vida, pues lo vno se acaba y lo
otro dura. Busca como dizes que
hazes quien amanse la saña del
rey, que de la manera que dizes
no puedo ser salua sin
destruycion de mi onrra. Y
dexando esto á tu conseio que
sabras lo meior, oye el galardon
que tengo por el bien que te hize.
Las prisiones que ponen á los que
han hecho muertes me tienen
puestas porque la tuya escusé;
con gruesas cadenas estoy atada,
con asperos tormentos me
lastiman, con grandes guardas
me guardan, como si tuuiese
tuercas para poderme salir. Mi
sofrimiento es tan delicado y mis
penas tan crueles, que sin que mi
padre dé la sentencia, tomará la
vengança muriendo en esta dura
carcel. Espantada estoy cómo de
tan cruel padre nació hija tan
piadosa; si le pareciera en la
condicion no le temiera en la
iusticia, puesto que iniustamente
la quiera hazer. Á lo que toca á
Persio no te respondo porque no
ensuzie mi lengua como ha hecho
mi fama. Verdad es que más
querria que de su testimonio se
desdixese que no que muriese
por él; mas avnque yo digo tú
determina, que segund tu iuyzio
no podras errar en lo que
acordares.
EL AUCTOR
Muy dudoso estuue quando
recebí esta carta de Laureola
sobre enbialla á Leriano ó esperar
á leualla yo, y en fin hallé por
meior seso no enuiargela por dos
inconuenientes que hallé. El vno
era porque nuestro secreto se
ponia á peligro en fiarla de nadie,
el otro porque las lastymas della
le pudieran causar tal aceleracion
que errara sin tiempo lo que con
el acertó, por donde se pudiera
todo perder. Pues boluiendo al
proposito primero, el dia que
llegué á la corte tenté las
voluntades de los principales della
para poner en el negocio a los
que hallase conformes a mi
opinion; y ninguno hallé de
contrario deseo saluo á los
parientes de Persio, y como esto
vue sabydo supliqué al cardenal
que ya dixe le pluguiese hazer
suplicacion al rey por la vida de
Laureola, lo qual me otorgó con el
mismo amor y compasion que yo
gelo pedia. Y sin mas tardança
iuntó con él todos los perlados y
grandes señores que allí se
hallaron, y puesto en presencia
del rey, en su nombre y de todos
los que yuan con él hizole vna
habla en esta forma.
EL CARDENAL AL REY
No sin razon los soberanos
principes pasados ordenaron
conseio en lo que vuiesen de
hazer segund quantos prouechos
en ello hallaron, y puesto que
fuesen diuersos, por seys razones
aquella ley deue ser conseruada.
La primera porque meior aciertan
los onbres en las cosas agenas
que en las suyas propias, porque
el corazon de cuyo es el caso no
puede estar sin yra ó cobdicia ó
aficion ó deseo ó otras cosas
semejantes, para determinar
como deue. La segunda porque
platicadas las cosas siempre
quedan en lo cierto. La tercera
porque si aciertan los que
aconsejan, avnque ellos dan el
voto, del aconseiado es la gloria.
La quarta por lo que se sigue del
contrario; que si por ageno seso
se yerra el negocio, el que pide el
parecer queda sin cargo y quien
gelo da no sin culpa. La quinta
porque el buen conseio muchas
vezes asegura las cosas
dudosas. La sesta porque no
dexa tan ayna caer la mala
fortuna y sienpre en las
aduersidades pone esperança.
Por cierto, Señor, turbio y ciego
conseio puede ninguno dar á ssi
mismo siendo ocupado de saña ó
pasion, y por esto no nos culpes
si en la fuerça de tu yra te
venimos á enoiar, que más
queremos que ayrado nos
reprehendas porque te dimos
enoio que no que arrepentido nos
condenes porque no te dimos
conseio. Señor, las cosas obradas
con deliberacion y acuerdo
procuran prouecho y alabancia
para quien las haze, y las que con
saña se hazen con
arrepentimiento se piensan. Los
sabios como tú quando obran,
primero delibran que disponen y
sonles presentes todas las cosas
que pueden venir assí de lo que
esperan prouecho como de lo que
temen reues. Y si de qualquiera
pasion enpedidos se hallan no
sentencian en nada fasta verse
libres; y avnque los hechos se
dilaten hanlo por bien, porque en
semeiantes casos la priesa es
dañosa y la tardanza segura; y
como han sabor de hazer lo iusto
piensan todas las cosas, y antes
que las hagan siguiendo la razon
establecenles secucion onesta.
Propriedad es de los discretos
prouar los conseios y por ligera
creencia no disponer, y en lo que
parece dubdoso tener la
sentencia en peso, porque no es
todo verdad lo que tiene
semeiança de verdad. El
pensamiento del sabio agora
acuerde, agora mande, agora
ordene, nunca se parta de lo que
puede acaecer, y siempre como
zeloso de su fama se guarda de
error, y por no caer en él tiene
memoria en lo pasado por tomar
lo meior dello y ordenar lo
presente con tenplança y
contenplar lo porvenir con cordura
por tener auiso de todo. Señor,
todo esto te avemos dicho porque
te acuerdes de tu prudencia y
ordenes en lo que agora estás, no
segund sañudo, mas segund
sabidor. Assí buelue en tu reposo,
que fuerçe lo natural de tu seso al
acidente de tu yra. Auemos
sabido que quieres condenar á
muerte á Laureola. Si la bondad
no merece ser iusticiada, en
verdad tu eres iniusto iuez. No
quieras turbar tu gloriosa fama
con tal iuyzio, que puesto que en
él vuiese derecho, antes serías, si
lo dieses, infamado por padre
cruel que alabado por rey
iusticiero. Diste crédito á tres
malos onbres; por cierto tanta
razon auía para pesquisar su vida
como para creer su testimonio.
Cata que son en tu corte mal
infamados, conformanse con toda
maldad, sienpre se alaban en las
razones que dizen de los engaños
que hazen. Pues por qué das más
fé á la informacion dellos que al
iuyzio de Dios, el qual en las
armas de Persio y Leriano se
mostró claramente? No seas
verdugo de tu misma sangre, que
serás entre los onbres muy
afeado; no culpes la inocencia por
conseio de la saña.
Y si te pareciere que por las
razones dichas Laureola no deue
ser salua, por lo que deues á tu
virtud, por lo que te obliga tu
realeza, por los seruicios que te
auemos hecho, te suplicamos
hagas merced de su vida. Y
porque menos palabras de las
dichas bastaban segun tu
clemencia para hazello, no te
queremos dezir sino que pienses
quanto es meior que perezca tu
ira que tu fama.
EL AUCTOR
La desesperança del responder
del rey fué para los que la oyan
causa de graue tristeça, y como
yo triste viese que aquel remedio
me era contrario, busqué el que
creya muy prouechoso que era
suplicar a la reyna le suplicase al
rey por la saluacion de Laureola.
Y yendo a ella con este acuerdo
como aquella que tanto
participaua en el dolor de la hija,
topela en vna sala, que venia a
hazer lo que yo queria dezille,
aconpañada de muchas
generosas dueñas y damas cuya
auctoridad bastaua para alcançar
qualquiera cosa por iniusta y
graue que fuera, quanto mas
aquella que no con menos razon
el rey deuiera hazella que la
reyna pedilla. La qual puestas las
rodillas en el suelo le dixo
palabras assi sabias para culpalle
como piadosas para amansalle.
Deziale la moderacion que
conuiene á los reyes,
reprehendiale la perseuerança de
su yra, acordauale que era padre,
hablauale razones tan discretas
para notar como lastymadas para
sentir. Suplicauale que si tan cruel
iuyzio dispusiese se quisiese
satisfazer con matar a ella que
tenia los mas dias pasados y
dexase a Laureola tan dina de la
vida. Prouauale que la muerte de
la salua matarie la fama del iuez y
el beuir de la iuzgada y los bienes
de la que suplicaua. Mas tan
endurecido estaua el rey en su
proposito que no pudieron para
con él las razones que dixo ni las
lagrimas que derramó y assi se
boluio a su camara con poca
fuerça para llorar y menos para
beuir. Pues viendo que menos la
reyna hallaua gracia en el rey,
llegué a él como desesperado sin
temer su saña y dixele porque su
sentencia diese con iusticia clara,
que Leriano daría vna persona
que hiziese armas con los tres
falsos testigos, o que él por si lo
haría avnque abaxase su
merecer, porque mostrase Dios lo
que iustamente deuiese obrar.
Respondiome que me dexase de
enbaxadas de Leriano, que en oyr
su nonbre le crecia la pasion.
Pues boluiendo á la reyna, como
supo que en la vida de Laureola
no auia remedio fuese á la prision
donde estaua y besandola
diuersas veces deziale estas
palabras:
LA REYNA Á LAUREOLA
O bondad acusada con malicia! O
virtud sentenciada con saña! O
hija nacida para dolor de su
madre! Tú serás muerta sin
iusticia y de mi llorada con razon.
Más poder ha tenido tu ventura