Real-World Software Development

Book Description

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.

Publisher Resources

View/Submit Errata

Table of Contents

  1. Preface
    1. Why We Wrote This Book
    2. A Developer-Oriented Approach
    3. What’s in the Book?
    4. Who Should Read This Book?
    5. Conventions Used in This Book
    6. Using Code Examples
    7. O’Reilly Online Learning
    8. How to Contact Us
  2. 1. Starting the Journey
    1. Themes
      1. Java Features
      2. Software Design and Architecture
      3. SOLID
      4. Testing
    2. Chapter Summary
    3. Iterating on You
  3. 2. The Bank Statements Analyzer
    1. The Challenge
    2. The Goal
    3. Bank Statements Analyzer Requirements
    4. KISS Principle
      1. final Variables
    5. Code Maintainability and Anti-Patterns
      1. God Class
      2. Code Duplication
    6. Single Responsibility Principle
    7. Cohesion
      1. Class-Level Cohesion
      2. Method-Level Cohesion
    8. Coupling
    9. Testing
      1. Automated Testing
      2. Using JUnit
      3. Code Coverage
    10. Takeaways
    11. Iterating on You
    12. Completing the Challenge
  4. 3. Extending the Bank Statements Analyzer
    1. The Challenge
    2. The Goal
    3. Extended Bank Statements Analyzer Requirements
    4. Open/Closed Principle
      1. Creating an Instance of a Functional Interface
      2. Lambda Expressions
    5. Interfaces Gotchas
      1. God Interface
      2. Too Granular
    6. Explicit Versus Implicit API
      1. Domain Class or Primitive Value?
    7. Multiple Exporters
      1. Introducing a Domain Object
      2. Defining and Implementing the Appropriate Interface
    8. Exception Handling
      1. Why Use Exceptions?
      2. Patterns and Anti-Patterns with Exceptions
      3. Guidelines for Using Exceptions
      4. Alternatives to Exceptions
    9. Using a Build Tool
      1. Why Use a Build Tool?
      2. Using Maven
      3. Using Gradle
    10. Takeaways
    11. Iterating on You
    12. Completing the Challenge
  5. 4. The Document Management System
    1. The Challenge
    2. The Goal
    3. Document Management System Requirements
    4. Fleshing Out the Design
      1. Importers
      2. The Document Class
      3. Attributes and Hierarchical Documents
      4. Implementing and Registering Importers
    5. The Liskov Substitution Principle (LSP)
    6. Alternative Approaches
      1. Making Importer a Class
      2. Scoping and Encapsulation Choices
    7. Extending and Reusing Code
    8. Test Hygiene
      1. Test Naming
      2. Behavior Not Implementation
      3. Don’t Repeat Yourself
      4. Good Diagnostics
      5. Testing Error Cases
      6. Constants
    9. Takeaways
    10. Iterating on You
    11. Completing the Challenge
  6. 5. The Business Rules Engine
    1. The Challenge
    2. The Goal
    3. Business Rules Engine Requirements
    4. Test Driven Development
      1. Why Use TDD?
      2. The TDD Cycle
    5. Mocking
    6. Adding Conditions
      1. Modeling State
      2. Local Variable Type Inference
      3. Switch Expressions
      4. Interface Segregation Principle
    7. Designing a Fluent API
      1. What Is a Fluent API?
      2. Modeling the Domain
      3. Builder Pattern
    8. Takeaways
    9. Iterating on You
    10. Completing the Challenge
  7. 6. Twootr
    1. The Challenge
    2. The Goal
    3. Twootr Requirements
    4. Design Overview
      1. Pull-Based
      2. Push-Based
    5. From Events to Design
      1. Communication
      2. GUI
      3. Persistence
      4. The Hexagonal Architecture
    6. Where to Begin
    7. Passwords and Security
    8. Followers and Twoots
      1. Modeling Errors
      2. Twooting
      3. Creating Mocks
      4. Verifying with Mocks
      5. Mocking Libraries
      6. SenderEndPoint
    9. Positions
      1. The equals and hashcode Methods
      2. The Contract Between equals and hashCode
    10. Takeaways
    11. Iterating on You
    12. Completing the Challenge
  8. 7. Extending Twootr
    1. The Challenge
    2. The Goal
    3. Recap
    4. Persistence and the Repository Pattern
      1. Designing the Repositories
      2. Query Objects
    5. Functional Programming
      1. Lambda Expressions
      2. Method References
      3. Execute Around
      4. Streams
      5. Optional
    6. User Interface
    7. Dependency Inversion and Dependency Injection
    8. Packages and Build Systems
    9. Limitations and Simplifications
    10. Takeaways
    11. Iterating on You
    12. Completing the Challenge
  9. 8. Conclusion
    1. Project-Based Structure
    2. Iterating on You
    3. Deliberate Practice
    4. Next Steps and Additional Resources
  10. Index

Product Information

  • Title: Real-World Software Development
  • Author(s): Raoul-Gabriel Urma, Richard Warburton
  • Release date: December 2019
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491967171