Building Modern Web Applications With Jakarta EE, NoSQL Databases and Microservices ( etc.) (Z-Library)
JavaAuthor:Aristides Villarreal Bravo & Geovanny Mendoza González & Otávio Gonçalves de Santana
No description
Tags
Support Statistics
¥.00 ·
0times
Text Preview (First 20 pages)
Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
Page
1
(This page has no text content)
Page
2
(This page has no text content)
Page
3
Building Modern Web Applications with Jakarta EE, NoSQL Databases and Microservices Create Web Applications Jakarta EE with Microservices, JNoSQL, Vaadin, Jmoordb, and MicroProfile easily Aristides Villarreal Bravo Geovanny Mendoza González Otávio Gonçalves de Santana www.bpbonline.com
Page
4
FIRST EDITION 2021 Copyright © BPB Publications, India ISBN: 978-93-89423-341 All Rights Reserved. No part of this publication may be reproduced or distributed in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication. LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The information contained in this book is true to correct and the best of author’s & publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but cannot be held responsible for any loss or damage arising from any information in this book. All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information. Distributors: BPB PUBLICATIONS 20, Ansari Road, Darya Ganj New Delhi-110002 Ph: 23254990/23254991 MICRO MEDIA Shop No. 5, Mahendra Chambers, 150 DN Rd. Next to Capital Cinema, V.T. (C.S.T.) Station, MUMBAI-400 001 Ph: 22078296/22078297 DECCAN AGENCIES 4-3-329, Bank Street, Hyderabad-500195 Ph: 24756967/24756400 BPB BOOK CENTRE 376 Old Lajpat Rai Market,
Page
5
Delhi-110006 Ph: 23861747 Published by Manish Jain for BPB Publications, 20 Ansari Road, Darya Ganj, New Delhi-110002 and Printed by him at Repro India Ltd, Mumbai www.bpbonline.com
Page
6
Dedicated to Aristides Villarreal Bravo My grandfather “Papa del Rio”, parents, brothers, nephews, my family, and those who believed in something and tried to find it. Geovanny Mendoza Gonzalez “Emiro Mendoza “El Miche” (q. e. p. d.)” To my father who looks after me from heaven to my mother Maria Eugenia, my sisters Claudia and Maria, to my son Matias. Otávio Gonçalves de Santana I want to talk to everybody who supports me on this journey. My wife, my friends, and for sure, the whole Java Community to allow writing this book and the opportunity to share what I know. I hope this book be useful to everyone.
Page
7
About the Authors Aristides Villarreal Bravo lives in Panama, is a Java Developer, member of NetBeans Dream Teams since 2007, Jug Leaders. He is currently working on developing Java applications and with greater emphasis on technologies such as Java Enterprise Edition, Jakarta EE, Microprofile, and NoSQL databases. He has developed several plugins for Apache NetBeans IDE and is working on his Jmoordb project, a Java API for NoSQL. He has participated in many national and international conferences and has been a reviewer of several books on Java and related technologies. Member of JEspañol, winner of the Duke’s Choice Award in 2017. Write many articles on your personal site http://avbravo.blogspot.com/ Geovanny Mendoza Gonzalez is a senior backend developer in Java, lives in Colombia, B.S. in System Engineering from the Simón Bolívar University of Colombia with a specialization in Software Engineering from the North University of Barranquilla, Colombia. Certified on Vaadin 14 framework, professional and developer. Leader of the Barranquilla-Colombia Java User Group (www.jugbaq.org), and has more than 12 years of experience in software development. He has done lectures in international Java conferences using the latest practices and frameworks in the industry. He also writes in his blog about JVM related topics. Your Blog links: https://geovanny0401.blogspot.com.co Your LinkedIn Profile: https://www.linkedin.com/in/gmendozag/ Otávio Gonçalves de Santana is a passionate software engineer focused on Java technology. He has experience mainly in persistence polyglot and high- performance applications in finances, social media, and e-commerce. Otavio is a member of both Expert Groups and Expert Leader in several JSRs and JCP executive committee. He is working on several Apache and Eclipse Foundation projects such as Apache Tamaya, Eclipse JNoSQL, Eclipse MicroProfile, JakartaEE. A JUG leader and global speaker at JavaOne and
Page
8
Devoxx conferences. Otavio has received recognition for his OSS contributions such as the JCP Outstanding Award, Member of the year and innovative JSR, Duke’s Choice Award, and Java Champion Award, to name a few.
Page
9
About the Reviewer Constantin Drabo earned a master’s degree from the Université de Picardie Jules Verne (France) in Internet Technologies. He is a software engineer in the National Treasury of Burkina Faso, and is a part-time teacher at the Université Nazi Boni of Bobo-Dioulasso, where he teaches on Java/Java EE and the Human/Machine Interface. He is currently studying for his PhD in Machine Learning in Medical Systems at university Alioun Diop of Bambey (Senegal). He participates in the Java Community Process (JCP) through his contribution to JSR 381 (Visual Recognition). Constantin became NetBeans Dream Team member in 2014 and he’s Duke Choice Award winner in 2018.
Page
10
Acknowledgements I want to thank those people who have influenced all these years and have been the inspiration to create this book. To my great friends Geovanny Mendoza who for many years, we have collaborated in several projects. To Otavio certainly, an example to follow for many and a great innovator and contributor to Java. I would like to thank my friends Contantin Drabo (@PandaConstantin), for their comments and contributions to make this book the most attached to good practices and standards of development. My gratitude to the entire BPB Publications team. To my friends from the Java, NetBeans, Oracle communities of so many years. – Aristides Villarreal Bravo I want to thank God first and those people who supported me continuously and permanently during the writing of this book. First of all, I would like to thank my girlfriend, Ketty Elena, for encouraging me while I spent many weekends and nights writing. To my great friend Aristides Villareal for giving me the opportunity and confidence to write this book. To Otávio Gonçalves for being a great person and collaborator with the Java user communities. To my great friends Armando Palmera and Ricardo Cantillo, collaborators with the Java community Barranquilla - Colombia. To the team of BPB Publications, my gratitude to all those who encouraged me all this time, without you, it would not have been possible to fulfill this goal. – Geovanny Mendoza González I want to thank God first and those people who supported me continuously and permanently during the writing of this book. First of all, I would like to
Page
11
thank my wife and my mother for encouraging me. To all Java communities friends. To the team of BPB Publications, my gratitude to all those who encouraged me all this time, without you, it would not have been possible to fulfill this goal. – Otávio Gonçalves de Santana
Page
12
Preface Web applications have evolved over the years. Java has been linked to business development since its inception. To achieve standardization and facilitate the development of applications of this type led to the birth of Java Enterprise Edition. This book introduces you to the main specifications that facilitate the creation of solutions for use in high-performance environments. As the years passed, a movement was born for the implementation of new technology for databases that broke the traditional model, and these databases were grouped into what is known as NoSQL. Most of the chapters are oriented to their implementation using Jakarta NoSQL and Jmoordb that facilitate the use with Java. Microservices are essential in the modern era for creating scalable applications. Microprofile.io is the reference in Java for their creation. Some frameworks help us to create user interfaces. Among them we will learn about Java Server Faces, Vaadin, and Eclipse Krazo as important alternatives for application development. We will end with topics such as application tracking and container testing, to give an overview of the main tools to consider when developing enterprise applications with Java. We have developed ten chapters where you can find the following topics: Chapter 1: An Introduction to the Jakarta EE Platform. You will know the specifications with practical examples. Chapter 2: We explore the fundamentals of NoSQL databases and their advantages. Chapter 3: Jakarta NoSQL is a Jakarta EE specification that streamlines the integration of Java applications with NoSQL databases Chapter 4: Describes the Jmoordb API interacting with MongoDB a NoSQL databases. Chapter 5: The goal of the Eclipse MicroProfile initiative is to optimize Enterprise Java for the microservices architecture. It’s based on a subset of
Page
13
Jakarta EE APIs, so we can build MicroProfile applications the same way we build Jakarta EE ones. Chapter 6: Explore Java Server Faces and its integration with microservices and MongoDB. Chapter 7: Presents the Vaadin framework, which is designed to develop web applications in Java or JavaScript using Vaadin web components, allowing you to build a powerful user interface with just a few lines of code. Chapter 8: Describes how to develop a Java web application from scratch, designing user interface code to run securely on the server, right next to your business logic that you can access with the native Java API. Integrating the Vaadin framework with non-relational databases such as MongoDB. Chapter 9: It is an introduction to the new MVC Eclipse Krazo framework, and we set security to applications with Java security API and show how to use JWT simply. Chapter 10: Explains the use of containers, testing, continuous integration, DevOps as a fundamental part of the creation of robust and secure applications.
Page
14
Downloading the code bundle and coloured images: Please follow the link to download the Code Bundle and the Coloured Images of the book: https://rebrand.ly/qble64n Errata We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors if any, occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at : errata@bpbonline.com Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family. Did you know that BPB offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.bpbonline.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at business@bpbonline.com for more details. At www.bpbonline.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on BPB books and eBooks.
Page
15
(This page has no text content)
Page
16
BPB is searching for authors like you If you're interested in becoming an author for BPB, please visit www.bpbonline.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea. The code bundle for the book is also hosted on GitHub at https://github.com/bpbpublications/Building-Modern-Web- Applications-with-Jakarta-EE-No-SQL-Database-and- Microservices. In case there's an update to the code, it will be updated on the existing GitHub repository. We also have other code bundles from our rich catalog of books and videos available at https://github.com/bpbpublications. Check them out! PIRACY If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at business@bpbonline.com with a link to the material. If you are interested in becoming an author If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit www.bpbonline.com. REVIEWS
Page
17
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at BPB can understand what you think about our products, and our authors can see your feedback on their book. Thank you! For more information about BPB, please visit www.bpbonline.com.
Page
18
Table of Contents 1. Jakarta EE Platform Structure Objective Jakarta EE platform History From JavaEE to Jakarta EE Java EE/Jakarta EE application development Context and Dependency Injection CDI 2.0 (JSR 365) @Interceptor example Enterprise Java Beans 3.2 (JSR-345) @Producer example Java Servlet 4.0 (JSR-369) Server Push Example of a servlet with MongoDB Java API for RESTful Web services JAX-RS 2.1 (JSR-370) Java EE Security API 1.0 (JSR -375) Identity Store The Java API for JSON Binding JSON-B 1.0 (JSR-367) JavaServer Faces JSF 2.3 (JSR-372) WebSocket Java Persistence API 2.2 (JSR-338) Conclusion Questions 2. NoSQL Structure Objective NoSQL types Key-value Column family Document collection Graph
Page
19
Scalability versus complexity BASE verses ACID CAP theorem The diversity in NoSQL Standard in SQL Conclusion Questions 3. Jakarta NoSQL Structure Objective Why Jakarta NoSQL? Why not JPA as NoSQL specification? Particular behavior matters in NoSQL database Install databases Maven project Entity model Key-value database Column family database Document database Graph database Conclusion Question 4. Understanding JMoordb Structure Objective Introduction a JMoordb Entity Annotation @Id @Ignore @Embedded @Referenced Repository C.R.U.D. Create
Page
20
Update Delete Read Filter Builder Pagination SQL support Aggregation Database operations Allocate memory Statistics count sizeOfPage createIndex(Documment… doc) listCollecctions() existsCollection(String nameCollection) drop() toDocument(Object t) dropDatabase() ListOfPage Databases without schemas Conclusion Questions 5. Exploring Eclipse MicroProfile Structure Objective Skeleton of Eclipse MicroProfile Sample code Databases Join technologies together Layers, layers, and more layers Speaker service Session service Conference service Client service Conclusion
Comments 0
Loading comments...
Reply to Comment
Edit Comment