A Mature Framework for Generating Hybrid Java and JavaScript Applications, JHipster Supports the Development Tools You Love and Provides Monitoring and Other Administrative Capabilities Out of the Box
JHipster is a long-lived and ambitious hybrid Java and JavaScript project that is dedicated to easing the development of full-stack Java applications using modern reactive front ends. The JHipster development team has consistently released new versions to keep up with industry changes. Let’s learn what this framework can do by building a simple application.
What is JHipster?
Out of the box, JHipster supports React, Vue, and Angular for the front end. It supports other frameworks, including Svelte, via plugins known as blueprints. On the back end, Spring Boot does the heavy lifting. In this regard, JHipster is similar to the Hilla framework, but with a more ambitious goal of supporting a wide variety of front-end stacks. At heart, JHipster is an advanced build tool that unifies the Java and JavaScript build toolchains and layers various administrative capabilities on top.
In addition to full-stack applications, JHipster supports building microservices components and has scaffolding for both JPA-based relational datastores and NoSQL datastores such as MongoDB and Cassandra. It also has features for logging and analytics.
JHipster’s toolset includes a command line and a domain-specific language (DSL) with a visual data modeler and a web-based constructor (think Spring Initializr on steroids). We’ll use the command line to get started. Note that you’ll need a system with fairly current Java, Node.js, and Git versions installed.
The JHipster Example Application
Follow the JHipster quickstart to install the generator-jhipster NPM package and create a new directory to run the generator. The generator will prompt you to configure your project by choosing options such as the type of application (monolith, gateway, microservice), the type of authentication (JWT, OAuth2, session-based), and the preferred front-end framework. This flexibility allows JHipster to cater to a wide range of project requirements.
Once the project configuration is complete, JHipster will generate the necessary files and directories for your application. This includes a structured front-end project with your chosen framework, a back-end project using Spring Boot, and a variety of configuration files for build tools and other dependencies. The generated application is ready to run, with default configurations that can be customized as needed.
Administrative Features
One of JHipster’s standout features is its built-in administrative capabilities. The generated application includes modules for monitoring, logging, and managing user roles and permissions. These modules are built using popular libraries such as Spring Security and are designed to be easily extendable.
For example, the monitoring dashboard uses the Micrometer library to provide insights into application performance. You can customize the dashboard to include additional metrics relevant to your application. Similarly, the logging configuration can be adjusted to suit your deployment environment, ensuring that you have the necessary information to diagnose issues and maintain application health.
Conclusion
JHipster is a powerful and flexible framework that simplifies the development of full-stack Java applications with modern front-end frameworks. By unifying the Java and JavaScript build toolchains and providing extensive administrative capabilities, JHipster enables developers to focus on building features rather than managing infrastructure. Whether you’re developing a monolithic application or a suite of microservices, JHipster offers the tools and support you need to succeed.