Book Image

Full Stack Development with JHipster - Second Edition

By : Deepu K Sasidharan, Sendil Kumar Nellaiyapen
Book Image

Full Stack Development with JHipster - Second Edition

By: Deepu K Sasidharan, Sendil Kumar Nellaiyapen

Overview of this book

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.
Table of Contents (23 chapters)
1
Section 1: Getting Started with the JHipster Platform
4
Section 2: Building and Customizing Web Applications with JHipster
8
Section 3: Continuous Integration and Testing
11
Section 4: Converting Monoliths to Microservice Architecture
15
Section 5: Deployment of Microservices
18
Section 6: React and Vue.js for the Client Side

Generating an entity with React client-side

Now, let's look at how we can create an entity using the JHipster entity generator with a React client-side. We will create a simple employee entity with the name, age, and date of birth fields:

  1. Open a Terminal, navigate to the folder of the React app, and run jhipster entity employee.
  1. Create the fields one by one, select Yes for the question Do you want to add a field to your entity?, and start filling in the field with name for the next question, What is the name of your field?
  2. Select String as the field type for the next question, What is the type of your field?
  3. For the question Which validation rules do you want to add?, choose Required for the name field and proceed.
  4. Continue this process for the age and dob fields. age is of the integer type, while dob is of the instant type.
  5. When asked again, Do you want to add a field...