Full-Stack Web Development With Jakarta EE and Vue - JS: Your One-Stop Guide To Building Modern Full-Stack Applications With Jakarta EE and Vue - Js Daniel Andres Pelaez Lopez 2024 Scribd Download
Full-Stack Web Development With Jakarta EE and Vue - JS: Your One-Stop Guide To Building Modern Full-Stack Applications With Jakarta EE and Vue - Js Daniel Andres Pelaez Lopez 2024 Scribd Download
com
OR CLICK BUTTON
DOWNLOAD NOW
Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node Vasan Subramanian
https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-vasan-subramanian/
textboxfull.com
Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node 2nd Edition Vasan Subramanian
https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-2nd-edition-vasan-
subramanian/
textboxfull.com
Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node 1st Edition Vasan Subramanian
(Auth.)
https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-1st-edition-vasan-
subramanian-auth/
textboxfull.com
https://textbookfull.com/product/mastering-full-stack-react-web-
development-1st-edition-tomasz-dyl/
textboxfull.com
https://textbookfull.com/product/modern-full-stack-development-using-
typescript-react-node-js-webpack-and-docker-zammetti/
textboxfull.com
https://textbookfull.com/product/building-native-web-components-front-
end-development-with-polymer-and-vue-js-carlos-rojas/
textboxfull.com
Full-Stack Web
Development
with Jakarta EE
and Vue.js
Your One-Stop Guide to Building Modern
Full-Stack Applications with Jakarta EE
and Vue.js
—
Daniel Andres Pelaez Lopez
Full-Stack Web
Development with Jakarta
EE and Vue.js
Your One-Stop Guide to Building
Modern Full-Stack Applications
with Jakarta EE and Vue.js
Introduction������������������������������������������������������������������������������������������������������������xxi
v
Table of Contents
Summary������������������������������������������������������������������������������������������������������������������������������������ 62
Extended Knowledge������������������������������������������������������������������������������������������������������������������ 62
vi
Table of Contents
vii
Table of Contents
viii
Table of Contents
ix
Table of Contents
x
Table of Contents
xi
Table of Contents
xii
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 585
xiii
About the Author
Daniel Andres Pelaez Lopez is a software craftsman with 12 years of experience
working in the software industry across a variety of domains including the finance,
aerospace, entertainment, and government sectors.
Passionate about IT architectures and software development at all levels, from
solution design to software implementation. He likes to solve difficult problems using
high technology applying not common solutions.
He worked as a contractor for Fortune 500 companies like Southwest Airlines and
Disney, solving hard problems using the Java ecosystem and participating on the overall
solution architecture. Currently working on Hourly, a fast growing startup, creating the
next generation of payroll systems.
He holds a Bachelor’s Degree on Computer Science from the University of Quindio,
Colombia, and a Master’s Degree on IT Architectures from the University of los Andes,
Colombia.
He has participated in all stages of development from software architecture to
implementation, from front-end to back-end, using Vue.js, React.js, Java, JavaEE, Spring,
AWS infrastructure, and more.
He blogs at Coders Tower: https://coderstower.com/ and can be found on Twitter
@danielpelaezlo.
xv
About the Technical Reviewer
Massimo Nardone has more than 23 years of experience in security, web/mobile
development, cloud, and IT architecture. His true IT passions are security and Android.
He has been programming and teaching how to program with Android, Perl, PHP, Java,
VB, Python, C/C++, and MySQL for more than 20 years.
He holds a Master of Science degree in Computing Science from the University of
Salerno, Italy. He has worked as a project manager, software engineer, research engineer,
chief security architect, information security manager, PCI/SCADA auditor, and senior
lead IT security/cloud/SCADA architect for many years.
Technical skills include security, Android, cloud, Java, MySQL, Drupal, Cobol, Perl,
web and mobile development, MongoDB, D3, Joomla, Couchbase, C/C++, WebGL,
Python, Pro Rails, Django CMS, Jekyll, Scratch, etc.
Massimo worked as a visiting lecturer and supervisor for exercises at the Networking
Laboratory of the Helsinki University of Technology (Aalto University). He holds four
international patents (PKI, SIP, SAML, and Proxy areas).
He currently works at the Chief Information Security Office (CISO) for Cargotec Oyj
and he is a member of ISACA Finland chapter board.
Massimo has reviewed more than 40 IT books for different publishing companies,
and he is the coauthor of Pro Android Games (Apress, 2015).
xvii
Acknowledgments
Thanks to the whole software community; without your efforts day to day, I wouldn’t
have enough knowledge to write this book.
xix
Introduction
Full-stack development has been a trending term the last years, but what does full-stack
development really mean? I will try to answer that question in the following paragraphs
and link it with this book.
When I started my career as a software engineer, 12 years ago, the technologies
I used were Java EE for the back end, using MVC with JSF, HTML, jQuery, over a server
like Jboss or Weblogic. Everything was server side.
In those times, as a back-end developer, I needed to code on the front-end side also.
I learned JavaScript and CSS to render a page that consumes the back-end logic.
Today, things have changed. We have a lot of back-end frameworks, like Spring,
Jakarta EE, Micronaut, Quarks, only to mention a few. And on the front-end side, we also
have Vue.js, Reac.js, Angular.js, and so on.
The distinction over front end and back end is greater today than before. The front-
end frameworks are not server side anymore; they are client side.
This moved the industry to “create” new specialized roles: we have front-end
developers and back-end developers. As the frameworks in both sides get bigger and
more complex each year, mastering both sides at the same time is hard.
However, companies become complex also, having a lot of software components, in
different languages, using different frameworks. Companies started to have problems
finding talent and retain it, as they will need to hire a lot of developers with different
roles to pull off even one project. Companies started to search for workers with more
complex roles: engineers with abilities to master both sides of the coin, front-end and
back-end.
This conflict between software engineers’ abilities and companies’ interests opens a
new concept: Full-Stack Engineer.
A Full-Stack Engineer is someone who has “mastered” front-end and back-end
sides, or at least, that’s what people think. This new “role” allows companies to hire lees
engineers, and the engineers are able to apply their knowledge more broadly.
Full-Stack Engineer is a pretty interesting concept because it looks familiar. If the
previous definition was true, 10 years ago I was a Full-Stack Engineer, and maybe all of
my peers were also Full-Stack Engineer.
xxi
Introduction
I cannot say if the previous definition of Full-Stack Engineer is true or not, but what
I can say is this: don’t get locked in by one technology or one language or framework; be
open to learning both sides of the coin. Maybe you won’t master both, but, in the end
that’s what a software engineer does: build software to solve problems, and it doesn’t
matter which toolset you use.
I prefer to call myself a software engineer as this opens an entire world of
possibilities.
In this book, you will see the journey of a full-stack/software engineer: from learning
how to set up a development environment, to monitoring an application in production.
In Chapters 1 and Chapter 2, you will see how to set up your environment to use
Jakarta EE as a back-end framework and Vue.js as a front-end framework.
Chapter 3 shows you how to build a proof of concept, using only Vue.js, creating a
whole application for user management.
Chapter 4 shows you a fictional delivery company named Daniel’s Delivery, its
current state, and where they want to be. You will see an analysis of how to move from
Daniel’s Delivery today, to where they want to be, using high-level requirements, stories
and quality attributes, ending with a new software architecture. The next chapters will
solve Daniel’s Delivery problems, using Jakarta EE and Vue.js.
In Chapter 5, you start modeling the data for Daniel’s Delivery and create a back end
using JakartaEE to connect to a database, and finally, you will see how to create unit and
integration tests.
In Chapter 6, you will see the high-level requirements for Daniel’s Delivery, breaking
them over wireframes and mapping them to Vue.js components. Finally, you will see the
Vue.js implementation for the shopping cart.
In Chapter 7, you will see how to expose and modify your data using JAX-RS and
RESTful services in the Jakarta EE back-end, and of course, unit and integration tests.
In Chapter 8 you will connect Vue.js and JakartaEE using RESTful services through
the Axios framework and handling exceptions.
In Chapter 9, you will learn the basics of securing a full-stack application, starting
from authentication and authorization, and ending with a configuration using Keycloak
for OAuth2 and OIDC protocols.
In Chapter 10, you will use the concepts of Chapter 9 to secure Daniel’s Delivery
application, from the front-end to the back-end, using Keycloak.
In Chapter 11, you will learn some of the good practices of building full-stack
applications, from decoupling, security, and databases, to RESTful design.
xxii
Introduction
In Chapter 12, you will design and implement the cloud architecture for Daniel’s
Delivery using AWS as an infrastructure provider.
In Chapter 13, you will define a continuous integration and deployment strategy for
the front-end and back-end sides.
And finally, in Chapter 14 you will learn how to monitor your AWS infrastructure to
detect errors or improvements.
xxiii
CHAPTER 1
Full-Stack Web
Development with
Jakarta EE
In this chapter, we are going to cover the basics of full-stack development with Jakarta
EE, talking about general concepts and the environment’s installation, so that you will
understand where and how to start your full-stack project in a hands-on manner.
The following topics will be covered in this chapter:
• Environment installation
T echnical Requirements
• Java 1.8
• Netbeans 11
• Eclipse GlassFish
Note We are not going to cover the details of how the specification is created
and validated in this book. However, I suggest you read more about this interesting
process through different people and organizations here: https://javaee.
github.io/javaee-spec/.
Java EE applications have been in the market for a long time, from J2EE 1.2
(December 12, 1999) until today, with the current version being Java EE 8 (August 31,
2017). You can have a look at the list of version releases at https://en.wikipedia.org/
wiki/Java_Platform,_Enterprise_Edition.
Note For the purposes of this book, we assume you have a basic understanding
of Java EE applications.
2
Chapter 1 Full-Stack Web Development with Jakarta EE
Today, a lot of companies have their systems over the Java EE platform due to their
robust application servers and pretty good support. However, its evolution has been slow
and other frameworks in the Java ecosystem have shown up, like Spring or Play.
For its own reasons, Oracle Inc. made the choice to open source the Java EE
specification. You will learn more details about this in the next section.
Tip Java EE is the Oracle trademark; that’s why the name was changed. You
can find more information here: https://blogs.oracle.com/theaquarium/
the-road-to-jakarta-ee
3
Chapter 1 Full-Stack Web Development with Jakarta EE
Note For Java EE, there are more servers like JBoss, Tomcat EE, WebLogic, and
so on.
The Eclipse GlassFish application server is a fully compliant server for Jakarta EE
standards and specifications. GlassFish is usually the first server that gets updated when
a new Jakarta EE specification arrives.
We are going to install GlassFish through Netbeans IDE in the following section.
Note For more information on Netbeans and Java EE compatibility, you can
have a look at the questions posted at https://stackoverflow.com/
questions/45852077/netbeans-how-to-add-a-javaee-version
and https://stackoverflow.com/questions/46528103/upgrade-
netbeans-to-jee-8.
4
Chapter 1 Full-Stack Web Development with Jakarta EE
Tip At the time of writing this book, Intellj IDE supports Java EE in the Ultimate
edition.
Netbeans 11.1 was released while we were writing this book; however, it is
in an unstable state. You can see more information here: https://netbeans.
apache.org/download/nb111/index.html.
2. Unzip the file. You will find the folders shown in Figure 1-1.
3. Move to the bin folder and run NetBeans using the right runner
for your OS. You will see the window in Figure 1-2.
5
Chapter 1 Full-Stack Web Development with Jakarta EE
1. In the right-top box, search for Server, and click on Server Tools.
You will see the window in Figure 1-3.
6
Chapter 1 Full-Stack Web Development with Jakarta EE
Figure 1-5. Downloading and activating the Java Web and EE support
7
Chapter 1 Full-Stack Web Development with Jakarta EE
8
Chapter 1 Full-Stack Web Development with Jakarta EE
6. Now, set up the environment as local and use root as a user and
password for now. Use the default domain as domain1 that is
given by GlassFish, as shown in Figure 1-8.
Figure 1-8. Setting the domain, host, user name, and password to access GlassFish
9
Chapter 1 Full-Stack Web Development with Jakarta EE
7. When you click on Finish, you will see the GlassFish Server
summary in Figure 1-9.
Note that the GlassFish application server includes Java DB (Derby) by default, and
following the above process, this database is automatically registered on Netbeans, as
shown in Figure 1-10.
Liste des plantes observées dans les moissons aux environs des Tamarins.
Ranunculus arvensis L.
— trilobus Desf.
Ceratocephalus falcatus Pers.
Papaver hybridum L.
Rœmeria hybrida DC.
Carrichtera Vellæ DC.
Alyssum Granatense Boiss. et Reut.
*Clypeola cyclodontea Delil.
*Sisymbrium torulosum Desf.
— runcinatum Lagasc.
Moricandia arvensis DC.
Diplotaxis virgata DC. var. subsimplex.
Helianthemum glutinosum Pers.
— pilosum Pers.
— Niloticum Pers.
Reseda alba L.
Silene tridentata Desf.
Spergularia diandra Heldr.
Malva parviflora L.
— Ægyptiaca L.
Erodium Cicutarium L’Hérit.
Peganum Harmala L.
Medicago denticulata Willd.
— minima Lmk.
Astragalus hamosus L.
Hippocrepis scabra DC.
Paronychia argentea Lmk.
Herniaria annua Lagasc.
*Hohenackeria polyodon Coss. et DR.
Buplevrum semicompositum L.
Ammi majus L.
Thapsia Garganica L.
Daucus aureus Desf.
Scandix Pecten-Veneris L.
Torilis nodosa Gærtn.
Turgenia latifolia Hoffm.
Caucalis leptophylla L.
Crucianella patula L.
Callipeltis Cucullaria Stev.
Galium setaceum Lmk.
— tricorne With.
Valerianella discoidea Lois.
Scabiosa Monspeliensis Jacq.
Calendula arvensis L.
*Echinops spinosus L.
Onopordon macracanthum Schousb.
Centaurea pullata L.
*— Algeriensis Coss. et DR.
— Nicæensis All.
— Melitensis L.
*Microlonchus Duriæi Spath.
Filago Jussiæi Coss. et Germ.
Micropus bombycinus Lagasc.
Artemisia Herba-alba Asso.
Bellis annua L.
Anacyclus tomentosus DC.
*Pyrethrum fuscatum Willd.
Kœlpinia linearis Pall.
Hedypnois rhagadioloides L.
Podospermum laciniatum DC. var. calcitrapæfolium.
*Kalbfussia Salzmanni Schultz. Bip.
Asterothrix Hispanica DC.
Scorzonera undulata Vahl.
Sonchus divaricatus Desf.
— oleraceus L.
Anagallis arvensis L.
Nonnea micrantha Boiss. et Reut.
Lithospermum Apulum L.
Echinospermum Vahlianum Lehm.
— patulum Lehm.
Salvia Verbenaca L.
Plantago albicans L.
— Psyllium L.
Beta vulgaris L.
Chenopodium Vulvaria L.
Euphorbia falcata L.
— exigua L.
— sulcata De Lens.
Alopecurus pratensis L. var. ventricosus. — Lieux frais.
Echinaria capitata Desf.
Dactylis glomerata L.
Schismus calycinus Coss. et DR.
Festuca rigida Kunth.
Bromus Madritensis L.
Brachypodium distachyum Rœm. et Sch.
Elymus crinitus Schreb.
Hordeum murinum L.
Triticum Orientale M. Bieb.
Ægilops ovata var. triaristata. L.
Liste des plantes observées dans les terrains incultes aux environs des Tamarins.
Peganum Harmala L.
*Genista microcephala Coss. et DR.
*Anthyllis Numidica Coss. et DR.
*Astragalus tenuifolius Desf.
Minuartia montana Lœfl.
Pteranthus echinatus Desf.
*Paronychia Cossoniana J. Gay.
Polycarpon Bivonæ J. Gay.
Herniaria fruticosa L.
Aizoon Hispanicum L.
Centaurea Parlatoris Heldr.
*Atractylis microcephala Coss. et DR.
*— cæspitosa Desf.
Artemisia Herba-alba Asso.
Sonchus spinosus DC.
Echium humile Desf.
Thymus hirtus Willd.
Globularia Alypum L.
Anabasis articulata Moq. Tand.
Atriplex Halimus L.
— parvifolia Lowe.
Salsola vermiculata L.
Passerina hirsuta L.
Stipa parviflora Desf.
— gigantea Lagasc.
— barbata Desf.
Dactylis glomerata L.
Festuca tenuiflora Schrad.
— cynosuroides Desf.
Lepturus incurvatus Trin.
RÉGION SAHARIENNE.
Ranunculus arvensis L.
Nigella sativa L.
Delphinium cardiopetalum DC.
Papaver Rhœas L.
*Lonchophora Capiomontiana DR.
*Nasturtium coronopifolium DC.
Sisymbrium runcinatum Lagasc.
— erysimoides Desf.
Moricandia arvensis DC.
Diplotaxis pendula DC.
— virgata DC.
Eruca sativa Lmk.
Carrichtera Vellæ DC.
Cleome Arabica L.
Reseda Phyteuma L.
— Aucheri Boiss.
Buffonia perennis Pourr.
Spergularia diandra Heldr.
Hypericum tomentosum L.
Erodium guttatum Willd.
Fagonia glutinosa Delile.
Peganum Harmala L.
Zizyphus Lotus L.
Ononis angustissima Lmk.
— brachycarpa DC.
Anthyllis tragacanthoides Desf.
Astragalus sesameus L.
*— geniculatus Desf.
*Hedysarum carnosum Desf.
Herniaria annua Lagasc.
— fruticosa L.
*Paronychia Cossoniana J. Gay.
— argentea Lmk.
Polycarpon tetraphyllum L. f.
— Bivonæ J. Gay.
Minuartia montana Lœfl.
Pteranthus echinatus Desf.
Eryngium ilicifolium Lmk.
Ammi Visnaga Lmk.
Torilis nodosa Gærtn.
Sherardia arvensis L.
Crucianella patula L.
Galium saccharatum L.
— setaceum Lmk.
Callipeltis Cucullaria Stev.
Scabiosa Monspeliensis Jacq.
Micropus supinus L.
Pulicaria Arabica Cass.
Asteriscus aquaticus DC.
— pygmæus Coss. et DR.
Pallenis spinosa Cass.
Anacyclus tomentosus DC.
Artemisia Herba-alba Asso.
Filago Jussiæi Coss. et Germ.
Xeranthemum inapertum Willd.
*Carlina involucrata Desf.
*Atractylis microcephala Coss. et DR.
Centaurea Melitensis L.
— Nicæensis All.
— sulphurea Willd.
*Centaurea Algeriensis Coss. et DR.
— Calcitrapa L.
Kentrophyllum lanatum DC.
*Carduncellus calvus Boiss. et Reut.
*Silybum eburneum Coss. et DR.
Onopordon macracanthum Schousb.
Pycnomon Acarna Cass.
Scolymus Hispanicus L.
Hedypnois rhagadioloides L.
*Kalbfussia Salzmanni Schultz Bip.
Sonchus divaricatus Desf.
— maritimus L.
— spinosus DC.
Anagallis arvensis L.
Nerium Oleander L.
*Echium humile Desf.
Echinospermum Vahlianum Lehm.
Cynoglossum pictum Ait.
Lycium Mediterraneum Dun.
Verbascum sinuatum L.
*Linaria fruticosa Desf.
Veronica Anagallis L.
Mentha rotundifolia L.
— sylvestris L.
— Pulegium L.
Thymus hirtus Willd.
Salvia lanigera Desf.
— Ægyptiaca L.
Marrubium Alysson L.
Teucrium Polium L.
*Plantago Syrtica Viv.
— Lagopus L.
— Coronopus L.
— Psyllium L.
Beta vulgaris L. var. macrocarpa.
Blitum virgatum L. var. minus Vahl.
Salsola vermiculata L.
Anabasis articulata Moq.-Tand.
Passerina hirsuta L.
Euphorbia falcata L.
*— glebulosa Coss. et DR.
Ephedra fragilis Desf.
Juncus bufonius L.
Piptatherum miliaceum Coss.
Stipa parviflora Desf.
Agrostis verticillata Vill.
Echinaria capitata Desf.
Melica ciliata L.
Kœleria villosa Pers.
— phleoides Pers.
Dactylis glomerata L.
Lamarckia aurea Mœnch.
Festuca rigida Kunth.
Bromus Madritensis L.
Lolium perenne L. var. rigidum.
Hordeum murinum L.
Ægilops ovata L.
Imperata cylindrica P. B.
Andropogon hirtus L.
— laniger Desf.
Equisetum ramosissimum Desf.
A quelques kilomètres plus au sud, à 6 kilomètres nord-ouest
d’El-Outaïa, existe une fontaine chaude, que les indigènes
connaissent sous le nom de Hammam-Sid-el-Hadj (Bain du
Pèlerin) ; son vaste bassin est alimenté par plusieurs sources, dont
la principale atteint une température de plus de 40 degrés. Des
débris de constructions romaines se rencontrent dans le voisinage
de cette source que nous n’avons pas pu visiter. Les eaux de la
fontaine du Hammam contiennent une certaine quantité de matières
salines, où dominent le sulfate de chaux et le sel marin. M. Guyon
(Voyage aux Ziban), auquel nous avons emprunté les détails qui
précèdent, signale aux environs du Hammam le Lonchophora
Capiomontiana, et dans les lieux arides voisins le Statice pruinosa.
Un unique pied de Dattier, seul vestige d’une oasis détruite par
Salah-Bey, l’un des derniers beys de Constantine, nous annonce le
voisinage du caravansérail d’El-Outaïa (256 mètres d’altitude). Dans
les environs du caravansérail et du village arabe campent quelques
douars, dont les troupeaux paissent dans les maigres pâturages de
ce sol aride et déjà brûlé par le soleil (27 mai), en attendant le jour
peu éloigné de leur migration dans le Tell. Quelques jardins où
dominent le Figuier et le Grenadier se trouvent dans le voisinage
immédiat du village. — Une herborisation dans le lit de l’Oued El-
Kantara, et à la base de la Montagne-de-sel (Djebel Mélah), nous
présente la plupart des espèces sociales caractéristiques de la
région saharienne, entre autres les Limoniastrum Guyonianum,
Statice pruinosa, Linaria fruticosa, Sonchus quercifolius, etc.
Liste des plantes observées près d’El-Outaïa dans le lit de l’Oued El-Kantara et à
la base de la Montagne-de-sel.
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.
textbookfull.com