Hands-On Full Stack Development with Spring Boot 2.0 and React

Book description

Develop efficient and modern full-stack applications using Spring Boot and React 16

Key Features

  • Develop resourceful backends using Spring Boot and faultless frontends using React.
  • Explore the techniques involved in creating a full-stack app by going through a methodical approach.
  • Learn to add CRUD functionalities and use Material UI in the user interface to make it more user-friendly.

Book Description

Apart from knowing how to write frontend and backend code, a full-stack engineer has to tackle all the problems that are encountered in the application development life cycle, starting from a simple idea to UI design, the technical design, and all the way to implementing, testing, production, deployment, and monitoring. This book covers the full set of technologies that you need to know to become a full-stack web developer with Spring Boot for the backend and React for the frontend.

This comprehensive guide demonstrates how to build a modern full-stack application in practice. This book will teach you how to build RESTful API endpoints and work with the data access Layer of Spring, using Hibernate as the ORM. As we move ahead, you will be introduced to the other components of Spring, such as Spring Security, which will teach you how to secure the backend. Then, we will move on to the frontend, where you will be introduced to React, a modern JavaScript library for building fast and reliable user interfaces, and its app development environment and components.

You will also create a Docker container for your application. Finally, the book will lay out the best practices that underpin professional full-stack web development.

What you will learn

  • Create a RESTful web service with Spring Boot
  • Understand how to use React for frontend programming
  • Gain knowledge of how to create unit tests using JUnit
  • Discover the techniques that go into securing the backend using Spring Security
  • Learn how to use Material UI in the user interface to make it more user-friendly
  • Create a React app by using the Create React App starter kit made by Facebook

Who this book is for

Java developers who are familiar with Spring, but have not yet built full-stack applications

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Hands-On Full Stack Development with Spring Boot 2.0 and React
  3. Dedication
  4. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  5. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Conventions used
    4. Get in touch
      1. Reviews
  7. Setting Up the Environment and Tools – Backend
    1. Technical requirements
    2. Setting up the environment and tools
      1. Installing Eclipse
      2. The basics of Eclipse and Maven
      3. Creating the project with Spring Initializr
      4. How to run the project
      5. Spring Boot development tools
      6. Logs and problem solving
      7. Installing MariaDB
    3. Summary
    4. Questions
    5. Further reading
  8. Using JPA to Create and Access a Database
    1. Technical requirements
      1. Basics of ORM, JPA, and Hibernate
      2. Creating the entity classes
      3. Creating CRUD repositories
      4. Relationships between tables
      5. Setting up the MariaDB database
    2. Summary
    3. Questions
    4. Further reading
  9. Creating a RESTful Web Service with Spring Boot
    1. Technical requirements
    2. Creating a RESTful web service with Spring Boot
      1. Basics of REST
      2. Creating a RESTful web service
      3. Using Spring Data REST
    3. Summary
    4. Questions
    5. Further reading
  10. Securing and Testing Your Backend
    1. Technical requirements
      1. Spring Security
      2. Securing your backend using JWT
      3. Testing in Spring Boot
      4. Creating unit tests
    2. Summary
    3. Questions
    4. Further reading
  11. Setting Up the Environment and Tools – Frontend
    1. Technical requirements
    2. Installing Node.js
    3. Installing VS Code
    4. Creating and running a React app
      1. Modifying a React app
    5. Summary
    6. Questions
    7. Further reading
  12. Getting Started with React
    1. Technical requirements
      1. Basic React components
      2. Basics of ES6
        1. Understanding constants
        2. Arrow functions
        3. Template literals
        4. Classes and inheritance
      3. JSX and styling
      4. Props and state
      5. Component life cycle methods
      6. Handling lists with React
      7. Handling events with React
      8. Handling forms with React
    2. Summary
    3. Questions
    4. Further reading
  13. Consuming the REST API with React
    1. Technical requirements
      1. Using promises
      2. Using the Fetch API
      3. Practical examples
    2. Summary 
    3. Questions
    4. Further reading
  14. Useful Third-Party Components for React
    1. Technical requirements
      1. Using third-party React components
      2. React Table
      3. The modal window component
      4. Material UI component library
      5. Routing
    2. Summary
    3. Questions
    4. Further reading
  15. Setting Up the Frontend for Our Spring Boot RESTful Web Service
    1. Technical requirements
      1. Mocking up the user interface
      2. Preparing the Spring Boot backend 
      3. Creating the React project for the frontend
    2. Summary 
    3. Questions
    4. Further reading
  16. Adding CRUD Functionalities
    1. Technical requirements
      1. Creating the list page
      2. The delete functionality
      3. The add functionality
      4. The edit functionality
      5. Other functionalities
    2. Summary
    3. Questions
    4. Further reading
  17. Styling the Frontend with React Material-UI
    1. Technical requirements
      1. Using the Button component
      2. Using the Grid component
      3. Using the TextField components
      4. Using the AppBar component
      5. Using the SnackBar component
    2. Summary
    3. Questions
    4. Further reading
  18. Testing Your Frontend
    1. Technical requirements
      1. Using Jest
      2. Snapshot testing
      3. Using Enzyme
    2. Summary
    3. Questions
    4. Further reading
  19. Securing Your Application
    1. Technical requirements
      1. Securing the backend
      2. Securing the frontend
    2. Summary
    3. Questions
    4. Further reading
  20. Deploying Your Application
    1. Technical requirements
      1. Deploying the backend
      2. Deploying the frontend
      3. Using Docker containers
    2. Summary
    3. Questions
    4. Further reading
  21. Best Practices
    1. What to learn next
      1. HTML 
      2. CSS
      3. HTTP
      4. JavaScript
      5. A backend programming language
      6. Some frontend libraries or frameworks
      7. Databases
      8. Version control
      9. Useful tools
      10. Security
    2. Best practices
      1. Coding conventions
      2. Choosing the proper tools
      3. Choosing the proper technologies
      4. Minimizing the amount of coding
    3. Summary
    4. Questions
    5. Further reading
  22. Assessments
    1. Chapter 1
    2. Chapter 2
    3. Chapter 3
    4. Chapter 4
    5. Chapter 5
    6. Chapter 6
    7. Chapter 7
    8. Chapter 8
    9. Chapter 9
    10. Chapter 10
    11. Chapter 11
    12. Chapter 12
    13. Chapter 13
    14. Chapter 14
    15. Chapter 15
  23. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Hands-On Full Stack Development with Spring Boot 2.0 and React
  • Author(s): Juha Hinkula
  • Release date: June 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789138085