JHipster – a field report

Sombra González

JHipster is a renowned development platform for generating web applications and Spring Microservices with Spring Boot and Angular or React. We have gathered our first experiences and tell you if using JHipster can really save you time.

Für die DE-Version, bitte hier klicken (for the german version, klick here): https://www.puzzle.ch/de/blog/articles/2018/10/24/jhipster-ein-erfahrungsbericht

Innovation and agility usually require a short TTM (Time To Market). This means you have to provide a platform as soon as possible where you can develop iteratively until a first productive version is ready. This TTM plays an important role in the selection of the tech stack and other development tools.

We were asked by a customer to produce an MVP (Minimum Viable Product) for an innovative project. The time pressure was noticeable. We had to build a web application within a short time. The goal for our first sprint was to get a web application up and running with the functions of a basic user administration.

Although we already had experience with the Techstack Angular-Java EE, we were not completely convinced whether we would be able to create the first version in a week. Someone had given us the tip about JHipster. I myself had once attended a lecture on the subject at the Devoxx conference in Belgium. But: Can we really save time? As a team we decided to give JHipster a chance.

What exactly is JHipster?

JHipster is an application generator for modern and responsive web applications and microservices with Angular/React for the frontend and Spring in the backend. This application generator is mainly intended to increase the productivity of developers and the quality of the software. Thanks to the integration of Yeoman, the scaffold of a web application can be provided in just a few steps.

Here is a brief summary of the most popular frameworks and tools offered by JHipster.

Client-side technologies:

  • Webpack for the Front-End Build
  • Widely used Javascript frameworks like Angular and React
  • Bootstrap

Server-side technologies:

  • Maven and Gradle as Java Build Tools
  • Spring Boot
  • Netflix OSS for Microservices
  • Database Update Management with Liquibase
  • Integration with various DBs like PostgreSQL, MongoDB
  • Spring Data JPA
  • Spring Security
  • Spring MVC Rest for Rest-Full appplications

Many Testing Frameworks: JUnit, Jest, Gatling, Cucumber, Protractor…

Minification and CSS optimization as well as automatic generation of Docker Compose files are included as well. If you want to learn more about the features and functionality of JHipster, check out its website for the complete list.

Our experiences with JHipster

Our team agreed quickly: generate a web application with JHipster in 4 hours and deploy it to an OpenShift environment. Our TechStack: Angular 6 and Spring Boot 1.5 with PostgreSQL. So let’s go!

With the latest version of JHipster we have generated a simple web application, including user administration, after a few configuration questions. We manually configured our CI pipeline in Jenkins and the deployment on OpenShift, although JHipster also offers this partially. Why? We already had several sample projects where we completed similar pipelines and deployments. Time is gold. Especially when you build an MVP.

The following aspects were of particular interest to us:

  • Automatic integration of DB customizations with Liquibase in Maven
  • Internationalisation support for Angular with NG2 translate
  • “Developer Experience”: Hot Reload, good integration with our IDE (intelliJ)
  • Production Build incl. minify

After generating the project, we removed several components because they were already integrated by JHipster by default. For example, the tools for runtime-monitoring of the application. Over time, we noticed that we should have left such high-quality functionalities behind. Lesson learned.

Although JHipster also offers automatic generation of Spring entities (including testing for CRUD operations), controllers and services, we didn’t use such functionality. Whether we would have saved some time, I cannot judge yet

What we have learned

After our first sprint the customers were positively surprised. You could already test something and not only iterate and develop on the basis of static mockups. JHipster provided us with a good basis for implementing the first business functionalities relatively quickly. Of course, we had to make small adjustments to various components during the next sprints.

I am aware that not everyone is enthusiastic about such scaffolding tools. Admittedly, I was one of them: I was one of them. Some people think that with automatically generated projects, the overview of the entire application is lost relatively quickly. If problems arise, you don’t know exactly where, what and how is configured and you rely on the good practice of the generator. Of course, you learn more when you create a new application from scratch. But as a developer you can also enjoy the advantages of tools like JHipster.

What I find particularly positive about JHipster is that certain “best practices” are available for the selected tech stack. After the automatic generation you get a project with a fixed modularization and the following state-of-the-art conventions. You can use the generated entities and services as examples and integrate the first business logic without much effort. Team organization (front-end and back-end development) is strongly supported by modularization.

On the whole I can recommend JHipster for similar projects as our project (short TTM and MVP). I remain a bit curious about how it works in more complex scalable microservice environments.

Leave a Reply