ebook img

Hands-On Software Architecture with Java - Learn key architectural techniques and strategies to design efficient and elegant Java applications PDF

510 Pages·2022·10.445 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Hands-On Software Architecture with Java - Learn key architectural techniques and strategies to design efficient and elegant Java applications

Hands-On Software Architecture with Java Learn key architectural techniques and strategies to design efficient and elegant Java applications Giuseppe Bonocore BIRMINGHAM—MUMBAI Hands-On Software Architecture with Java Copyright © 2022 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Group Product Manager: Aaron Lazar Publishing Product Manager: Richa Tripathi Senior Editor: Nisha Cleetus Content Development Editor: Rosal Colaco Technical Editor: Maran Fernandes Copy Editor: Safis Editing Project Coordinator: Manisha Singh Proofreader: Safis Editing Indexer: Hemangini Bari Production Designer: Joshua Misquitta Marketing Coordinator: Pooja Yadav First published: February 2022 Production reference: 1100222 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-80020-730-1 www.packt.com Contributors About the author Giuseppe Bonocore is a solution architect dealing with application development, Java technology, JBoss middleware, and Kubernetes projects since 2014. He has more than 10 years of experience in open source software, in different roles. His professional experience includes Red Hat, Accenture, and Docomo Digital, covering many technical leadership roles and deploying huge open source projects across Europe. I want to thank the people who have been close to me and supported me, especially my wife. About the reviewer Andres Sacco is a technical lead at MercadoLibre and has experience in different languages, such as Java, PHP, and Node.js. In his previous job, he helped to find alternative ways to optimize the transference of data between microservices, which helps to reduce the cost of infrastructure by 55%. Also, he has dictated some internal courses about new technologies, and he has written some articles on Medium. Stefano Violetta is a creative backend developer with over 14 years of expertise in software development and architecture, managing all stages of the development cycle; he has worked in many different companies, from start-ups to tech giants such as eBay. He likes putting together well-written code that helps to create advanced applications that are fit for purpose, functionally correct, and meet the user's precise needs. On a personal level, he possesses really strong interpersonal skills, being respectful and collaborative. He lives (and works) in the suburbs of Milan, Italy, with his wife and two kids. When he isn't dealing with software, he likes to read and watch movies. Table of Contents Preface Section 1: Fundamentals of Software Architectures 1 Designing Software Architectures in Java – Methods and Styles The importance of The changing role of Java software architecture 4 in cloud-native applications 13 The objectives of architecture Why Java technology is still design in the software life cycle 4 relevant today 13 The software architect – role Java usage in enterprise and skills 6 environments 14 Is architecture design still relevant in JEE evolution and criticism 15 modern development? 6 Introducing cloud-native Java 17 The Java microservices Different types of architecture ecosystem 19 design – from doodling on paper to more accurate Case studies and examples 20 modeling 7 Case study – mobile payments 20 Sketching the main architectural Whiteboarding the overall components 8 architecture 21 Other kinds of architectural Software components diagrams 9 diagram 22 Common types of architectural Summary 24 diagrams 10 Further reading 25 viii Table of Contents 2 Software Requirements – Collecting, Documenting, Managing Introducing requirements The 830-1998 standard 46 engineering 29 The 29148 standard 47 Feature, Advantage, and Benefit 29 Collecting requirements – Features and technical formats and tools 48 requirements 31 Software requirements data Types and characteristics of to collect 48 requirements 32 Collecting software requirements The life cycle of a requirement 34 in spreadsheets 50 Discovering and collecting Specialized tools for software requirements 36 requirements management 50 Spreadsheets versus tools 51 The lean canvas 37 Event Storming 39 Validating requirements 52 More discovery practices 41 Case studies and Analyzing requirements 43 examples 53 Checking for coherence and The mobile payment application feasibility 43 example 53 Checking for explicitness and Event Storming for peer- testability 44 to-peer payments 56 Checking non-functional requirements and constraints 44 Requirements spreadsheet 57 Specifying requirements Summary 58 according to the IEEE Further reading 58 standard 45 3 Common Architecture Design Techniques Introducing marchitectures Class diagrams 65 – impactful and purely Sequence diagram 66 demonstrative schemas 60 Wrapping up on UML 67 Familiarizing ourselves Exploring ArchiMate 67 with UML notation 61 The ArchiMate Core and Understanding the background Full Frameworks 68 to UML 62 Table of Contents ix Navigating the ArchiMate DMN 78 language tree 70 arc42 78 Comparing ArchiMate to UML 72 Case studies and Comparing ArchiMate to TOGAF 73 examples 79 Introducing the C4 model 73 UML class diagrams for mobile Exploring the C4 model 73 payments 79 Filling in the different levels 75 C4 diagrams for mobile payments 81 Other modeling techniques 76 Summary 84 BPMN 76 Further reading 84 4 Best Practices for Design and Development Understanding Domain Comparing DDD, TDD, Driven Design 86 and BDD 100 The anemic domain model 87 Learning about user Understanding ubiquitous story mapping 100 language 87 The MVP 103 Getting familiar with layered architecture 89 Case studies and Learning about the domain examples 103 model 91 The mobile payments domain Glancing at DDD patterns 94 model 104 Bounded Context 95 The layered architecture of mobile payments 104 Introducing Test Driven BDD of mobile payments 106 Development 97 User story mapping of mobile Exploring Behavior payments 107 Driven Development 99 Summary 109 Further reading 109 5 Exploring the Most Common Development Models Learning about Code Glancing at the Waterfall and Fix 112 model 113 x Table of Contents Advantages and disadvantages Advantages and disadvantages of the Waterfall model 115 of Scrum 129 Understanding the Agile Learning about other methodology 116 Agile practices 130 The Agile principles 117 Kaizen 130 Planning Poker 131 Introducing Lean Kanban board 132 software development 118 Burndown chart 133 Eliminating waste 118 Deciding as late as possible 121 Understanding DevOps Delivering as fast as possible 121 and its siblings 135 Optimizing the whole product 122 DevOps team size 135 Pros and cons of Lean Roles and responsibilities in development 122 a DevOps team 136 Devs, Ops, and more 137 Exploring Scrum 123 DevOps and the bigger Understanding the Scrum organization 138 teams 124 Pros and cons of DevOps 139 Learning about Scrum Events 125 Understanding Scrum Case studies and examples 140 artifacts 128 Summary 140 Further reading 141 Section 2: Software Architecture Patterns 6 Exploring Essential Java Architectural Patterns Encapsulation and Client-side MVC 154 hexagonal architectures 146 Diving into event-driven Hexagonal architectures and and reactive approaches 154 Domain Driven Design 148 Defining events, commands, Encapsulation and microservices 148 and messages 155 Learning about multi-tier Introducing the event-driven architectures 149 pattern and event-driven architecture 156 Exploring Model View Controller 151 Designing for large-scale Server-side MVC 153 adoption 163 Table of Contents xi Defining performance goals 163 Encapsulating with a Stateless 166 hexagonal architecture 171 Data 167 Componentizing with Scaling 169 multi-tier architecture 172 Planning for performance Case studies and and scalability 174 examples 170 Summary 176 Further reading 177 7 Exploring Middleware and Frameworks Technical requirements 180 MicroProfile specifications 201 Introducing the JEE Exploring Quarkus 202 standard 180 Better performances 203 Diving into JEE implementations 181 Developer joy 203 Introducing the WildFly Quarkus – hello world 204 application server 182 Building techniques with Quarkus 206 Exploring the WildFly Configuration management architecture 182 in Quarkus 207 Running the WildFly server 184 Most common Quarkus Understanding the most extensions 208 common JEE APIs 185 Content Dependency Injection 208 Dependency injection 185 REST services with JAX-RS 209 Jakarta RESTful Web Services 188 WebSockets 209 WebSocket 192 Messaging 210 Messaging 193 Persistence 211 Persistence 195 Accelerated ORM development What's missing in Java EE 196 with Panache 211 What's great about Java EE 198 Quarkus and the Going beyond Java MicroProfile standard 214 Enterprise Edition 198 Case studies and examples 214 Packaging microservices applications 199 Summary 222 Introducing MicroProfile 200 Further reading 223

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.