Test-Driven Development with Java: Create higher-quality software by writing tests first with SOLID and hexagonal architecture
Paperback
General ComputersGeneral Science
ISBN13: 9781803236230
Publisher: Packt Pub
Published: Jan 13 2023
Pages: 348
Weight: 1.32
Height: 0.72 Width: 7.50 Depth: 9.25
Language: English
Drive development with automated tests and gain the confidence you need to write high-quality software
Key Features:
- Get up and running with common design patterns and TDD best practices
- Learn to apply the rhythms of TDD - arrange, act, assert and red, green, refactor
- Understand the challenges of implementing TDD in the Java ecosystem and build a plan
Book Description:
Test-driven development enables developers to craft well-designed code and prevent defects. It's a simple yet powerful tool that helps you focus on your code design, while automatically checking that your code works correctly. Mastering TDD will enable you to effectively utilize design patterns and become a proficient software architect.
The book begins by explaining the basics of good code and bad code, bursting common myths, and why Test-driven development is crucial. You'll then gradually move toward building a sample application using TDD, where you'll apply the two key rhythms -- red, green, refactor and arrange, act, assert. Next, you'll learn how to bring external systems such as databases under control by using dependency inversion and test doubles. As you advance, you'll delve into advanced design techniques such as SOLID patterns, refactoring, and hexagonal architecture. You'll also balance your use of fast, repeatable unit tests against integration tests using the test pyramid as a guide. The concluding chapters will show you how to implement TDD in real-world use cases and scenarios and develop a modern REST microservice backed by a Postgres database in Java 17.
By the end of this book, you'll be thinking differently about how you design code for simplicity and how correctness can be baked in as you go.
What You Will Learn:
- Discover how to write effective test cases in Java
- Explore how TDD can be incorporated into crafting software
- Find out how to write reusable and robust code in Java
- Uncover common myths about TDD and understand its effectiveness
- Understand the accurate rhythm of implementing TDD
- Get to grips with the process of refactoring and see how it affects the TDD process
Who this book is for:
This book is for expert Java developers and software architects crafting high-quality software in Java. Test-Driven Development with Java can be picked up by anyone with a strong working experience in Java who is planning to use Test-driven development for their upcoming projects.
Table of Contents
- Building the Case for TDD
- Using TDD to Create Good Code
- Dispelling Common Myths about TDD
- Building a typical application using TDD
- Writing our First Test
- Following the Rhythms of TDD
- Driving Design: TDD and SOLID
- Test Doubles: Stubs and Mocks
- Hexagonal Architecture: Decoupling external systems
- FIRST Tests and the Test Pyramid
- Exploring TDD with Quality Assurance
- Test First, Test Later, Test Never
- Driving the domain layer
- Driving the database layer
- Driving the Web Layer
Also in
General Science
How It All Works: All Scientific Laws and Phenomena Illustrated & Demonstrated
Dant, Adam
Clegg, Brian
Hardcover
The Code Breaker: Jennifer Doudna, Gene Editing, and the Future of the Human Race
Isaacson, Walter
Hardcover
The Little Book of Big Explorations: Adventures Into the Unknown That Changed Everything
Osman, Jheni
Paperback
A Bird's IQ: Innovation, Intelligence, and Problem Solving in the Avian World
Lefebvre, Louis
Hardcover
The Eureka Machine: Why AI Is the Key to Unlocking a New Era of Scientific Discoveries
Socher, Richard
Hardcover
Ancient Astrology in Theory and Practice: A Manual of Traditional Techniques, Volume I: Assessing Planetary Condition
George, Demetra
Paperback
The Quantum Power of GLP-1 Peptides: Unlocking the Science that Leads to Lasting Weight Loss and Optimal Healthspan
Seeds, William A.
Paperback
Reference Manual of Woody Plant Propagation: From Seed to Tissue Culture
Heuser, Charles W., Jr.
Dirr, Michael A.
Paperback
5 Steps to a 5: AP Biology 2027: Practice AP Tests + AP Content Review + Digital Exams
Anestis, Mark
Burris, Kelcey
Paperback
The Ultimate Guide to Rebuilding a Civilization: A Technical Manual for the Post-Collapse Era
Evans, James
Paperback
Elledge's Nontrivial Trivia: The Seriously Enlightening Stories Behind Supposedly Simple Facts
Elledge, Jonn
Paperback
Judas Dentistry: How Dentists Scorn Science, Break the Hippocratic Oath, and Wreck Their Patients' Minds and Bodies
Yoho, (Ret) Robert
Paperback
Force of Nature: Understanding Evolution's Deepest Logic-And Putting It to Use
Jones, Owen D.
Hardcover
Liquid Rules: The Delightful and Dangerous Substances That Flow Through Our Lives
Miodownik, Mark
Paperback
Kobuk the Destroyer: And Other Tales from the Wild, Unseen World of Test Engineering
Davies, Alex
Hardcover
You Look Like a Thing and I Love You: How Artificial Intelligence Works and Why It's Making the World a Weirder Place
Shane, Janelle
Paperback
The New Guys: The Historic Class of Astronauts That Broke Barriers and Changed the Face of Space Travel
Bagby, Meredith
Paperback
Baked to Perfection: Winner of the Fortnum & Mason Food and Drink Awards 2022
Cermelj, Katarina
Hardcover
Science in Seconds for Kids: Over 100 Experiments You Can Do in Ten Minutes or Less
Potter, Jean
Stier, Samuel Cord
Paperback
Notes on Complexity: A Scientific Theory of Connection, Consciousness, and Being
Theise, Neil
Paperback
180 Days(r) Science for Sixth Grade: Practice, Assess, Diagnose
Homayoun, Lauren
Bayne, Bebra
Paperback
When the Forest Breathes: Renewal and Resilience in the Natural World (Large Print Edition)
Simard, Suzanne
Paperback
Designing for People: An Introduction to Human Factors Engineering
Boyle, Linda Ng
Wickens, Christopher D.
Liu, Yili
Paperback
Stay Curious and Keep Exploring: 50 Amazing, Bubbly, and Creative Science Experiments to Do with the Whole Family
Calandrelli, Emily
Hardcover
Gray's Anatomy (Deluxe Leatherbound Edition): Anatomy Descriptive and Surgical
Gray, Henry, Frs
Hardcover
Think in Systems: The Art of Strategic Planning, Effective Problem Solving, And Lasting Results
McKey, Zoe
Paperback
Why Nobody Understands Quantum Physics: The Story of the Science That Shapes Our World
Verstraete, Frank
Broeckaert, Céline
Hardcover
The Next Big Thing: Innovations for a Better, Smarter, Stronger Tomorrow
Marciano, Rob
Trefil, James
Hardcover
Stuff Matters: Exploring the Marvelous Materials That Shape Our Man-Made World
Miodownik, Mark
Paperback
Allies for Awakening: Guidelines for productive and safe experiences with entheogens
Metzner, Ralph
Paperback
The Salmon Cannon and the Levitating Frog: And Other Serious Discoveries of Silly Science
York, Carly Anne
Hardcover
The Physics of Wall Street: A Brief History of Predicting the Unpredictable
Weatherall, James Owen
Paperback
They Had Names: Tracing the History of the North American Indigenous People
Jeanson, Nathaniel
Hardcover
Pseudoscience: An Amusing History of Crackpot Ideas and Why We Love Them
Pedersen, Nate
Kang, Lydia
Hardcover
Outer Space Is Closer Than Antarctica: And Other Things I Learned While Falling in Love at the Bottom of the World
Ott, Michelle
Hardcover
The Peptide Protocols: Exploring the Science for Human Optimization: Exploring the
Smith, W. T.
Paperback
The Theoretical Minimum: What You Need to Know to Start Doing Physics
Hrabovsky, George
Susskind, Leonard
Paperback
The Radioactive Boy Scout: The Frightening True Story of a Whiz Kid and His Homemade Nuclear Reactor
Silverstein, Ken
Paperback
Counterclockwise: Using Peptides to Renew, Rejuvenate, and Rediscover (Large Print Edition)
Ferree, Suzanne J.
Hardcover
The Autobiography of Nikola Tesla and Other Works (Deluxe Leatherbound Edition)
Tesla, Nikola
Martin, Thomas Commerford
Hardcover
Is This an Agate?: An Illustrated Guide to Lake Superior's Beach Stones Michigan
Robinson, Susan
Paperback
Elementary Science Education: Building Foundations of Scientific Understanding, Vol. II, grades 3-5, 2nd ed.
Nebel, Bernard J.
Paperback
Signals from the Subatomic World: How to Build a Proton Precession Magnetometer
Hollos, Stefan
Hollos, Richard
Paperback
Avoiding the Great Filter: Illuminating Pathways to Humanity's Future in the Cosmos
Rosen, Philip E.
Jiang, Jonathan H.
Hardcover
Middle School Science Education: Building Foundations of Scientific Understanding, Vol. III, Grades 6-8
Nebel, Bernard J.
Paperback
Labwork to Leadership: A Concise Guide to Thriving in the Science Job You Weren't Trained for
Heemstra, Jen
Hardcover
The Pale Blue Data Point: An Earth-Based Perspective on the Search for Alien Life
Willis, Jon
Hardcover
The One Thing You Need to Know: The Simple Way to Understand the Most Important Ideas in Science
Chown, Marcus
Paperback
GED Test Prep - Science & Social Studies: A Quickstudy Laminated Reference Guide
Berg Scherer, Rachel
Miskevich, Frank
Other
180 Days(r) Geography for Fourth Grade: Practice, Assess, Diagnose
Aracich, Chuck
Aracich, Charles
Paperback
Life in Sync: The Science of Internal Clocks and How We're Disrupting Them
Gander, Philippa
Hardcover
Art-Science Undisciplined: A Playbook for Transformative Collaboration
Gosnell, Natalie
Balasubramanian, Janani
Paperback
Ether Day: The Strange Tale of America's Greatest Medical Discovery and the Haunted Men Who Made It
Fenster, J. M.
Paperback
Hunt for the Skinwalker: Science Confronts the Unexplained at a Remote Ranch in Utah
Knapp, George
Kelleher, Colm A.
Paperback
Science and Cooking: Physics Meets Food, from Homemade to Haute Cuisine
Weitz, David
Brenner, Michael
Sörensen, Pia
Hardcover
Storytime Stem: Nursery Rhymes: 10 Favorite Rhymes with Hands-On Investigations
Rhodes, Immacula
Rhodes, Immacula A.
Paperback
Lottery Manifestation: HOW TO WIN THE LOTTERY 100% GUARANTEED Or Your Money Back!!!: Lottery Books: Proven Methods And Strategies Using THE L
Secrets, Powerball Money
Paperback
(Super) Natural Science: The Real Science of Superheroes, Mythic Creatures, and the (Sci-Fi) Universe
Liu, Charles
Paperback
Reactions: An Illustrated Exploration of Elements, Molecules, and Change in the Universe
Gray, Theodore
Paperback
