Real-World Software Development A Project-Driven Guide to Fundamentals in Java (Raoul-Gabriel Urma Richard Warburton) (Z-Library)

Author: Raoul-Gabriel Urma, Richard Warburton

科学

Explore the latest Java-based software development techniques and methodologies through the project-based approach in this practical guide. Unlike books that use abstract examples and lots of theory, Real-World Software Development shows you how to develop several relevant projects while learning best practices along the way. With this engaging approach, junior developers capable of writing basic Java code will learn about state-of-the-art software development practices for building modern, robust and maintainable Java software. You’ll work with many different software development topics that are often excluded from software develop how-to references. Featuring real-world examples, this book teaches you techniques and methodologies for functional programming, automated testing, security, architecture, and distributed systems.

📄 File Format: PDF
💾 File Size: 3.6 MB
12
Views
0
Downloads
0.00
Total Donations

📄 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
1. Preface a. Why We Wrote This Book b. A Developer-Oriented Approach c. What’s in the Book? d. Who Should Read This Book? e. Conventions Used in This Book f. Using Code Examples g. O’Reilly Online Learning h. How to Contact Us 2. 1. Starting the Journey a. Themes i. Java Features ii. Software Design and Architecture iii. SOLID iv. Testing b. Chapter Summary c. Iterating on You 3. 2. The Bank Statements Analyzer a. The Challenge b. The Goal c. Bank Statements Analyzer Requirements
📄 Page 3
d. KISS Principle i. final Variables e. Code Maintainability and Anti-Patterns i. God Class ii. Code Duplication f. Single Responsibility Principle g. Cohesion i. Class-Level Cohesion ii. Method-Level Cohesion h. Coupling i. Testing i. Automated Testing ii. Using JUnit iii. Code Coverage j. Takeaways k. Iterating on You l. Completing the Challenge 4. 3. Extending the Bank Statements Analyzer a. The Challenge b. The Goal c. Extended Bank Statements Analyzer Requirements
📄 Page 4
d. Open/Closed Principle i. Creating an Instance of a Functional Interface ii. Lambda Expressions e. Interfaces Gotchas i. God Interface ii. Too Granular f. Explicit Versus Implicit API i. Domain Class or Primitive Value? g. Multiple Exporters i. Introducing a Domain Object ii. Defining and Implementing the Appropriate Interface h. Exception Handling i. Why Use Exceptions? ii. Patterns and Anti-Patterns with Exceptions iii. Guidelines for Using Exceptions iv. Alternatives to Exceptions i. Using a Build Tool i. Why Use a Build Tool? ii. Using Maven iii. Using Gradle
📄 Page 5
j. Takeaways k. Iterating on You l. Completing the Challenge 5. 4. The Document Management System a. The Challenge b. The Goal c. Document Management System Requirements d. Fleshing Out the Design i. Importers ii. The Document Class iii. Attributes and Hierarchical Documents iv. Implementing and Registering Importers e. The Liskov Substitution Principle (LSP) f. Alternative Approaches i. Making Importer a Class ii. Scoping and Encapsulation Choices g. Extending and Reusing Code h. Test Hygiene i. Test Naming ii. Behavior Not Implementation iii. Don’t Repeat Yourself
📄 Page 6
iv. Good Diagnostics v. Testing Error Cases vi. Constants i. Takeaways j. Iterating on You k. Completing the Challenge 6. 5. The Business Rules Engine a. The Challenge b. The Goal c. Business Rules Engine Requirements d. Test Driven Development i. Why Use TDD? ii. The TDD Cycle e. Mocking f. Adding Conditions i. Modeling State ii. Local Variable Type Inference iii. Switch Expressions iv. Interface Segregation Principle g. Designing a Fluent API i. What Is a Fluent API? ii. Modeling the Domain
📄 Page 7
iii. Builder Pattern h. Takeaways i. Iterating on You j. Completing the Challenge 7. 6. Twootr a. The Challenge b. The Goal c. Twootr Requirements d. Design Overview i. Pull-Based ii. Push-Based e. From Events to Design i. Communication ii. GUI iii. Persistence iv. The Hexagonal Architecture f. Where to Begin g. Passwords and Security h. Followers and Twoots i. Modeling Errors ii. Twooting iii. Creating Mocks
📄 Page 8
iv. Verifying with Mocks v. Mocking Libraries vi. SenderEndPoint i. Positions i. The equals and hashcode Methods ii. The Contract Between equals and hashCode j. Takeaways k. Iterating on You l. Completing the Challenge 8. 7. Extending Twootr a. The Challenge b. The Goal c. Recap d. Persistence and the Repository Pattern i. Designing the Repositories ii. Query Objects e. Functional Programming i. Lambda Expressions ii. Method References iii. Execute Around iv. Streams v. Optional
📄 Page 9
f. User Interface g. Dependency Inversion and Dependency Injection h. Packages and Build Systems i. Limitations and Simplifications j. Takeaways k. Iterating on You l. Completing the Challenge 9. 8. Conclusion a. Project-Based Structure b. Iterating on You c. Deliberate Practice d. Next Steps and Additional Resources 10. Index
📄 Page 10
Real-World Software Development A Project-Driven Guide to Fundamentals in Java Raoul-Gabriel Urma and Richard Warburton
📄 Page 11
Real-World Software Development by Raoul-Gabriel Urma and Richard Warburton Copyright © 2020 Functor Ltd. and Monotonic Ltd. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com. Editor: Alicia Young Production Editor: Kristen Brown Copyeditor: Kim Cofer Proofreader: Tracy Brown-Hamilton Indexer: Ellen Troutman-Zaig Interior Designer: David Futato Cover Designer: Karen Montgomery
📄 Page 12
Illustrator: Rebecca Demarest December 2019: First Edition Revision History for the First Edition 2019-12-02: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781491967171 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Real-World Software Development, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. The views expressed in this work are those of the authors, and do not represent the publisher’s views. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights. 978-1-491-96717-1 [LSI]
📄 Page 13
(This page has no text content)
📄 Page 14
Preface Mastering software development involves learning a disparate set of concepts. If you’re starting out as a junior software developer, or even if you’re more experienced, it can seem like an insurmountable hurdle. Should you be spending time learning about established topics in the object-oriented world such as SOLID principles, design patterns, or test-driven development? Should you be trying out things that are becoming increasingly popular such as functional programming? Even once you’ve picked some topics to learn it’s often hard to identify how they fit together. When you should go down the route of applying functional programming ideas in your project? When do you worry about testing? How do you know at what point to introduce or refine these techniques? Do you need to read a book on each of these topics and then another set of blog posts or videos to explain how to put things together? Where do you even start? Don’t worry, this book is here to help you. You will be helped through an integrated, project-driven approach to learning. You’ll learn the core topics that you need to know in order to become a productive developer. Not only that, but we show how these things fit together into bigger projects. Why We Wrote This Book
📄 Page 15
Over the years we have built up a wealth of experience around teaching developers to code. We have both written books on Java 8 onward and run training courses around professional software development. In the process we’ve been recognized as Java Champions and international conference speakers. We’ve found over the years that many developers could benefit from either an introduction or a refresher on several core topics. Design patterns, functional programming, SOLID principles, and testing are practices that often get good coverage in their own right, but it’s rarely shown how they work well and fit together. People sometimes even get put off from improving their skills simply due to the paralysis of choice over what to learn. We want to not only teach people core skills, but do so in a way that’s easy to approach and fun, too. A Developer-Oriented Approach This book also gives you the opportunity to learn in a developer- oriented way. It contains plenty of code samples and whenever we introduce a topic we always provide concrete code examples. You get all the code for the projects within the book, so if you want to follow along you can even step through the book code in an Integrated Development Environment (IDE) or run the programs in order to try them out. Another common bugbear when it comes to technical books is that they are often written in a formal, lecturing style. That’s not how normal people speak to each other! In this book you’ll get a
📄 Page 16
conversational style that helps to engage you in the content rather than being patronizing. What’s in the Book? Each chapter is structured around a software project. At the end of a chapter, if you’ve been following along, you should be able to write that project. The projects start off as simple command-line batch programs but grow in complexity to fully fledged applications. You’ll benefit from a project-driven structure in a variety of ways. First, you get to see how different programming techniques work together in an integrated setting. When we look at functional programming toward the end of the book, it isn’t just abstract collection-processing operations—they’re presented in order to calculate actual results used by the project in question. This solves the problem of educational material showing good ideas or approaches, but developers often use them inappropriately or out of context. Second, a project-driven approach helps ensure that at each stage you see realistic examples. Educational materials are often full of example classes called Foo and methods called bar. Our examples are relevant to the projects in question and show how to apply the ideas to real problems, similar to the ones that you may encounter in your career. Finally, it’s more fun and engaging to learn this way. Each chapter is a fresh project and a fresh opportunity to learn new things. We want
📄 Page 17
you to read through to the end and really enjoy turning the pages as you’re reading. The chapters start with a challenge that will be solved, walk you through the solution, and then end by evaluating what you learned and how the challenge was solved. We specifically call out the challenge at the beginning and end of every chapter to ensure that its goals are clear to you. Who Should Read This Book? We’re confident that developers from a wide variety of backgrounds will find things that are useful and interesting in this book. Having said that, there are some people who will get the maximum value out of this book. Junior software developers, often just out of university or a couple of years into their programming career, are who we think of as the core audience for this book. You’ll learn about fundamental topics that we expect to be of relevance throughout your software development career. You don’t need to have a university degree by any means, but you do need to know the basics of programming in order to make the best use of this book. We won’t explain what an if statement or a loop is, for example. You don’t need to know much about object-oriented or functional programming in order to get started. In Chapter 2, we make no assumptions beyond that you know what a class is and can use collections with generics (e.g., List<String>). We take it right from the basics.
📄 Page 18
Another group who will find this book of particular interest is developers learning Java while coming from another programming language, such as C#, C++, or Python. This book helps you quickly get up to speed with the language constructs and also the principles, practices, and idioms that are important to write good Java code. If you’re a more experienced Java developer, you may want to skip Chapter 2 in order to avoid repeating basic material that you already know, but Chapter 3 onward will be full of concepts and approaches that will be of benefit to many developers. We’ve found that learning can be one of the most fun parts of software development and hope that you’ll find that as well when reading this book. We hope you have fun on this journey. Conventions Used in This Book The following typographical conventions are used in this book: Italic Indicates new terms, URLs, email addresses, filenames, and file extensions. Constant width Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords. Constant width bold
📄 Page 19
Shows commands or other text that should be typed literally by the user. Constant width italic Shows text that should be replaced with user-supplied values or by values determined by context. NOTE This element signifies a general note. Using Code Examples Supplemental material (code examples, exercises, etc.) is available for download at https://github.com/Iteratr-Learning/Real-World- Software-Development. If you have a technical question or a problem using the code examples, please send email to bookquestions@oreilly.com. This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of
📄 Page 20
example code from this book into your product’s documentation does require permission. We appreciate, but generally do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Real-World Software Development by Raoul-Gabriel Urma and Richard Warburton (O’Reilly). Copyright 2020 Functor Ltd. and Monotonic Ltd., 978-1-491-96717-1.” If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at permissions@oreilly.com. O’Reilly Online Learning NOTE For more than 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed. Our unique network of experts and innovators share their knowledge and expertise through books, articles, conferences, and our online learning platform. O’Reilly’s online learning platform gives you on- demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from O’Reilly and 200+ other publishers. For more information, please visit http://oreilly.com.
The above is a preview of the first 20 pages. Register to read the complete e-book.

💝 Support Author

0.00
Total Amount (¥)
0
Donation Count

Login to support the author

Login Now
Back to List