Share E-Book

Real-World Java® Helping You Navigate The Java Ecosystem (Victor Grazi Jeanne Boyarsky)(Z-Library)

Author

Rating 3.5 AI initial rating

Log in to rate

Java
Language English

No Description

Format PDF
Size 15.2 MB
(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
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix CHAPTER 1 How We Got Here: History of Java in a Nutshell . . . . . . . . . . . . . . . . . 1 CHAPTER 2 Getting to Know your IDE: The Secret to Success . . . . . . . . . . . . . . 11 CHAPTER 3 Collaborating Across the Enterprise with Git, Jira, and Confluence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 CHAPTER 4 Automating Your CI/CD Builds with Maven, Gradle, and Jenkins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 CHAPTER 5 Capturing Application State with Logging Frameworks . . . . . . . . . 129 CHAPTER 6 Getting to Know the Spring Framework . . . . . . . . . . . . . . . . . . . . . 163 CHAPTER 7 Testing Your Code with Automated Testing Tools . . . . . . . . . . . . . 195 CHAPTER 8 Annotation Driven Code with Project Lombok . . . . . . . . . . . . . . . . 235 CHAPTER 9 Parallelizing Your Application Using Java Concurrency . . . . . . . . . 249 CHAPTER 10 Pattern Matching with Regular Expressions . . . . . . . . . . . . . . . . . . 283 CHAPTER 11 Coding the Aspect-Oriented Way . . . . . . . . . . . . . . . . . . . . . . . . . . 311 CHAPTER 12 Monitoring Your Applications: Observability in  the Java Ecosystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 CHAPTER 13 Performance Tuning Your Services . . . . . . . . . . . . . . . . . . . . . . . . . . 351 CHAPTER 14 Getting to Know More of the Ecosystem . . . . . . . . . . . . . . . . . . . . 377 APPENDIX Reading and Writing XML, JSON, and YAML . . . . . . . . . . . . . . . . . 395 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415  REAL- WORLD JAVA®
Page 4
(This page has no text content)
Page 5
Real- World Java®
Page 6
(This page has no text content)
Page 7
Real- World Java® HELPING YOU NAVIGATE THE JAVA ECOSYSTEM Victor Grazi Jeanne Boyarsky
Page 8
Copyright © 2025 by John Wiley & Sons, Inc. All rights, including for text and data mining, AI training, and similar technologies, are reserved. Published by John Wiley & Sons, Inc., Hoboken, New Jersey. Published simultaneously in Canada and the United Kingdom. ISBNs: 9781394275724 (Paperback), 9781394275748 (ePDF), 9781394275731 (ePub) No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per- copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750- 8400, fax (978) 750- 4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748- 6011, fax (201) 748- 6008, or online at www.wiley.com/go/permission. Trademarks: WILEY and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Java is a trademark or registered trademark of Oracle America, Inc. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book. Limit of Liability/Disclaimer of Warranty: While the publisher and authors have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Further, readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read. Neither the publisher nor authors shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages. For general information on our other products and services, please contact our Customer Care Department within the United States at (800) 762- 2974, outside the United States at (317) 572- 3993. For product technical support, you can find answers to frequently asked questions or reach us via live chat at https://support.wiley.com. If you believe you’ve found a mistake in this book, please bring it to our attention by emailing our reader support team at wileysupport@wiley.com with the subject line “Possible Book Errata Submission.” Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com. Library of Congress Control Number: 2024934523 Cover image: © CSA- Printstock/Getty Images Cover design: Wiley
Page 9
To the Java community for being so open to helping people learn. — Victor & Jeanne
Page 10
(This page has no text content)
Page 11
VICTOR GRAZI is a voracious learner who back in 1996 heard about this new technology called “the Internet” and a new technology called Java that made the Internet blaze! Inducted as a Java champion in 2012, he serves on the Java Community Process Executive Committee, leads a JSR, served as Java Lead Editor on InfoQ maga- zine, and has traveled the world evangelizing Java. He is the author of Java Concurrent Animated, an application that has helped thousands of developers visualize Java concurrency. JEANNE BOYARSKY is excited to be publishing this, her 10th book. She was selected as a Java Champion in 2019 and is a leader of the NYJavaSIG. She has worked as a Java developer for more than 22 years at a bank in New York City where she develops, mentors, and conducts training. Besides being a senior moderator at CodeRanch.com in her free time, she works on the forum code base. Jeanne also mentors the programming division of a FIRST robotics team, where she works with students just getting started with Java. She also speaks at several conferences each year. Jeanne is also a Distinguished Toastmaster and a Scrum Master. You can find out more about Jeanne at https://www.jeanneboyarsky.com. ABOUT THE AUTHORS
Page 12
(This page has no text content)
Page 13
RODRIGO GRACIANO is a seasoned software engineer, Java advocate, and technology leader. He has a BSc in computer science from UNILASALLE, Brazil, and has been working with Java since 2006. In 2011, Rodrigo moved to the United States, where he now lives with his wife, Manuela, and their two sons, Lucas and Theodore. Rodrigo is a senior member and leader of the NYJavaSIG, the New York Java User Group, where he actively contributes to organizing monthly events to promote the Java language and its community. A frequent speaker at tech conferences across South America, the United States, and Europe, Rodrigo shares his passion for software development and Java best practices. Currently, he serves as a director of engineering at BNY. In recognition of his contributions to the Java com- munity, Rodrigo was nominated as a Java Champion in 2022. ABOUT THE TECHNICAL EDITOR
Page 14
(This page has no text content)
Page 15
BARRY BURD is a professor in the Department of Mathematics and Computer Science at Drew University in Madison, New Jersey. He’s a director of the Garden State Java User Group and, along with Jeanne, a leader of the NYJavaSIG. He’s the author of several Java books, including Java For Dummies, soon to be in its 9th edition. His most recent book is Quantum Computing Algorithms published by Packt. In 2020, he was honored to be named a Java Champion. ABOUT THE TECHNICAL PROOFREADER
Page 16
(This page has no text content)
Page 17
We would like to thank numerous individuals for their contributions to this book. Thank you to Patrick Walsh and Archana Pragash for guiding us through the process and making the book better in many ways. Thank you to Rodrigo Graciano for being our technical editor and Barry Burd for being our technical proofreader. They made the book better in so many ways. And a special thank- you to our copy editor Kim Wimpsett for finding subtle errors that everyone (including us!) missed. This book also wouldn’t be possible without many people at Wiley, including Kenyon Brown, Pete Gaughan, Ashirvad Moses, and many others. Victor would personally like to say thank- you to his wife, Victoria, for all the date nights she sacrificed to let me work on this book. He continues to learn from her and be awed by her vision every single day. He also wants to thank his parents, Jack and Claudie Grazi, for all they have invested in him. Finally, he thanks posthumously Dr. Isadore Glaubiger, his math professor way back when at Brooklyn Tech, who inspired him and taught him to think. And a special thanks to Jeanne for her organizational skills and attention to detail. Were it not for Jeanne, he says he never would have made it past page 1. Jeanne would personally like to thank Dani, Janeice, Kim, Norm, Scott, and Shweta during a difficult month that overlapped with book writing. She also wants to thank Scott for his patience as Jeanne worked on two books simultaneously (this one and Oracle Certified Professional Java 21 Developer Study Guide). A big thank- you to Victor for coming up with the idea for the book and being a great co- author in bringing it to life. Finally, Jeanne would like to thank all of the new programmers at CodeRanch.com and FIRST robotics teams FRC 694 and FTC 310/479 for the constant reminders of how new programmers think. ACKNOWLEDGMENTS
Page 18
(This page has no text content)
Page 19
INTRODUCTION xxix CHAPTER 1: HOW WE GOT HERE: HISTORY OF JAVA IN A NUTSHELL 1 Introduction 1 Understanding the Stewardship of Java 2 Differentiating Key Java Versions 4 Coding Generics in Java 5 4 Coding with Functional Programming from Java 8 4 Coding Modules from Java 11 5 Coding Text Blocks and Records from Java 17 6 Learning About Virtual Threads from Java 21 7 Working with Deprecation and Retirement 7 Identifying Renames 8 Changing to Jakarta EE 8 Renaming Certifications 8 Understanding the Principles of Change 8 Further References 9 Summary 9 CHAPTER 2: GETTING TO KNOW YOUR IDE: THE SECRET TO SUCCESS 11 Understanding IDE History 12 Starting a New Project 13 Creating a Project from Scratch 13 Creating a Project from Existing Sources 14 Creating a Project from Version Control 15 Adding a Project to Version Control 15 Adding a Module to an Existing Project 16 Creating a Run Configuration 16 Getting to Know Your Keyboard Shortcuts 18 Navigating Your Codebase 19 Copying and Pasting Shortcuts 20 Reordering Code 20 Using Other Helpful Shortcuts 21 Debugging Your Code 22 Debugging a Program 22 Speeding Up Debugger Performance 24 CONTENTS
Page 20
xviii CoNtENtS Remote Debugging 25 Debugging with Hot Swap 26 Refactoring Your Code 26 Avoiding Duplicate Code 26 Renaming Members 31 Inlining 31 Changing Signatures: Adding and Removing Parameters 32 Exploiting the Editor 32 Automated Reformatting of Code 32 Organizing Imports 32 Reformatting Code 32 Unwrapping 33 Comparing Code 34 Using Column Mode 34 Extending the IDE 35 Peeking at Eclipse 36 Peeking at VS Code 37 Comparing IDEs 39 Further References 40 Summary 40 CHAPTER 3: COLLABORATING ACROSS THE ENTERPRISE WITH  GIT, JIRA, AND CONFLUENCE 41 Collaborating with Git 42 Introducing Git Basics 42 Learning Key Concepts 42 Differentiating Commits 43 Displaying Git Status 43 Branching 43 Tagging 43 Merging 44 Reading Git Logs 44 Staging Your Changes 44 Installing Git 45 Understanding Git Workflow by Example 45 Fetching, Merging, and Pulling 51 Playing with Branches 53 Resolving Merge Conflicts 54 Using Pull/Merge Requests 55 Using the Git Log 56 Rebasing 57
The above is a preview of the first 20 pages. Register to read the complete e-book.

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
← Back to List