0%

Book Description

Written by the core development team of JHipster and fully updated for JHipster 6, Java 11, and Spring Boot 2.1, this book will show you how to build modern web applications with real-world examples and best practices

Key Features

  • Build full stack applications with modern JavaScript frameworks such as Angular, React, and Vue.js
  • Explore the JHipster microservices stack, which includes Spring Cloud, Netflix OSS, and the Elastic Stack
  • Learn advanced local and cloud deployment strategies using Docker and Kubernetes

Book Description

JHipster is an open source development platform that allows you to easily create web apps and microservices from scratch without spending time on wiring and integrating different technologies. Updated to include JHipster 6, Java 11, Spring Boot 2.1, Vue.js, and Istio, this second edition of Full Stack Development with JHipster will help you build full stack applications and microservices seamlessly.

You'll start by understanding JHipster and its associated tools, along with the essentials of full stack development, before building a monolithic web app. You'll then learn the JHipster Domain Language (JDL) with entity modeling using JDL-Studio. With this book, you'll create production-ready web apps using Spring Boot, Spring Framework, Angular, and Bootstrap, and run tests and set up continuous integration pipelines with Jenkins. As you advance, you'll learn how to convert your monoliths to microservices and how to package your application for production with various deployment options, including Heroku and Google Cloud. You'll also learn about Docker and Kubernetes, along with an introduction to the Istio service mesh. Finally, you'll build your client-side with React and Vue.js and discover JHipster's best practices.

By the end of the book, you'll be able to leverage the best tools available to build modern web apps.

What you will learn

  • Create full stack apps from scratch using the latest features of JHipster 6 and Spring Boot 2.1
  • Build business logic by creating and developing entity models using JDL
  • Understand how to convert a monolithic architecture into a full-fledged microservices architecture
  • Build and package your apps for production using Docker
  • Deploy your application to Google Cloud with Kubernetes
  • Create continuous integration/continuous delivery pipelines with Jenkins
  • Create applications using Angular, React, and Vue.js client-side frameworks

Who this book is for

This book is for full stack developers who want to build web applications and microservices speedily without writing a lot of boilerplate code. If you're a backend developer looking to learn full stack development with JavaScript frameworks and libraries such as Angular, React, and Vue.js, you'll find this book useful. Experience in building Java web applications is required. Some exposure to the Spring Framework would be beneficial but not necessary to get the most out of this book.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Full Stack Development with JHipster Second Edition
  3. Dedication
  4. About Packt
    1. Why subscribe?
  5. Foreword
  6. Contributors
    1. About the authors
    2. About the reviewer
    3. Packt is searching for authors like you
  7. 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. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  8. Section 1: Getting Started with the JHipster Platform
  9. Introduction to Modern Web Application Development
    1. Modern full stack web development
    2. Web architecture patterns
      1. Monolithic web architecture
      2. Microservice architecture
    3. Choosing the right pattern
      1. When to choose a monolithic architecture
      2. When to choose a microservice architecture
    4. Summary
  10. Getting Started with JHipster
    1. Why JHipster?
    2. Goal and adoption of JHipster
    3. Introduction to available technologies 
      1. Client-side technologies
        1. HTML5 and CSS3
        2. SASS
        3. Bootstrap
        4. MVVM framework
          1. Angular
          2. React
          3. Vue.js
        5. Build tools – webpack and BrowserSync
        6. Testing tools – Jest and Protractor
        7. Internationalization
      2. Server-side technologies
        1. Spring Framework
          1. Spring Boot
          2. Spring Security
          3. Spring MVC
          4. Spring Data
        2. Security
          1. JWT
          2. Session
          3. OAuth2/OIDC
        3. Build tools – Maven and Gradle
        4. Hibernate
        5. Liquibase
        6. Caching
          1. Ehcache
          2. Hazelcast
          3. Infinispan
          4. Memcached
          5. Redis
        7. Swagger
        8. Thymeleaf
        9. Micrometer
        10. WebSocket
        11. Kafka
        12. Testing frameworks – JUnit, Gatling, and Cucumber
      3. Introduction to database options
        1. SQL databases
          1. H2
          2. MySQL
          3. MariaDB
          4. PostgreSQL
          5. MS SQL
          6. Oracle
        2. NoSQL databases
          1. MongoDB
          2. Cassandra
          3. Couchbase
          4. Elasticsearch
    4. Installing and setting up JHipster
      1. Prerequisites
        1. Tools required
          1. Java
          2. Git
          3. Node.js
          4. Docker
        2. IDE configuration
        3. System setup
      2. Installation of JHipster
    5. Summary
  11. Section 2: Building and Customizing Web Applications with JHipster
  12. Building Monolithic Web Applications with JHipster
    1. Application generation
      1. Step 1 – preparing the workspace
      2. Step 2 – generating code using JHipster
        1. Server-side options
        2. Client-side options
        3. Internationalization options
        4. Testing
        5. Modules
    2. Code walkthrough
      1. File structure
      2. Server-side source code
        1. Java source
        2. Resources
      3. Client-side source code
    3. Starting the application
    4. Application modules
      1. Home and login modules
      2. Account modules
        1. Settings
        2. Password
        3. Registration
      3. Admin module
        1. User management
        2. Metrics
        3. Health
        4. Configuration
        5. Audits
        6. Logs
        7. API
    5. Running generated tests
      1. Server-side tests
      2. Client-side tests
    6. Summary
  13. Entity Modeling with JHipster Domain Language
    1. Introduction to JDL
      1. DSL grammar for JDL
        1. Entity modeling with JDL
        2. Relationship management
        3. DTO, service, and pagination options
      2. JDL-Studio
      3. Use case entity model
        1. Entities
        2. Relationships
        3. Options for entities
    2. Entity generation with JHipster
      1. Generated code walkthrough
        1. Server-side source code
          1. Domain class for the entity
          2. Repository interface for the entity
          3. Service class for the entity
          4. Resource class for the entity
        2. Client-side
          1. TypeScript model class for the entity
          2. Angular services for the entity
          3. Angular components of the entity
          4. Angular route for the entity
          5. Angular module for the entity
    3. Generated pages
    4. Running the generated tests
    5. Summary
  14. Customization and Further Development
    1. Live reload for development
      1. Spring Boot DevTools
      2. Webpack dev server and BrowserSync
      3. Setting up live reloads for an application
    2. Customizing the Angular frontend for an entity
      1. Bringing back the sorting functionality
      2. Adding a filtering functionality
    3. Editing an entity using the JHipster entity sub-generator
    4. Changing the look and feel of the application
    5. Adding a new i18n language
    6. Authorization with Spring Security
      1. Limiting access to entities
      2. Limiting access to create/edit/delete entities
      3. Limiting access to the data of other users
    7. Summary
  15. Section 3: Continuous Integration and Testing
  16. Testing and Continuous Integration
    1. Fixing and running tests
    2. Briefing on CI
    3. CI/CD tools
      1. Jenkins
      2. Azure Pipelines
      3. Travis CI
      4. GitLab CI
      5. GitHub Actions
    4. Setting up Jenkins
    5. Creating a Jenkins pipeline using JHipster
      1. The Jenkinsfile and its stages
      2. Setting up the Jenkinsfile in a Jenkins server
    6. Summary
  17. Going into Production
    1. Introduction to Docker
      1. Docker containers
      2. Dockerfiles
      3. Docker Hub
      4. Docker Compose
    2. Starting the production database with Docker
    3. Introducing Spring profiles
    4. Packaging the application for local deployment
      1. Building and deploying using Docker
      2. Building and deploying an executable archive
    5. Upgrading to the newest version of JHipster
    6. Deployment options supported by JHipster
      1. Heroku
      2. Cloud Foundry
      3. Amazon Web Services
      4. Google App Engine
      5. Azure Spring Cloud
      6. Azure App Service
    7. Production deployment to the Heroku Cloud
    8. Summary
  18. Section 4: Converting Monoliths to Microservice Architecture
  19. Microservice Server-Side Technologies
    1. Microservice applications versus monoliths
      1. Scalability
      2. Efficiency
      3. Time constraint 
    2. Building blocks of a microservices architecture
      1. Service registry
      2. Service discovery
        1. Client-side discovery pattern
        2. Server-side discovery pattern
      3. Health check
      4. Dynamic routing and resiliency
      5. Security
      6. Fault tolerance and failover
    3. Options supported by JHipster
      1. JHipster Registry
        1. Netflix Eureka
        2. Spring Cloud Config Server
      2. HashiCorp Consul
        1. Service discovery
        2. Health discovery
        3. Key/Value store
        4. Multiple data centers
      3. JHipster gateway
        1. Netflix Zuul
        2. Hystrix
      4. JHipster Console
        1. Elasticsearch
        2. Logstash
        3. Kibana
        4. Zipkin
      5. Prometheus
      6. JWT authentication
        1. How JWT works
      7. JHipster UAA server
    4. Summary
  20. Building Microservices with JHipster
    1. Application architecture
    2. Generating a microservice stack using JDL
      1. Application modeling using JDL
      2. Gateway application
        1. JDL specification for the gateway application
      3. Microservice invoice application
        1. JDL specification for the invoice application
      4. Microservice notification application
        1. JDL specification for the notification application
      5. Modeling microservice entities in JDL 
      6. Application generation with import-jdl
    3. Gateway application
      1. Gateway application entities
    4. Invoice microservice configuration
    5. Notification microservice configuration
    6. Summary
  21. Working with Microservices
    1. Setting up JHipster Registry locally
      1. Using a pre-packaged JAR file
        1. Docker mode
    2. Running a generated application locally
      1. Gateway application pages
      2. JHipster Registry pages
        1. Dashboard
          1. System status
          2. Instances registered
          3. General info and health
        2. Application listing page
        3. Metrics page
        4. Health page
        5. Configuration page
        6. Logs page
        7. Loggers
        8. Swagger API endpoints
      3. Running invoice and notification applications locally
      4. Explaining the generated entity pages
    3. Summary
  22. Section 5: Deployment of Microservices
  23. Deploying with Docker Compose
    1. Introducing microservice deployment options
      1. A short introduction to Docker Compose
      2. Introduction to Kubernetes
      3. Introduction to OpenShift
    2. Generated Docker Compose files
      1. Walking through the generated files
      2. Building and deploying everything to Docker locally
    3. Generating Docker Compose files for microservices
      1. Features of the deployed application
      2. JHipster Console demo
      3. Scaling up with Docker
    4. Summary
  24. Deploying to the Cloud with Kubernetes
    1. Generating Kubernetes configuration files with JHipster
      1. Generating the Kubernetes manifests
    2. Walking through the generated files
    3. Deploying the application to Google Cloud with Kubernetes
    4. Using Istio service mesh
      1. What is Istio?
      2. Microservice with Istio service mesh
      3. Deploying Istio to a Kubernetes cluster
      4. Generating the application
      5. Deploying to Google Cloud
    5. Summary
  25. Section 6: React and Vue.js for the Client Side
  26. Using React for the Client-Side
    1. Generating an application with React client-side
    2. Technical stack and source code
      1. Technical stacks
        1. Using TypeScript
        2. State management with Redux and friends
        3. Routing with React Router
        4. HTTP requests using Axios
        5. Bootstrap components using reactstrap
        6. Unit testing setup
      2. Generated source code
    3. Generating an entity with React client-side
    4. Summary
  27. Using Vue.js for the Client-Side
    1. Generating an application with Vue.js client-side
    2. Technical stack and source code
      1. Technical stack
        1. Using TypeScript
        2. State management with Vuex
        3. Routing with Vue Router
        4. HTTP requests using Axios
        5. Bootstrap components using BootstrapVue
        6. Unit testing setup
      2. Generated source code
    3. Generating an entity with VueJS client-side
    4. Summary
  28. Best Practices with JHipster
    1. The next steps to take
      1. Adding a shopping cart for the application
      2. Improving end-to-end tests
      3. Improving the CI/CD pipeline
      4. Create an e-commerce application with React or Vue.js
      5. Building a JHipster module
    2. The best practices to keep in mind
      1. Choosing a client-side framework
      2. Choosing a database option
      3. Architecture considerations
      4. Security considerations
      5. Deployment and maintenance
      6. General best practices
    3. Using JHipster modules
    4. Contributing to JHipster
    5. Summary
  29. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
18.223.20.57